Jump to content

Patrick Schubert

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Patrick Schubert

  1. Is there any other restriction built into Sage, which could prevent me creating a sales_invoice for a certain customer (contact_id) via the API which would result in a 422 error? I can't think of anything ... Is it a problem, if I set 'date' and 'due_date' to the same date? does this date have to be in the future, could it be today, ... are there any other restrictions I don't see?! we have 5 developers on the team who already invested hours into this and we didn't make any progress at all ...
  2. Okay now I cross checked even the invoice_lines of the 2 orders again. Of course there are different products in there, but I just for the life of me can't find any errors. I made sure the 'ledger_account_id's are correct, the 'tax_rate_id's, ... and I ALWAYS set 'tax_amount' to 0. I really don't understand this, this API, in my mind, has completely random behavior. I really hope someone can help me, I am completely lost ...
  3. Hello Mark, I removed the 'invoice_number_prefix' and the 'invoice_number' completely now ... the API is still completely random and throwing 422 errors at will!! We are losing customers to this, the supplier in question quit our service now because we can't get the damn Sage API to work. Please help!! Here is another error body: What is going on? I am freaking out here! 😞 It is totally random, another JSON body couple minutes earlier worked just fine!! Worked: Again, please help! best, Patrick
  4. Hello, Thank you for your reply Mark! This makes sense! But this still does not explain to me, why some of the sales_invoices I create via the API do get through, and others are not accepted and return a 422 error. The problem I have is the following: I need a separate prefix compared to all the other sales invoices, because the suppliers we are working with are creating sales invoices also manually because not ALL the sales is done via our platform. This means, that a supplier might already have an invoice with the number 2300057 in his system, because he created an invoice manually. When I now try to POST a sales invoice with the same number via the API, I would run into an error because the invoice number already exists. This is why I thought I could define my own prefix ("OL" = Orderlion, the name of our platform) to avoid this issue altogether. Should I just remove both 'invoice_number_prefix' AND 'invoice_number' from my API requests to force Sage to create its own invoice number? Would this work? If yes, is there any other nice way to basically flag the invoice as an "Orderlion invoice", so our supplier have some way of separating all their "normal" invoices from the Orderlion ones? Thank you, best, Patrick
  5. And yes, the "error JSON" indeed actually contained a lot more 'invoice_lines', but I checked all of them and I think, all contain correct sage products with IDs and everything. ONE difference is, that the error JSON contained a mixture of products with different 'leadger_account_id's and different 'tax_rate_id's - could this be a problem? Again: PLEASE improve your error logging - with a huge JSON body like this request, just getting a "422 error" is highly infuriating, unprofessional und frustrating, as debugging this becomes pure hell!
  6. So I am having huge issues with the creation of sales invoices. It seems to me, that especially the fields 'invoice_number_prefix' and 'invoice_number' are highly problematic. It is nowhere documented, how these 2 values should look like and I wasted hours playing around with these 2 values, until the API would eventually accept my requests. But now I am still running into 422 errors all the time, which is highly frustrating for our customers! This is a huge issue for us and I have no way to debug this due to the very poor error reporting of the sage API. I attached 2 different JSON bodies I sent to the endpoint - one worked, one didn't ... and I don't understand why at all! Can someone help? What is going on with the 2 attributes I talked about? What are the limitations on these? How can I finally solve this weird issue? Thank you, best, Patrick ---- Worked: Error:
×
×
  • Create New...