# Order status

The Last Mile API can automatically update an order's delivery status within Shopify. Our system will automatically poll your order status endpoint every 15 minutes to check for any status changes.

1. Edit your app and 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)
2. Enter your API endpoint for retrieving a delivery status\
   ​

   [![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543677/d629b95608281392d3826c6d/GQyaw4AUE2mfZQ7A1rOTXUAT-zP7ltcfpQ.png-1621777941?expires=1725953400\&signature=abb4c55238ad6eb53dccaebbc013729751fbdf9a4936a3a1b5a24bc6209d02b8\&req=cSIiE819m4ZYFb4f3HP0gMm5%2FRmDIpthk%2BuI4L%2B3Gse3N7tXdPPlOCQzHMEJ%0Aeok%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%2BuI4L%2B3Gse3N7tXdPPlOCQzHMEJ%0Aeok%3D%0A)
3. Tell the Last Mile API which field of your response contains the status value\
   ​

   [![](https://downloads.intercomcdn.com/i/o/689006752/cf6e8512bae5bda5ad6bf07e/image.png?expires=1725953400\&signature=8c7c90b7d02eb8e82b05d4d7e47ca38fee20c8ae3ab9c7762c3d46863a160dab\&req=ciguFsl4moRdFb4f3HP0gE%2BDpUO9%2FguuohrRJRUN2A0Jdic0x552YwJE7p6h%0Aw70%3D%0A)](https://downloads.intercomcdn.com/i/o/689006752/cf6e8512bae5bda5ad6bf07e/image.png?expires=1725953400\&signature=8c7c90b7d02eb8e82b05d4d7e47ca38fee20c8ae3ab9c7762c3d46863a160dab\&req=ciguFsl4moRdFb4f3HP0gE%2BDpUO9%2FguuohrRJRUN2A0Jdic0x552YwJE7p6h%0Aw70%3D%0A)
4. Enter the value which should trigger a delivered status within Shopify\
   ​

   [![](https://downloads.intercomcdn.com/i/o/689006988/5b111d594d72890878d121a4/image.png?expires=1725953400\&signature=6276054b5ad543fc50396e12126143dcad6a0d05a3ade50679f7abdbe6ddbc4e\&req=ciguFsl4lIlXFb4f3HP0gDtys3O4IBl1vnH7EXDIeDnM6xv9fMQtyCfPLHet%0ASdU%3D%0A)](https://downloads.intercomcdn.com/i/o/689006988/5b111d594d72890878d121a4/image.png?expires=1725953400\&signature=6276054b5ad543fc50396e12126143dcad6a0d05a3ade50679f7abdbe6ddbc4e\&req=ciguFsl4lIlXFb4f3HP0gDtys3O4IBl1vnH7EXDIeDnM6xv9fMQtyCfPLHet%0ASdU%3D%0A)
5. Enter the value which would trigger a delivery cancellation in Shopify

   \
   ​

   [![](https://downloads.intercomcdn.com/i/o/689007097/a6294078a32e7e9faa75b54b/image.png?expires=1725953400\&signature=b5b5c75f11f76ac585360c7f24a16c93e76a9905ddf274b396a2ff4f28acd474\&req=ciguFsl5nYhYFb4f3HP0gK6%2FIBQbvaIuSnkqwV%2FD40oPHiyb3Nie9%2BNIXXc8%0ABGw%3D%0A)](https://downloads.intercomcdn.com/i/o/689007097/a6294078a32e7e9faa75b54b/image.png?expires=1725953400\&signature=b5b5c75f11f76ac585360c7f24a16c93e76a9905ddf274b396a2ff4f28acd474\&req=ciguFsl5nYhYFb4f3HP0gK6%2FIBQbvaIuSnkqwV%2FD40oPHiyb3Nie9%2BNIXXc8%0ABGw%3D%0A)
6. Click Save\
   ​

   [![](https://downloads.intercomcdn.com/i/o/689007518/e94c71436f4780f6665f568d/image.png?expires=1725953400\&signature=014a04b6f6a54c5c32673612287cc8c0b188a65e4b1407c1afa6848a915c7f28\&req=ciguFsl5mIBXFb4f3HP0gIgQDsqrEru74rMXKN4636SogQEmGSizgZfB1Tvu%0A8V8%3D%0A)](https://downloads.intercomcdn.com/i/o/689007518/e94c71436f4780f6665f568d/image.png?expires=1725953400\&signature=014a04b6f6a54c5c32673612287cc8c0b188a65e4b1407c1afa6848a915c7f28\&req=ciguFsl5mIBXFb4f3HP0gIgQDsqrEru74rMXKN4636SogQEmGSizgZfB1Tvu%0A8V8%3D%0A)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zapiet.com/last-mile-api/order-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
