{"id":2846,"date":"2023-12-22T22:03:04","date_gmt":"2023-12-22T22:03:04","guid":{"rendered":"https:\/\/developers.maplink.global\/updating-order-status-and-courier-coordinates\/"},"modified":"2024-03-04T20:52:36","modified_gmt":"2024-03-04T20:52:36","slug":"updating-order-status-and-courier-coordinates","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/updating-order-status-and-courier-coordinates\/","title":{"rendered":"Updating order status and courier coordinates"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Updating the order status<\/strong><\/h2>\n\n<p>To change the status of the order, you need to make a request to the API using the <strong>POST <\/strong>method to the following endpoint:<\/p>\n\n<p><a href=\"https:\/\/api.maplink.global\/tracking\/v1\/orders\/%7B%7BtrackingId%7D%7D\/status\">https:\/\/api.maplink.global\/tracking\/v1\/orders\/<strong>{{trackingId}}<\/strong>\/status<\/a><\/p>\n\n<p>Where the term <code>{{trackingId}}<\/code> must be replaced by the ID of the order to be updated.<\/p>\n\n<p>An example of a request can be seen below:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"value\": \"ON_THE_WAY\",\n    \"label\": \"Em tr\u00e2nsito\"\n}<\/pre>\n\n<p>Where:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><code>value<\/code>  &#8211; Values<br\/>possible: [<code>\"PREPARING\", \"ON_THE_WAY\", \"DONE\", \"NOT_DONE\", \"CANCELLED\"<\/code>].<\/li>\n\n\n\n<li><code>label<\/code>  &#8211; Personalized text to be displayed on the tracking page.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\"><strong>Updating the delivery person&#8217;s coordinates<\/strong><\/h2>\n\n<p>To update the coordinates, you need to make a request to the API using the <strong>POST<\/strong> method<em> <\/em>to the following endpoint:<\/p>\n\n<p><a href=\"https:\/\/api.maplink.global\/tracking\/v1\/orders\/%7B%7BtrackingId%7D%7D\/driver\">https:\/\/api.maplink.global\/tracking\/v1\/orders\/{{trackingId}}\/driver<\/a><\/p>\n\n<p>Where the term <code>{{trackingId}}<\/code> must be replaced by the ID of the order to be updated.<\/p>\n\n<p>The <strong>coordinates on the tracking page are updated every 15 seconds<\/strong>.  <\/p>\n\n<p>Updates sent in less than 15 seconds <strong>will not be reflected on the tracking page<\/strong>.<\/p>\n\n<p>An example of a request can be seen below:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"name\": \"Maplink BR\",\n    \"image\": \"https:\/\/example.com\",\n    \"currentLocation\": {\n        \"lat\": -22.72725697031394,\n        \"lon\": -47.636846753567944\n    }\n}<\/pre>\n\n<p>Where:<\/p>\n\n<ul class=\"wp-block-list\">\n<li><code>name<\/code>  &#8211; (Optional) Driver&#8217;s name<\/li>\n\n\n\n<li><code>image<\/code>  &#8211; (Optional) URL of the driver&#8217;s photo to be displayed on the site<\/li>\n\n\n\n<li><code>currentLocation<\/code>  &#8211; Object with the driver&#8217;s current coordinates.\n<ul class=\"wp-block-list\">\n<li><code>lat<\/code>  &#8211; Latitude coordinate in decimal degrees.<\/li>\n\n\n\n<li><code>lon<\/code>  &#8211; Longitude coordinate in decimal degrees.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Updating the order status To change the status of the order, you need to make a request to the API using the POST method to the following endpoint: https:\/\/api.maplink.global\/tracking\/v1\/orders\/{{trackingId}}\/status Where the term {{trackingId}} must be replaced by the ID of the order to be updated. An example of a request can be seen below: Where: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[171],"tags":[],"class_list":["post-2846","post","type-post","status-publish","format-standard","hentry","category-tracking-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=2846"}],"version-history":[{"count":1,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2846\/revisions"}],"predecessor-version":[{"id":2847,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2846\/revisions\/2847"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}