Hello community
Please help me with the following query:
What is the API process to cancel an order OR which API to use to cancel an order?
I have all the parameters and credentials, I want to cancel an order with Id or number but not able to find the way.
Thanks in advance!
Hi Ing
Can you please have a look over the following query :
I am trying to fulfill a line item of an order I am getting the following issue, I google it many times but didn't get any issue.
Here 38f6c48b-6432-41e7-a945-71bffa9a72c7 is the id which I get from Order's => salesOrderLines => id
api.businesscentral.dynamics.com/.../salesOrderLines('38f6c48b-6432-41e7-a945-71bffa9a72c7')
Error from API
{"error":{"code":"BadRequest_NotFound","message":"Bad Request - Error in query syntax. CorrelationId: 94886ba5-2adc-479f-9eb1-d8438d9ed4b5."}}
I don't understand what is this CorrelationId means, do you have any idea what could be the issue here? :)
Hi Inge
Thanks for the quick reply
Much appreciated
Yes, you are using the correct reference link.
Just be aware that in order to do shipping you also might have to use the sales line API especially if you do not ship the complete order.
And for refund you probably need to create a sales credit memo that also have its own API.
But all these API's are covered by the link you posted.
Hi Inge
Thanks for responding
I want to implement the following Functionality, Can you please check if this is the correct reference link I should follow: docs.microsoft.com/.../
=> Cancel an Order
=> Fulfill/Ship an order with tracking info
=> Refund an order
Hi Josh
Thanks for responding
I want to implement the following Functionality, Can you please check if this is the correct reference link I should follow: docs.microsoft.com/.../
=> Cancel an Order
=> Fulfill/Ship an order with tracking info
=> Refund an order
Even in the regular UI there isn’t a cancel per say. You would generally delete the order and if you have archiving enabled a copy would be stored.
So API wise follow the process to delete. This is subject to no postings having taken place with the order. If postings have happened you will need something custom as there is no standard facility to reverse shipments. Invoices do have a feature for this though
You should use the sales order API:
docs.microsoft.com/.../dynamics_salesorder
To cancel it you have to either delete it or update some field to mark it as canceled using the patch method in the API.
Sohail Ahmed
2,655
Mansi Soni
1,574
YUN ZHU
1,453
Super User 2025 Season 1