You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick summary and/or background
As mentioned in the title, when I'm hitting the Invoices endpoint to update an invoice, through either Postman, the API explorer, or the Python SDK (updateInvoice endpoint), the discount fields are being modified, even though I'm only marking the invoice as being sent.
Steps to reproduce
This is tricky as my invoices are being create via the Parex bridge for Shopify. However, the invoice is created with a discount, as shown below:
The discount fields above match what is entered into Shopify, therefore the sync is correct.
However, when I attempt the mark the invoice as paid in postman, the discount values change. I'm hitting the Invoices/GUID endpoint, with the following payload:
Notice how the DiscountRate has changed, and the DiscountAmount has disappeared? Why is this happening when all I'm updating is the SentToContact field?
What you expected would happen
I would expect only the SentToContact field for that specific invoice to be modified, and no other fields.
What actually happens
Shown above.
Notes
As mentioned, I first noticed that something similar was happening in the Python SDK - an error message was returned saying Discount must be between 0.00 and 100.00 or empty.. So I tested it in the API explorer, and postman, and I get the above results. Therefore I believe this is an issue with the API.
The text was updated successfully, but these errors were encountered:
Our product team are currently aware of a behaviour where POST requests to update an existing invoice cause any DiscountAmount entered in line items to be recalculated as an incorrect DiscountRate.
Currently the workaround to prevent this behaviour from occurring is to include the LineItems, including the original DiscountAmounts in the request body of the POST request, so that the original DiscountAmount is maintained.
A quick summary and/or background
As mentioned in the title, when I'm hitting the
Invoices
endpoint to update an invoice, through either Postman, the API explorer, or the Python SDK (updateInvoice
endpoint), the discount fields are being modified, even though I'm only marking the invoice as being sent.Steps to reproduce
This is tricky as my invoices are being create via the Parex bridge for Shopify. However, the invoice is created with a discount, as shown below:
The discount fields above match what is entered into Shopify, therefore the sync is correct.
However, when I attempt the mark the invoice as paid in postman, the discount values change. I'm hitting the
Invoices/GUID
endpoint, with the following payload:I get the following response:
Notice how the DiscountRate has changed, and the DiscountAmount has disappeared? Why is this happening when all I'm updating is the SentToContact field?
What you expected would happen
I would expect only the
SentToContact
field for that specific invoice to be modified, and no other fields.What actually happens
Shown above.
Notes
As mentioned, I first noticed that something similar was happening in the Python SDK - an error message was returned saying
Discount must be between 0.00 and 100.00 or empty.
. So I tested it in the API explorer, and postman, and I get the above results. Therefore I believe this is an issue with the API.The text was updated successfully, but these errors were encountered: