I am working on integration of a Wix online shop with a courier service.
The idea is to create a delivery order (Using “REST” API) at the courier service when a Wix Order is submitted.
I thought about using the “Order Created Webhook” (https://dev.wix.com/api/rest/wix-stores/orders/order-created-webhook) in order to initiate the flow and when the delivery id is created update the Wix order with the delivery id.
Questions:
- Is the design above is the “best practice”? Are there any other options?
- What is the API call that should be used in order to update the Wix order with the newly created delivery id?
- Error handling. How can the code inform the Wix online shop admin about failures?
Thanks