Integrating a Wix shop with a courier service

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:

  1. Is the design above is the “best practice”? Are there any other options?
  2. What is the API call that should be used in order to update the Wix order with the newly created delivery id?
  3. Error handling. How can the code inform the Wix online shop admin about failures?

Thanks

There are several fulfillment APIs available (eg. createFulfillment ), but I’m not sure that they will be sufficient for your need.

Another option is the “connecting” the service through the dashboard:

See Wix Stores: Connecting to a Fulfillment Service for more information.

If you need further details or clarification, I would recommend contacting Wix Customer Care , as they know best.

Thanks

I thought about https://www.wix.com/corvid/reference/wix-stores-backend/events/oncartcompleted - this one looks promising…
Open questions:

  • how to update the cart / order (not sure what is the term)
  • how to handle errors