We have tried combinations of decimal and quoted parameters in tests via postman this morning and they worked fine. But we need to know why our production failed last night.
We’ve had a look at the calls being made to that endpoint from your company, and we noticed that the ones that failed with a 422 very closely follow successful requests (201s), so much so that the initial request doesn’t completely finish generating a new invoice by the time the new one starts. We think that this has led to a reference clash between the two invoices, preventing the latter one from being created as two invoices can’t use the same reference number.
We’ll have a look on our end to see if there’s anything we can do to make the process more efficient, but in the meantime, we think there might be a couple of workarounds:
Providing an invoice reference number with your parameters rather than relying on the generation on our end should should prevent the issue.
Otherwise, if you’re submitting these requests in parallel, it’s possible that submitting them sequentially might solve the problem going forward.
I hope this helps; Please let me know if this doesn’t solve the issue or if you have any further questions!