> For the complete documentation index, see [llms.txt](https://docs.zapiet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapiet.com/last-mile-api/delivery-status.md).

# Delivery status

The delivery status request reflects the order status from your service in both Shopify and Zapiet - Pickup + Delivery.

## Webhook mode <a href="#h_8fca7e7f5f" id="h_8fca7e7f5f"></a>

To use webhooks for delivery status updates, you need to select “Webhook from carrier” from the dropdown menu within the Delivery Status endpoint settings.

<figure><img src="/files/MsUb8H5m73cf1yVvydXh" alt=""><figcaption></figcaption></figure>

Next, you need to create the URL that will be used for the webhook.

The base URL is <https://partners.zapiet.com/webhooks/delivery-status/>

We recommend using your company name to avoid any issues, for example :\
<https://partners.zapiet.com/webhooks/delivery-status/unique-carrier-name>&#x20;

<figure><img src="/files/uLobZNlAIhrRhNlwUN8V" alt=""><figcaption></figcaption></figure>

Next, you need to generate an authentication token that will be sent with the web hook.

<figure><img src="/files/chUCr2O2tTkVEOky4p0c" alt=""><figcaption></figcaption></figure>

Next, you need to enter the key from the response object that contains the order status value.

<figure><img src="/files/8eKMrIssyqPZDKpwPGkU" alt=""><figcaption></figcaption></figure>

Next, you need to specify each status value we can expect to receive.

<figure><img src="/files/pKfhyXqWw3MC5gRKv4i3" alt=""><figcaption></figcaption></figure>

## Polling request Mode

The request is called only if [tracking details](/last-mile-api/creating-a-delivery.md#h_5797d233e9) are enabled. We will send a request every 10 minutes after the tracking details have been added to the order. To format the Delivery status request:

1. Go to the App Setup page

   [![](https://downloads.intercomcdn.com/i/o/688861450/4d912114e109b1a55d2f8d27/image.png?expires=1725953400\&signature=ba505f2b3ce93c68917e848871e8596ed2ca722fd4a393c0b9423c01103abcd9\&req=cigvHs9%2FmYRfFb4f3HP0gGMVG4p6BnLCHeTFO%2F3riTGfIXCcSeTy8IWUX%2BiW%0AmII%3D%0A)](https://downloads.intercomcdn.com/i/o/688861450/4d912114e109b1a55d2f8d27/image.png?expires=1725953400\&signature=ba505f2b3ce93c68917e848871e8596ed2ca722fd4a393c0b9423c01103abcd9\&req=cigvHs9%2FmYRfFb4f3HP0gGMVG4p6BnLCHeTFO%2F3riTGfIXCcSeTy8IWUX%2BiW%0AmII%3D%0A)
2. Click Delivery status

   [![](https://downloads.intercomcdn.com/i/o/688867222/385d9ef50ef3e8561385595e/image.png?expires=1725953400\&signature=adad2af74a40136d53b700ed47a0b71631c0722dc0e22e8551a7f391a2703b45\&req=cigvHs95n4NdFb4f3HP0gDayxNmK4yMg1R9Zgi2mp4%2BAvOWAbxbg9A3lE96y%0Ae0U%3D%0A)](https://downloads.intercomcdn.com/i/o/688867222/385d9ef50ef3e8561385595e/image.png?expires=1725953400\&signature=adad2af74a40136d53b700ed47a0b71631c0722dc0e22e8551a7f391a2703b45\&req=cigvHs95n4NdFb4f3HP0gDayxNmK4yMg1R9Zgi2mp4%2BAvOWAbxbg9A3lE96y%0Ae0U%3D%0A)

### Endpoint <a href="#h_5f67654f61" id="h_5f67654f61"></a>

We accept GET and POST requests. If you need to, you can use ####{{ courier.delivery.id }} variable that you passed us in the Create delivery request. For the full list of allowed variables, check the Delivery status section of our [Allowed variables ](/last-mile-api/allow-variables-list.md)list.

Select "pull status every 5 minutes" from the dropdown menu as shown below:

<figure><img src="/files/bztUFMLupGJ85dzmj6L8" alt=""><figcaption></figcaption></figure>

### Response <a href="#h_8fca7e7f5f" id="h_8fca7e7f5f"></a>

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543677/d629b95608281392d3826c6d/GQyaw4AUE2mfZQ7A1rOTXUAT-zP7ltcfpQ.png-1621777941?expires=1725953400\&signature=abb4c55238ad6eb53dccaebbc013729751fbdf9a4936a3a1b5a24bc6209d02b8\&req=cSIiE819m4ZYFb4f3HP0gMm5%2FRmDIpthk%2BuS5Lm%2BIO3YLtpCf6eEjKJObix0%0AuIdz67mUsWo%2Bsf0xGA%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543677/d629b95608281392d3826c6d/GQyaw4AUE2mfZQ7A1rOTXUAT-zP7ltcfpQ.png-1621777941?expires=1725953400\&signature=abb4c55238ad6eb53dccaebbc013729751fbdf9a4936a3a1b5a24bc6209d02b8\&req=cSIiE819m4ZYFb4f3HP0gMm5%2FRmDIpthk%2BuS5Lm%2BIO3YLtpCf6eEjKJObix0%0AuIdz67mUsWo%2Bsf0xGA%3D%3D%0A)

For the response, we expect a single "key" : "value" pair. The key should be static, and the value can change depending on the status.

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543678/adefdf577a502097f70acfdc/_qvhILftNReUqXooIV9a9W-Mbai4ne3yuQ.png-1621778171?expires=1725953400\&signature=13cdd32b03537ed2715b4f0a1b01107d60d666dbbc10da4307061637af423858\&req=cSIiE819m4ZXFb4f3HP0gPN7EixA9964UbznNThdxDZoQYp2H9hFriUZvMpa%0A1rsXAWsqRUswXSc0HQ%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543678/adefdf577a502097f70acfdc/_qvhILftNReUqXooIV9a9W-Mbai4ne3yuQ.png-1621778171?expires=1725953400\&signature=13cdd32b03537ed2715b4f0a1b01107d60d666dbbc10da4307061637af423858\&req=cSIiE819m4ZXFb4f3HP0gPN7EixA9964UbznNThdxDZoQYp2H9hFriUZvMpa%0A1rsXAWsqRUswXSc0HQ%3D%3D%0A)

Next, you need to specify each status value we can expect to receive.
