{"_id":"582c82975acf7e25006c0810","user":"5809ea66629bf91900cd139f","version":{"_id":"582c7058e4a4920f00ff0045","project":"56c1e50bce02590d006091c9","__v":2,"createdAt":"2016-11-16T14:42:32.468Z","releaseDate":"2016-11-16T14:42:32.468Z","categories":["582c7058e4a4920f00ff0046","582c7058e4a4920f00ff0047","582c7058e4a4920f00ff0048","582c7058e4a4920f00ff0049","582c7058e4a4920f00ff004a","582c7058e4a4920f00ff004b","582c7058e4a4920f00ff004c","582c7058e4a4920f00ff004d","582c7058e4a4920f00ff004e","582c7058e4a4920f00ff004f","582d97124b2536250038b392"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"__v":1,"githubsync":"","project":"56c1e50bce02590d006091c9","category":{"_id":"582c7058e4a4920f00ff0048","version":"582c7058e4a4920f00ff0045","__v":0,"project":"56c1e50bce02590d006091c9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-28T15:09:02.677Z","from_sync":false,"order":1,"slug":"orderconnect-sending-an-order","title":"Delivery partners"},"parentDoc":null,"updates":["5966913c4f2275001536e833"],"next":{"pages":[],"description":""},"createdAt":"2016-11-16T16:00:23.015Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Just Eat requires all delivery partners to implement an *OrderStatusUpdated* endpoint.  Just Eat use this endpoint to transmit important order events to the delivery partner, in order to facilitate the delivery process.\n\nThe following specific events are currently transmitted using this endpoint:\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Ready for pickup\",\n  \"body\": \"The \\\"Ready for pickup\\\" event lets the delivery partner know that the food has been cooked and is now ready for collection up from the restaurant.\\n\\n**When this event is received, it is important that you let your driver know that the order should now be collected from inside the restaurant.**  For example, this driver notification could take the form of an in-app notification or an SMS message.\\n\\nThis communication is needed to support restaurants who are unable to accommodate drivers inside their premises, as it allows restaurants to notify drivers waiting outside that they should come inside to collect their order.\\n\\n**NB:** This event can be sent by the restaurant at **any **point after the order is accepted by the restaurant (for instance, this event may be sent before the driver has arrived at the restaurant).\"\n}\n[/block]\n**REQUEST:**\n\nOrderconnect will send the OrderStatusUpdated event to a URL specified by the partner - for instance, http://partnerdomain.com/orders/{OrderId}/orderstatusupdated.  This event will be sent using the PUT HTTP method.\n\nThe body of the request will be JSON in the following format:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"OrderStatusUpdated\\n{\\n  Event: \\\"Ready for pickup\\\",\\n  Timestamp: (string(33))\\n}\",\n      \"language\": \"smarty\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]\n**RESPONSE:**\n\nUpon successful receipt of the event, delivery partners should return a 200 HTTP status code indicating acknowledgement of transmission.\n\nIn the unlikely case of unknown errors, JUST EAT will log a raw response.  If possible, the response should have the following format:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  Timestamp (string),\\n  Message (string),\\n  Details (string),\\n  OrderId (string, optional)\\n}\",\n      \"language\": \"smarty\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"receive-order-updates-from-orderconnect","type":"basic","title":"Receive status updates from Just Eat"}

Receive status updates from Just Eat


Just Eat requires all delivery partners to implement an *OrderStatusUpdated* endpoint. Just Eat use this endpoint to transmit important order events to the delivery partner, in order to facilitate the delivery process. The following specific events are currently transmitted using this endpoint: [block:callout] { "type": "warning", "title": "Ready for pickup", "body": "The \"Ready for pickup\" event lets the delivery partner know that the food has been cooked and is now ready for collection up from the restaurant.\n\n**When this event is received, it is important that you let your driver know that the order should now be collected from inside the restaurant.** For example, this driver notification could take the form of an in-app notification or an SMS message.\n\nThis communication is needed to support restaurants who are unable to accommodate drivers inside their premises, as it allows restaurants to notify drivers waiting outside that they should come inside to collect their order.\n\n**NB:** This event can be sent by the restaurant at **any **point after the order is accepted by the restaurant (for instance, this event may be sent before the driver has arrived at the restaurant)." } [/block] **REQUEST:** Orderconnect will send the OrderStatusUpdated event to a URL specified by the partner - for instance, http://partnerdomain.com/orders/{OrderId}/orderstatusupdated. This event will be sent using the PUT HTTP method. The body of the request will be JSON in the following format: [block:code] { "codes": [ { "code": "OrderStatusUpdated\n{\n Event: \"Ready for pickup\",\n Timestamp: (string(33))\n}", "language": "smarty", "name": "JSON" } ] } [/block] **RESPONSE:** Upon successful receipt of the event, delivery partners should return a 200 HTTP status code indicating acknowledgement of transmission. In the unlikely case of unknown errors, JUST EAT will log a raw response. If possible, the response should have the following format: [block:code] { "codes": [ { "code": "{\n Timestamp (string),\n Message (string),\n Details (string),\n OrderId (string, optional)\n}", "language": "smarty", "name": "JSON" } ] } [/block]