REDDIT 原始帖子

Project Help with APIs?

To preface this, this is my first project. I am using this project as a goal in order to learn the skills along the way. I am having difficulty nailing down exactly how to go about this, and what information would be most helpful learning how to do this. I…

原帖正文r/webdev

To preface this, this is my first project. I am using this project as a goal in order to learn the skills along the way. I am having difficulty nailing down exactly how to go about this, and what information would be most helpful learning how to do this. I would appreciate any help on understanding the projects I want to undertake, and what knowledge or skills underly this. I'm currently going through the beginner course information, but at this stage it's difficult to parse what information I need to focus on and expand on in order to achieve the desired outcome. Any and all help would be appreciated! Currently at my job, I have to do a lot of manual entry between our CRM (Jobber) and our bookkeeping software (Quickbooks). My first thought is that there has to be a way to automate some of what I do especially as the number of manual tasks increases. I'd like to automate the more repetitive tasks that follow the same pattern. What I have: ability to access Jobber's API. Currently working to request access to QBs API. Both APIs appear to use REST. I want to do some crazy automations between the 2 programs. I have listed out 4 different project ideas for areas of my job I want to potentially automate. I have no clue if they are feasible or the best place to begin or if this is something API alone can do. Each project is fairly similar in the desire to look for data and map it in specific ways to a second site. The current process: Employees enter receipt information into jobber. The date, the store name, the amount, who entered the receipt, the accounting code, a description of what was purchased, and an attachment image of the receipt. In quickbooks, I have to manually drag and drop attachments to corresponding bank transactions with ridiculous memos, change the category, and post. What I want to design: A program that can pull the image and details of the receipt from jobber and create an expense with attachment in QuickBooks that matches. I'd also like to create custom rules. For instance, If accounting code in jobber= gas, look at employee name. If Employee A entered receipt, then it goes to Quickbooks account for Tacoma Gas. If creating custom rules is not possible, I can add accounting codes in jobber to match the accounts in QuickBooks instead. Second potential design: This one from research I've done may require research into an OCR Current process, Bills are emailed to quickbooks. These are put in the for review pile. When I open the bill to review it, quickbooks is able to match vendor, date, and line items using AI. What it currently doesnt do is match the correct chart of account which I then have to manually adjust each line item to the correct category/chart of account. Is there a way to create a program that also pulls the PO information from bill. There are 2 types of POs. Ones labelled stock and ones labelled with a Job#. If the PO = stock, then set all categories to the COGS chart of account for each line item created. If PO= J155, then set category to WIP account with matching Job #. Third potential Project: For job closing. Current Process. Look at list of WIP Job Accts in Quickbooks. lets say I have 4 of them labeled JOb#112 Job#115 Job#117 Job#119. I go into Jobber and look up each job. If the job is archived, I scroll down and look for an invoice. If there is an invoice, I note down the invoice date. I then go back into Quickbooks and open the Job#112 account. Each account has the same set up inside. Theres one line that has the initial deposit with the customer account name and multiple line items labeled bill or expense. Using the numbers in the account and the invoice date, I create a new journal entry that moves the two sets of line items into specific accounts. COGS and A/R. Fourth Potential Project: When we receive a deposit on a quote, jobber send an email notifying us. I then have to go into Jobber, convert it to a job which creates a job#. I then download the job and the Quote, take those 2 downloads and send message on teams with the attachments and a notification that the quote for customer A has been converted to job # xx. Then, I take that job # and the deposit amount in jobber and create a new chart of account named after the job # and then I create a journal entry with the date of the deposit, and the amount moving from the general AR account to the newly created Job # account. Is there a way to automate this aswell with a program with specific rules that pulls data from one program and enters it into the other.

已收录讨论

3 条评论

u/National_Mall9338

The Jobber API is GraphQL, exclusively. There is no REST. You wrote "Both APIs appear to use REST" - and I think you built your entire plan on a false premise. QuickBooks is REST, Jobber is not. That changes how the code looks, how the rate-limiting looks (Jobber charges by query cost, not by number of requests), and what libraries it uses. There is already a native Jobber - QuickBooks Online integration, but it is one-way (customers, products, invoices, payments) and does not cover your case with receipts and mapping rules. There are also Zapier connectors. It does not solve your problem, but ten minutes of checking before writing code can save you months. I understand you're on your first project and you listed four integrations. We could easily guess how this will end. Try doing just one, complete it, and then see.

u/beck_the_tech

the piece that bites first-timers here is the failure handling, not the happy path. quickbooks will 429 you and jobber webhooks can retry the same event twice, so you need idempotency and backoff from day one or you'll get duplicate expenses. get the flow working sync first, then move the quickbooks call somewhere it can retry safely on its own.

u/Significant_Pick8297

Yes, all four of those are feasible with APIs, and the first project is by far the best place to start. Treat it as a small integration service rather than one huge automation. The basic flow is: receive an event from Jobber (or poll its API), fetch the receipt data and attachment, apply your mapping rules in code, then call the QuickBooks API to create the expense and upload the attachment. Those "if accounting code = gas and employee = A then use account X" rules are exactly the kind of business logic you'd keep in your application. Once that works, the other projects become variations of the same pattern. Project 2 would likely need OCR only if the PO number isn't already exposed by the QuickBooks API. Projects 3 and 4 are mostly querying data, checking conditions, and creating journal entries or other records through the APIs. One piece of advice that will save a lot of headaches: don't hardcode those mappings. Store them in a JSON file or database so changing "Employee A → Tacoma Gas" later doesn't require changing code. That's a common pattern in automation tools and makes the project much easier to maintain.