{"items":[{"type":"link","label":"Last-mile API","link":"/apis/lastmile","routeSlug":"/apis/lastmile","content":{"contentType":"overview","meta":{"name":"Last-mile API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"lastmile.json","url":"/_bundle/apis/lastmile.json?download"},{"kind":"download","label":"lastmile.yaml","url":"/_bundle/apis/lastmile.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"email","title":"E-mail","titleTranslationKey":"info.contact.name","email":"apisupport@quiqup.com","label":"apisupport@quiqup.com","withCopyButton":true,"copyContent":"apisupport@quiqup.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Proprietary","url":"https://quiqup.com/terms"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Last-mile API (1.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is the last-mile API: collection from a pickup point and delivery to a"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"customer. If Quiqup holds your stock and picks it, you want the Fulfilment API instead. See"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/choose"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Which API do I need"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The object you work with is the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". You will be creating orders through our Order API, these orders will follow a certain status life cycle, documented in "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/order-lifecycle"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order lifecycle"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}],"sectionId":"/apis/lastmile"}],"sectionId":"/apis/lastmile"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/the-basics"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The basics"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Our APIs are RESTful based and follow the below principles:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Accessible on staging through: https://api.staging.quiqup.com and on production through: https://api-ae.quiqup.com"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"It uses standard HTTP verbs like GET, POST, PUT and DELETE"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Uses standard HTTP error responses to describe errors, for example:"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"{\n    \"api_error\": {\n        \"id\": 1002,\n        \"code\": \"Error Code\",\n        \"message\": \"Error Message\",\n        \"human\": \"Human readable error message\",\n        \"description\": \"Detailed human readable error description\",\n        \"http_status_code\": 400,\n        \"attribute_errors\": [\n            { \"detail\": \"additional error code\" }\n        ]\n    }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"{\n    \"api_error\": {\n        \"id\": 1002,\n        \"code\": \"Error Code\",\n        \"message\": \"Error Message\",\n        \"human\": \"Human readable error message\",\n        \"description\": \"Detailed human readable error description\",\n        \"http_status_code\": 400,\n        \"attribute_errors\": [\n            { \"detail\": \"additional error code\" }\n        ]\n    }\n}\n"},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication and authorization are based on the OAuth 2.0 standard"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"All communication with our servers must be over SSL (https://), otherwise it will fail"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"POST data must be encoded as application/json"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Most responses are encoded as application/json. Two are not: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /order_label/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" returns"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"a PDF, and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PUT /orders/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" returns the literal "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" with no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Content-Type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header at all."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Check the content type before parsing."},"children":[]}]}]}]}]}],"sectionId":"/apis/lastmile/section/the-basics"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/typical-flow"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Typical flow"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A typical order flow:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get a Bearer token. Generate one yourself in Quiqdash, or, if you hold a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"client_secret"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", exchange them at "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", see the Auth reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create a pending order using "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"POST /orders"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", see details in this reference."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Mark the order as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" using "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PUT /orders/{order_id}/ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", see details in this reference."},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"There is an option to skip this step and directly create the orders in a ready for collection state, however the orders do actually need to be ready for collection."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Using this step option will thus depend on how the picking and packing process works."},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Request an order label by using: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /order_label/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" see details in this reference. This label needs to be saved as a PDF document, printed and used to label the order. The barcode on this label will be used by the couriers and our warehouse staff to scan the orders and keep you updated on the order status. The label can be downloaded before or after step 3."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order state updates, once the order has been placed it will go through various states (see "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/order-lifecycle"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order lifecycle"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"). There are two options on how you can receive updates on this:"},"children":[]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"These can be received in realtime through webhooks, see "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/webhooks"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Alternatively you can get the order state from GET /orders/{order_id}, see in this reference for details."},"children":[]}]}]}]}]}]}]}],"sectionId":"/apis/lastmile/section/typical-flow"}]}]}},{"type":"link","label":"The basics","link":"/apis/lastmile/section/the-basics","routeSlug":"/apis/lastmile/section/the-basics","content":null},{"type":"link","label":"Typical flow","link":"/apis/lastmile/section/typical-flow","routeSlug":"/apis/lastmile/section/typical-flow","content":null},{"type":"group","label":"Orders","link":"/apis/lastmile/orders","routeSlug":"/apis/lastmile/orders","items":[{"label":"Create an order","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/create-an-order","routeSlug":"/apis/lastmile/orders/create-an-order","metadata":{"seo":{"title":"Create an order","description":"Creating orders"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"create-an-order","name":"Create an order","deprecated":false,"isWebhook":false,"pointer":"/paths/~1orders/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Create an order","isWebhook":false,"deprecated":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"orders/create-an-order/request/creating-orders","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/creating-orders"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Creating orders"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Eight things govern order creation with the ecommerce order API."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order states"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order kinds"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Payment on delivery or pre-paid"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Partner Order ID"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing Identifiers"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Items"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AWB Documents (Labels)"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Marking an order as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready for collection"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When you create a new single order, this order will be created in a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" state and will only be visible on your Quiqdash, but it is not visible for our dispatching system."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/1.-order-states","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/1.-order-states"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"1. Order states"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Every state, what it means and the webhook event it fires are listed once, in "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/order-lifecycle"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order lifecycle"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". That page is the one to code against."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/2.-order-kinds-(service-type):","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/2.-order-kinds-(service-type):"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"2. Order Kinds (Service Type):"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Through this API we offer various services, depending on what service you select, different service levels apply. The current available service kinds are:"},"children":[]}]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Order Kind Value"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Service Description"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_same_day"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If orders are marked as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" before the agreed cut-off time, the order will be collected  and delivered on the same-day."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_next_day"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Orders that are marked as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" will be delivered the next day."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_4hr"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Orders marked "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" between 08:00 and the account's 4-hour cut-off, 18:00 unless agreed otherwise, are delivered within 4 hours. Orders marked ready after the cut-off are delivered by 12:00 the next day, and orders marked ready before 08:00 by 12:00 the same day. UAE time."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_return"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use this order kind to create return orders for customers to return. Important to consider that the pickup location here is the customer's address and the dropoff location should be the location where order is returned to."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_store"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Accepted on create and resolves to the same-day service class. The response echoes it as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"service_kind"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" while "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"kind"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" reads "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_same_day"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_export"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"International shipping to GCC destinations. Also applied automatically when the destination country differs from the pickup country. Checked when the order is made ready for collection, see "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/lastmile/create-an-order#export-orders"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Export orders"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/3.-payment-on-delivery-or-pre-paid","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/3.-payment-on-delivery-or-pre-paid"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"3. Payment on delivery or pre-paid"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"There are two fields that pertain to payment on delivery, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can either be:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pre_paid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - This means the customer has already paid you and no money needs to be collected during the delivery"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"paid_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" - This means the customer has not yet paid for the order and will be collecting this by card or by cash during the delivery."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"As for the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" this is dependent on what "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is set."},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If the payment mode is prepaid, then omit "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or send 0."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"In case where the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" = "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"paid_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", then the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" needs to be greater than "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The currency is defaulted to the country's currency, in the case of the UAE this is Dirham AED, ISO: AED 784."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/4.-partner-order-id","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/4.-partner-order-id"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"4. Partner Order ID"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This field you can use for your own internal order reference. This will also be used for invoicing purposes and allows for easy reconciliation of invoices and COD payments. This field does not enforce uniqueness. Send a unique value yourself."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/5.-billing-identifiers","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/5.-billing-identifiers"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"5. Billing Identifiers"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Billing Identifiers allow you to create orders in other accounts. This can be useful for integrations that will be used by several businesses."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A billing identifier needs to be configured by Quiqup and approved by the business. A value that is not configured for your account is accepted and ignored: the order is created, the value is echoed back, and the order belongs to you. See "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/lastmile/create-an-order#billing_identifier"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"billing_identifier"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A billing Identifier is set by passing the below in the root of the order payload:"},"children":[]}]}]},{"$$mdtype":"Node","type":"fence","attributes":{"content":"\"billing_identifier\": \"Retailer123\",\n","language":"json"},"children":[{"$$mdtype":"Node","type":"text","attributes":{"content":"\"billing_identifier\": \"Retailer123\",\n"},"children":[]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":3,"id":"orders/create-an-order/request/example:","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/example:"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Example:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The integrated account "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"integration@example.com"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" uses API keys to connect to Quiqup's system and create orders."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"While creating orders it passes the billing identifier "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Retailer123"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order is then owned by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"retailer@example.com"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" but the order is authored by "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"integration@example.com"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" Making the order visible on both their Quiqdash."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/6.-items","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/6.-items"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"6. Items"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Items should be regarded as parcel. Each item represents one parcel. So thus if an order consists of only one parcel there is only one item in the order. If the order consists of two parcels, send two entries in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and two labels are generated."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The item object has a few important fields that you need to be aware of:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"First being the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", you can put your parcel reference code or order ID in here. Alternatively you can name this: Parcel #1, and Parcel 1 of 2 if there are multiple parcels as part of this order."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Quantity"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" should always be set to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"parcel_barcode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Leave it empty and Quiqup generates the barcode and prints the label. A non-empty value tells Quiqup you are printing your own label."},"children":[]}]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/7.-awb-documents-(labels)","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/7.-awb-documents-(labels)"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"7. AWB Documents (Labels)"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Ecommerce orders require labels to maintain and provide an accurate chain of custody for your records and ours. This is what allows us to keep a clean order history and track the parcels throughout its life cycle."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"As an order can have multiple items, an order can also have multiple labels. Each item requires a label with a unique parcel-barcode so each individual parcel can be tracked. For more information on how to download our labels see the Download the AWB Document operation."},"children":[]}]}]},{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"orders/create-an-order/request/8.-marking-an-order-as-ready_for_collection","deepLinkHash":"/orders/create-an-order#orders/create-an-order/request/8.-marking-an-order-as-ready_for_collection"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"8. Marking an order as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Mark the order ready for collection once it is picked and packed. The label can be downloaded before or after that call. Orders that remain "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are ignored by Quiqup. For full details please see the Mark Ready for Collection operation"},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"headers","label":"Headers","labelTranslationKey":"header","parameters":[{"name":"Content-Type","in":"header","schemaId":"schema_0","description":"","required":true}],"pointer":"/paths/~1orders/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_1","exampleIds":["paths/~1orders/post/requestBody/content/application~1json/examples/default"]}},"schemaId":"schema_1","exampleIds":["paths/~1orders/post/requestBody/content/application~1json/examples/default"],"pointer":"/paths/~1orders/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[],"query":[],"querystring":[],"header":[{"name":"Content-Type","in":"header","required":true,"schemaId":"schema_0"}],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_1","exampleIds":["paths/~1orders/post/requestBody/content/application~1json/examples/default"]}},"responseCodes":["200","201","422"],"pointer":"/orders","href":"orders/create-an-order","openApiOperationId":"create-an-order","summary":"Create an order","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"schemaId":"schema_1","exampleIds":["paths/~1orders/post/requestBody/content/application~1json/examples/default"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_1","exampleIds":["paths/~1orders/post/requestBody/content/application~1json/examples/default"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An order with this "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"uuid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" already exists for your account. That order is returned unchanged, in the same shape as the 201 response, and nothing was created."},"children":[]}]}]}]},{"code":"201","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order was created. It is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" until you release it."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2","exampleIds":["paths/~1orders/post/responses/201/content/application~1json/examples/Example 1"]}},"schemaId":"schema_2","exampleIds":["paths/~1orders/post/responses/201/content/application~1json/examples/Example 1"],"headers":{}},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200"},{"code":"201","schemaId":"schema_2","exampleIds":["paths/~1orders/post/responses/201/content/application~1json/examples/Example 1"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2","exampleIds":["paths/~1orders/post/responses/201/content/application~1json/examples/Example 1"]}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Callbacks","labelTranslationKey":"callbacks","deepLinkSuffix":"callbacks"}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"item-content","variant":"callback","callback":{"httpVerb":"post","pathName":"https://your-endpoint.example.com/quiqup-webhook","summary":"Order state change","operationId":"order-webhook-event","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Quiqup POSTs this to the URL you registered in "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Quiqdash > Integrations > Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". There is no per-order callback URL."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The payload shape is the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"OrderWebhookEvent"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" schema below. Everything else about receiving it is in "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/webhooks"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"callbackName":"orderStateChange","callbackId":"orderStateChange/post","contentChildren":[{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","isEvent":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/OrderWebhookEvent"}},"schemaId":"components/schemas/OrderWebhookEvent","pointer":"/paths/~1orders/post/callbacks/orderStateChange/post/requestBody"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"2XX","description":"Any 2xx. The body is ignored."}],"pointer":"/paths/~1orders/post/callbacks/orderStateChange/post/responses"}]},"pointer":"/paths/~1orders/post/callbacks"}],"panels":[{"children":[{"kind":"callback-payload","callbackName":"orderStateChange/post","path":"https://your-endpoint.example.com/quiqup-webhook","httpVerb":"post","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/OrderWebhookEvent"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/create-an-order"}],"panels":[]}]},"httpPath":"/orders"},{"label":"List orders","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/list-orders","routeSlug":"/apis/lastmile/orders/list-orders","metadata":{"seo":{"title":"List orders","description":"Return a list of orders filtered by the given date parameters. The date format has to be YYYY-MM-DD"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"list-orders","name":"List orders","deprecated":false,"isWebhook":false,"pointer":"/paths/~1orders/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"List orders","isWebhook":false,"deprecated":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Return a list of orders filtered by the given date parameters. The date format has to be YYYY-MM-DD"},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"page","in":"query","schemaId":"schema_3","description":"","required":true},{"name":"from","in":"query","schemaId":"schema_0","description":"YYYY-MM-DD","required":true},{"name":"to","in":"query","schemaId":"schema_0","description":"YYYY-MM-DD","required":true},{"name":"per_page","in":"query","schemaId":"schema_3","description":"","required":true},{"name":"filters[state]","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Optional. One of the lowercase "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" values. An unrecognised or wrongly-cased value returns 200 with an empty "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"results"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" array and, confusingly, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"total: 1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Branch on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"results.length"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", not on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"total"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Without this filter the list leaves out "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" orders; send "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to include them."},"children":[]}]}]}]},{"name":"filters[partner_order_id]","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Matches every reference that contains this value, ignoring case, so "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ORDER-1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" also matches "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ORDER-10"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"On its own it does not find "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" orders"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", because the list leaves them out unless "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"filters[state]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" asks for them. A timed-out create leaves a pending order, so to check whether it landed send "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"filters[state]=pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" together with this filter."},"children":[]}]}]}]}],"pointer":"/paths/~1orders/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/orders","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[],"query":[{"name":"page","in":"query","required":true,"schemaId":"schema_3"},{"name":"from","in":"query","required":true,"schemaId":"schema_0"},{"name":"to","in":"query","required":true,"schemaId":"schema_0"},{"name":"per_page","in":"query","required":true,"schemaId":"schema_3"},{"name":"filters[state]","in":"query","required":false,"schemaId":"schema_0"},{"name":"filters[partner_order_id]","in":"query","required":false,"schemaId":"schema_0"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","422"],"pointer":"/orders","href":"orders/list-orders","openApiOperationId":"list-orders","summary":"List orders","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"A page of orders matching the filters.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4","headers":{}},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/list-orders"}],"panels":[]}]},"httpPath":"/orders"},{"label":"Retrieve an order","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/retrieve-an-order","routeSlug":"/apis/lastmile/orders/retrieve-an-order","metadata":{"seo":{"title":"Retrieve an order","description":"Retrieve a given order."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"retrieve-an-order","name":"Retrieve an order","deprecated":false,"isWebhook":false,"pointer":"/paths/~1orders~1{order_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve an order","isWebhook":false,"deprecated":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve a given order."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{order_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/orders/{order_id}","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","422"],"pointer":"/orders/{order_id}","href":"orders/retrieve-an-order","openApiOperationId":"retrieve-an-order","summary":"Retrieve an order","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}},"schemaId":"schema_5","headers":{}},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/retrieve-an-order"}],"panels":[]}]},"httpPath":"/orders/{order_id}"},{"label":"Update a pending order","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/update-a-pending-order","routeSlug":"/apis/lastmile/orders/update-a-pending-order","metadata":{"seo":{"title":"Update a pending order","description":"Updates an order. Can only be performed on orders that are still in the pending state."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"update-a-pending-order","name":"Update a pending order","isWebhook":false,"pointer":"/paths/~1orders~1{order_id}/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Update a pending order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Updates an order. Can only be performed on orders that are still in the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" state."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are the only attributes currently supported, and must be provided together."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When setting "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_mode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pre_paid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"0.0"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Otherwise "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" must be above 1."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Available payment modes are "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pre_paid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"paid_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cash_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"card_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are retired; they appear in inherited integrations, do not build against them."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{order_id}/put/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_6","exampleIds":["paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid","paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"]}},"schemaId":"schema_6","exampleIds":["paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid","paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"],"pointer":"/paths/~1orders~1{order_id}/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/orders/{order_id}","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_6","exampleIds":["paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid","paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"]}},"responseCodes":["200","422"],"pointer":"/orders/{order_id}","href":"orders/update-a-pending-order","openApiOperationId":"update-a-pending-order","summary":"Update a pending order","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"schemaId":"schema_6","exampleIds":["paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid","paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_6","exampleIds":["paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid","paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The body is the literal "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", sent with no "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Content-Type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" header. It is not the updated order. Re-read the order with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /orders/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" if you need the new values."},"children":[]}]}]}],"mediaType":"text/plain","mediaTypes":["text/plain"],"mediaTypeContent":{"text/plain":{"schemaId":"schema_7","exampleIds":["paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example"]}},"schemaId":"schema_7","exampleIds":["paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example"]},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}/put/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_7","exampleIds":["paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example"],"mediaTypes":["text/plain"],"mediaTypeContent":{"text/plain":{"schemaId":"schema_7","exampleIds":["paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example"]}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/update-a-pending-order"}],"panels":[]}]},"httpPath":"/orders/{order_id}"},{"label":"Retrieve order history","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/retrieve-order-history","routeSlug":"/apis/lastmile/orders/retrieve-order-history","metadata":{"seo":{"title":"Retrieve order history","description":"Every state an order has passed through, with timestamps. Available on staging and production at the matching base URL."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"retrieve-order-history","name":"Retrieve order history","isWebhook":false,"pointer":"/paths/~1orders~1{order_id}~1history/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Retrieve order history","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Every state an order has passed through, with timestamps. Available on staging and production at the matching base URL."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This is the only way to reconstruct transitions your webhook receiver missed. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /orders/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" returns the current state only."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":"The Quiqup order id returned on create.","required":true}],"pointer":"/paths/~1orders~1{order_id}~1history/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/orders/{order_id}/history","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","422"],"pointer":"/orders/{order_id}/history","href":"orders/retrieve-order-history","openApiOperationId":"retrieve-order-history","summary":"Retrieve order history","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order's state history, oldest first. A bare array, not wrapped in an object. It records transitions, so a freshly created order returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" does appear as a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"to_state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on orders that return to it, so do not assume the initial state is never logged."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_8"}},"schemaId":"schema_8"},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}~1history/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_8","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_8"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/retrieve-order-history"}],"panels":[]}]},"httpPath":"/orders/{order_id}/history"},{"label":"Mark an order ready for collection","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/mark-ready-for-collection","routeSlug":"/apis/lastmile/orders/mark-ready-for-collection","metadata":{"seo":{"title":"Mark an order ready for collection","description":"Make the order live and ready to be collected by our couriers."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"mark-ready-for-collection","name":"Mark an order ready for collection","deprecated":false,"isWebhook":false,"pointer":"/paths/~1orders~1{order_id}~1ready_for_collection/put","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Mark an order ready for collection","isWebhook":false,"deprecated":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Make the order live and ready to be collected by our couriers."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{order_id}~1ready_for_collection/put/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/orders/{order_id}/ready_for_collection","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["201","422"],"pointer":"/orders/{order_id}/ready_for_collection","href":"orders/mark-ready-for-collection","openApiOperationId":"mark-ready-for-collection","summary":"Mark an order ready for collection","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"The order was released.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}},"schemaId":"schema_5","headers":{}},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}~1ready_for_collection/put/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/mark-ready-for-collection"}],"panels":[]}]},"httpPath":"/orders/{order_id}/ready_for_collection"},{"label":"Add a parcel to a pending order","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/add-a-parcel-to-a-pending-order","routeSlug":"/apis/lastmile/orders/add-a-parcel-to-a-pending-order","metadata":{"seo":{"title":"Add a parcel to a pending order","description":"Can only be performed on a pending order."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"add-a-parcel-to-a-pending-order","name":"Add a parcel to a pending order","isWebhook":false,"pointer":"/paths/~1orders~1{order_id}~1parcels/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Add a parcel to a pending order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Can only be performed on a pending order."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{order_id}~1parcels/post/parameters"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"]}},"schemaId":"schema_9","exampleIds":["paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"],"pointer":"/paths/~1orders~1{order_id}~1parcels/post/requestBody","description":"The parcel to add."}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/orders/{order_id}/parcels","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"]}},"responseCodes":["200","422"],"pointer":"/orders/{order_id}/parcels","href":"orders/add-a-parcel-to-a-pending-order","openApiOperationId":"add-a-parcel-to-a-pending-order","summary":"Add a parcel to a pending order","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"schemaId":"schema_9","exampleIds":["paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_9","exampleIds":["paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"The new parcel, returned bare rather than wrapped in an order.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}},"schemaId":"schema_10"},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}~1parcels/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_10","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/add-a-parcel-to-a-pending-order"}],"panels":[]}]},"httpPath":"/orders/{order_id}/parcels"},{"label":"Remove a parcel from a pending order","deprecated":false,"httpVerb":"delete","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/remove-a-parcel-from-a-pending-order","routeSlug":"/apis/lastmile/orders/remove-a-parcel-from-a-pending-order","metadata":{"seo":{"title":"Remove a parcel from a pending order","description":"Can only be performed on a pending order. Can only be performed when there is another parcel attached to the order. Attempting to remove the last parcel from an order will result in an error."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"remove-a-parcel-from-a-pending-order","name":"Remove a parcel from a pending order","isWebhook":false,"pointer":"/paths/~1orders~1{order_id}~1parcels~1{parcel_id}/delete","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Remove a parcel from a pending order","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Can only be performed on a pending order.\nCan only be performed when there is another parcel attached to the order.\nAttempting to remove the last parcel from an order will result in an error."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true},{"name":"parcel_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The parcel id, returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.items[].id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1orders~1{order_id}~1parcels~1{parcel_id}/delete/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"DELETE","path":"/orders/{order_id}/parcels/{parcel_id}","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"},{"name":"parcel_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","422"],"pointer":"/orders/{order_id}/parcels/{parcel_id}","href":"orders/remove-a-parcel-from-a-pending-order","openApiOperationId":"remove-a-parcel-from-a-pending-order","summary":"Remove a parcel from a pending order","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}},"schemaId":"schema_10"},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1{order_id}~1parcels~1{parcel_id}/delete/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_10","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/remove-a-parcel-from-a-pending-order"}],"panels":[]}]},"httpPath":"/orders/{order_id}/parcels/{parcel_id}"},{"label":"Cancel orders","deprecated":false,"httpVerb":"put","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/cancel-pending-orders","routeSlug":"/apis/lastmile/orders/cancel-pending-orders","metadata":{"seo":{"title":"Cancel orders","description":"This endpoint cancels orders that are pending or ready_for_collection. Once a courier is on the way to collect, from out_for_collection onwards, it refuses; cancel those in Quiqdash."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"cancel-pending-orders","name":"Cancel orders","isWebhook":false,"pointer":"/paths/~1orders~1batch~1set_cancelled/put","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Cancel orders","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This endpoint cancels orders that are "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Once a courier is on the way to collect, from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"out_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" onwards, it refuses; cancel those in Quiqdash."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Call this endpoint with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PUT"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", you can pass an array of order IDs."},"children":[]}]}]}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_11"}},"schemaId":"schema_11","pointer":"/paths/~1orders~1batch~1set_cancelled/put/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"PUT","path":"/orders/batch/set_cancelled","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_11"}},"responseCodes":["201","422"],"pointer":"/orders/batch/set_cancelled","href":"orders/cancel-pending-orders","openApiOperationId":"cancel-pending-orders","summary":"Cancel orders","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"schemaId":"schema_11","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_11"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"201","description":"The orders that were cancelled.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_12","exampleIds":["paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1"]}},"schemaId":"schema_12","exampleIds":["paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1"]},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1orders~1batch~1set_cancelled/put/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"201","schemaId":"schema_12","exampleIds":["paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_12","exampleIds":["paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1"]}}},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/cancel-pending-orders"}],"panels":[]}]},"httpPath":"/orders/batch/set_cancelled"},{"label":"Download the AWB label","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/lastmile/orders/download-the-awb-document","routeSlug":"/apis/lastmile/orders/download-the-awb-document","metadata":{"seo":{"title":"Download the AWB label","description":"This endpoint takes a specific order ID as parameter and return the respective AWB document as pdf."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"download-the-awb-document","name":"Download the AWB label","deprecated":false,"isWebhook":false,"pointer":"/paths/~1order_label~1{order_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Download the AWB label","isWebhook":false,"deprecated":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"This endpoint takes a specific order ID as parameter and return the respective AWB document as pdf."},{"nodeType":"security","requirements":[{"schemes":[{"name":"bearerToken","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}]},{"schemes":[{"name":"oauthToken","scopes":[],"type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"order_id","in":"path","schemaId":"schema_0","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id returned as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order.id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when the order was created."},"children":[]}]}]}],"required":true}],"pointer":"/paths/~1order_label~1{order_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/order_label/{order_id}","servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"parameters":{"path":[{"name":"order_id","in":"path","required":true,"schemaId":"schema_0"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"bearerToken","type":"http","scheme":"bearer"}],"scopes":[]},{"schemes":[{"id":"oauthToken","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}}],"scopes":[]}],"responseCodes":["200","422"],"pointer":"/order_label/{order_id}","href":"orders/download-the-awb-document","openApiOperationId":"download-the-awb-document","summary":"Download the AWB label","securityGroups":[{"bearerToken":[]},{"oauthToken":[]}]},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"application/pdf"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" response is going to be returned."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"An order id that does not exist also returns "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"200 application/pdf"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", with a zero-byte body."},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" There is no 404 on this path. Check the content length before writing the response to a file."},"children":[]}]}]}],"headers":{}},{"code":"422","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Validation failed. See the "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ApiError"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" envelope."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}},"schemaId":"components/schemas/ApiError"}],"pointer":"/paths/~1order_label~1{order_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200"},{"code":"422","schemaId":"components/schemas/ApiError","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ApiError"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/orders/download-the-awb-document"}],"panels":[]}]},"httpPath":"/order_label/{order_id}"}],"content":{"contentType":"group","meta":{"name":"Orders"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Orders","showPageActions":true},{"nodeType":"markdoc","content":"Create, release, read, cancel and label last-mile orders."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/orders","summary":"Create an order","prefix":{"name":"post","color":"post"},"badges":[],"link":"/orders/create-an-order","deprecated":false},{"title":"/orders","summary":"List orders","prefix":{"name":"get","color":"get"},"badges":[],"link":"/orders/list-orders","deprecated":false},{"title":"/orders/{order_id}","summary":"Retrieve an order","prefix":{"name":"get","color":"get"},"badges":[],"link":"/orders/retrieve-an-order","deprecated":false},{"title":"/orders/{order_id}","summary":"Update a pending order","prefix":{"name":"put","color":"put"},"badges":[],"link":"/orders/update-a-pending-order","deprecated":false},{"title":"/orders/{order_id}/history","summary":"Retrieve order history","prefix":{"name":"get","color":"get"},"badges":[],"link":"/orders/retrieve-order-history","deprecated":false},{"title":"/orders/{order_id}/ready_for_collection","summary":"Mark an order ready for collection","prefix":{"name":"put","color":"put"},"badges":[],"link":"/orders/mark-ready-for-collection","deprecated":false},{"title":"/orders/{order_id}/parcels","summary":"Add a parcel to a pending order","prefix":{"name":"post","color":"post"},"badges":[],"link":"/orders/add-a-parcel-to-a-pending-order","deprecated":false},{"title":"/orders/{order_id}/parcels/{parcel_id}","summary":"Remove a parcel from a pending order","prefix":{"name":"delete","color":"delete"},"badges":[],"link":"/orders/remove-a-parcel-from-a-pending-order","deprecated":false},{"title":"/orders/batch/set_cancelled","summary":"Cancel orders","prefix":{"name":"put","color":"put"},"badges":[],"link":"/orders/cancel-pending-orders","deprecated":false},{"title":"/order_label/{order_id}","summary":"Download the AWB label","prefix":{"name":"get","color":"get"},"badges":[],"link":"/orders/download-the-awb-document","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/OrderWebhookEvent":{"id":"components/schemas/OrderWebhookEvent","kind":"json-schema","title":"OrderWebhookEvent","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The payload Quiqup POSTs to your webhook endpoint when an order changes state."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Registration, signature verification, timeouts, retries, replay and the receiver rules are documented once, in "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/webhooks"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Webhooks"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Read that page before building a receiver."},"children":[]}]}]}],"properties":{"action":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Always "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"update"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"type":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Always "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"order"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". The event name is not in the body; switch on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payload.state"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"sent_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When Quiqup dispatched the delivery, in UTC with a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", to the second. Not when the state changed."},"children":[]}]}]}]},"payload":{"type":"object","properties":{"id":{"type":"integer"},"client_order_id":{"type":"integer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The order id again, the same value as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"id"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"uuid":{"type":"string"},"state":{"type":"string"},"state_updated_at":{"type":"string","format":"date-time","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When the state changed, in UTC with a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Z"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and fractional seconds. Order events by this field."},"children":[]}]}]}]},"kind":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Can arrive empty in a webhook. Read the service from "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"service_kind"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"service_kind":{"type":"string","description":"The service the order was created with. See the Order Kinds table on the create-order operation."},"partner_order_id":{"type":"string","description":"Your reference. Empty for orders created in Quiqdash."},"external_order_id":{"type":"string"},"business_partner_id":{"type":"string","description":"The id of the account that owns the order. Use it to route events when one receiver serves several accounts."},"business_contact_id":{"type":"string"},"core_api_user_id":{"type":"integer"},"brand_name":{"type":"string"},"billing_identifier":{"type":["string","null"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Set only when the order was created with one. Otherwise empty or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"payment_mode":{"type":"string"},"payment_amount":{"type":"number","description":"A number here, where the API responses send it as a string."},"total_amount":{"type":"number"},"currency":{"type":"string"},"allowed_payment_types":{"type":"array","items":{"type":"string"}},"required_documents":{"type":"array","items":{"type":"string"}},"region":{"type":"string"},"region_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"submitted_at":{"type":"string","format":"date-time"},"scheduled_for":{"type":["string","null"],"format":"date-time"},"collection_after":{"type":["string","null"],"format":"date-time"},"collection_before":{"type":["string","null"],"format":"date-time"},"delivery_after":{"type":["string","null"],"format":"date-time"},"delivery_before":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"failed_at":{"type":["string","null"],"format":"date-time"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"collection_attempts":{"type":"integer"},"delivery_attempts":{"type":"integer"},"delivery_failure_reason":{"type":["string","null"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Empty or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"null"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" until a delivery fails."},"children":[]}]}]}]},"item_quantity_count":{"type":"integer"},"weight":{"type":"number"},"weight_unit":{"type":"string"},"fragile":{"type":"boolean"},"display_items_info":{"type":"boolean"},"sku_info":{"type":["string","null"]},"notes":{"type":["string","null"]},"metadata":{"type":"object"},"mission_id":{"type":"string"},"courier_id":{"type":"integer"},"otp_code":{"type":"string"},"tracking_url":{"type":"string"},"origin":{"$ref":"#/components/schemas/OrderWebhookWaypoint"},"destination":{"$ref":"#/components/schemas/OrderWebhookWaypoint"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A string, as on the create and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" responses."},"children":[]}]}]}]},"name":{"type":"string"},"quantity":{"type":"integer"},"sku":{"type":"string"},"weight":{"type":"number"},"parcel_barcode":{"type":"string"},"parcel_barcode_generated_by":{"type":"string"}}}}}}}}},"components/schemas/OrderWebhookWaypoint":{"id":"components/schemas/OrderWebhookWaypoint","kind":"json-schema","title":"OrderWebhookWaypoint","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"origin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"destination"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of an "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"OrderWebhookEvent"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Narrower than the waypoint on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"GET /orders/{order_id}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}],"properties":{"id":{"type":"integer"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"arrived_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"notes":{"type":["string","null"]},"signature":{"type":"object","properties":{"url":{"type":["string","null"]}}},"address":{"type":"object","properties":{"id":{"type":"integer"},"address1":{"type":"string"},"address2":{"type":["string","null"]},"town":{"type":["string","null"]},"building_name":{"type":["string","null"]},"apartment_number":{"type":["string","null"]},"country":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}}}}},"components/schemas/ApiError":{"id":"components/schemas/ApiError","kind":"json-schema","title":"ApiError","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The error envelope every "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/orders"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" operation returns. The same text is repeated across five keys. Two traps: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"http_status_code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" does not always match the HTTP status, and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"message"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can be an empty string."},"children":[]}]}]}],"properties":{"api_error":{"type":"object","properties":{"id":{"type":"integer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Quiqup error id. "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"1002"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is the generic validation error."},"children":[]}]}]}]},"code":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"generic_user"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"message":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The machine-ish string, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[origin] is missing"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Can be empty."},"children":[]}]}]}]},"human":{"type":"string"},"description":{"type":"string"},"http_status_code":{"type":"integer","description":"Does not always match the HTTP status. Trust the HTTP status."},"attribute_errors":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"}}},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This comes back as an array of "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"{detail}"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Older documentation shows a bare object instead. Handle both."},"children":[]}]}]}]}}},"error":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Same string as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"api_error.message"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"error_detail":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Same string as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"api_error.human"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]},"error_details":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"}}}},"errors":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"schema_0":{"kind":"json-schema","data":{"type":"string"},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"object","properties":{"kind":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The service. Defaults to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"partner_same_day"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when omitted. Fixed at creation: it cannot be changed afterwards."},"children":[]}]}]}]},"notes":{"type":"string"},"payment_amount":{"type":"number","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Omit or send 0 when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pre_paid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Above 1 when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"paid_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Decimals are accepted."},"children":[]}]}]}]},"payment_mode":{"type":"string","enum":["pre_paid","paid_on_delivery"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Defaults to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"pre_paid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" when omitted, with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"payment_amount"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"0.0"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"cash_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"card_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are retired as a matter of policy but are still accepted by the API; do not build against them."},"children":[]}]}]}]},"billing_identifier":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A billing account, not a pickup location. Omit it unless Quiqup set one up for you. A value that is not linked to your account is accepted and echoed back, and the order is created in your own account, so a typo is never reported. Check "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"brand_name"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on the response."},"children":[]}]}]}]},"scheduled_for":{},"metadata":{},"uuid":{"type":"string","format":"uuid","description":"Your idempotency key. Generate one per order and resend the same value on a retry. A repeat from the same account returns the original order with HTTP 200 and creates nothing. A malformed value, or one another account already used, is rejected with 422."},"partner_order_id":{"type":"string"},"required_documents":{"type":"array","items":{},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Only the empty array is accepted today. Any entry, a string or an object, is rejected with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[required_documents][0][order] is invalid"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Send "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", or leave the field out."},"children":[]}]}]}]},"origin":{"type":"object","properties":{"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"partner_order_id":{"type":"string"},"notes":{"type":"string"},"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"coords":{"type":"array","items":{"type":"number"}},"country":{"type":"string"},"town":{"type":"string"}},"required":["address1"]}},"required":["contact_name","contact_phone","address"]},"destination":{"type":"object","properties":{"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"contact_email":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Customer email. Required on international orders, where it is checked when the order is released rather than at create: an international order with no email is accepted by this call and rejected on "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"PUT /orders/{order_id}/ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Domestic orders do not need it. Quiqup sends no customer tracking emails today; the field is there for the export paperwork."},"children":[]}]}]}]},"partner_order_id":{"type":"string"},"share_tracking":{"type":"boolean"},"notes":{"type":"string"},"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"coords":{"type":"array","items":{"type":"number"}},"country":{"type":"string"},"town":{"type":"string"}},"required":["address1"]}},"required":["contact_name","contact_phone","address"]},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A label for the box, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Parcel 1"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Long names are not rejected at create but can make the order fail later. Keep it short."},"children":[]}]}]}]},"quantity":{"type":"integer","description":"Always 1. One entry is one parcel; do not use this as a count of boxes."},"parcel_barcode":{"type":"string","description":"Send an empty string. Quiqup generates the barcode and prints the label."}},"required":["name"]},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The parcels. One entry per physical box, bag or stash box. "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A label is generated per item"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", so each box can be tracked separately. The goods inside go in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"products"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", not here."},"children":[]}]}]}],"minItems":1},"products":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The goods being shipped. Optional for UAE orders, where it mainly gives support visibility of what is in the box. "},"children":[]},{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Required for export orders"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"hs_code"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"country_of_origin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"weight"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" and "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"selling_price"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" are what clear customs."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Products are not parcels. See "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"items"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" for the physical boxes. A label is generated per item, never per product."},"children":[]}]}]}],"items":{"type":"object","properties":{"sku":{"type":"string","description":"Your stock code. Not enforced at create, but a missing SKU is tied to orders erroring later. Send it."},"quantity":{"type":"integer","description":"How many of this SKU are in the shipment."},"description":{"type":"string","description":"The product name. Keep it to 18 characters. Nothing rejects a longer one at create, but export shipments go to several carriers and they do not agree on what they accept, so 18 is the safe ceiling."},"barcode":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The product's own barcode. Not the same as "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"items[].parcel_barcode"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", which belongs to the box."},"children":[]}]}]}]},"selling_price":{"type":"number","description":"Unit price in AED. Used as the customs value. Not printed on the label."},"hs_code":{"type":"string","description":"Harmonised System code. Required for export orders."},"country_of_origin":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"ISO 3166-1 alpha-2, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"CN"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Required for export orders."},"children":[]}]}]}]},"weight":{"type":"number","description":"Kilograms. Required for export orders. Weight lives on the product, not the parcel."},"height":{"type":"number","description":"Centimetres."},"width":{"type":"number","description":"Centimetres."},"length":{"type":"number","description":"Centimetres."}}}},"disallowed_payment_types":{"type":"array","items":{"type":"string"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Suppress a collection method on a "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"paid_on_delivery"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" order, for example "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"[\"cash\"]"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to force card."},"children":[]}]}]}]},"ready_for_collection":{"type":"boolean","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Set "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" to release the order without the separate call. Applied asynchronously: the create response still reports "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"state: pending"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and the order moves to "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"ready_for_collection"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" a moment later. Do not read the release back off the create response."},"children":[]}]}]}]}},"required":["origin","destination","items"]},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"object","properties":{"order":{"type":"object","properties":{"allowed_payment_types":{"type":"array","items":{"type":"string"}},"billing_identifier":{"type":["string","null"]},"brand_name":{"type":"string"},"collection_time":{"type":"object","properties":{"collection_after":{"type":"string"},"collection_before":{"type":"string"}}},"created_at":{"type":"string"},"current_internal_order_id":{},"delivery_attempts":{"type":"integer"},"delivery_failure_reason":{},"delivery_time":{"type":"object","properties":{"delivery_after":{"type":"string"},"delivery_before":{"type":"string"}}},"destination":{"type":"object","properties":{"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"apartment_number":{},"building_name":{},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"country":{"type":"string"},"id":{"type":"string","description":"Returned as a string."},"town":{"type":"string"}}},"arrived_at":{},"checked":{"type":"boolean"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"finished_at":{},"id":{"type":"string","description":"Returned as a string."},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"zone":{"type":"object","properties":{"parent":{},"parent_group":{},"sector":{"type":"string"}}}}},"display_items_info":{"type":"boolean"},"id":{"type":"integer"},"item_quantity_count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parcel_barcode":{"type":"string"},"parcel_barcode_generated_by":{"type":"string"},"quantity":{"type":"integer"},"weight":{}}}},"kind":{"type":"string"},"mission":{},"origin":{"type":"object","properties":{"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"apartment_number":{},"building_name":{},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"country":{"type":"string"},"id":{"type":"string"},"town":{"type":"string"}}},"arrived_at":{},"checked":{"type":"boolean"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"finished_at":{},"id":{"type":"string"},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"zone":{"type":"object","properties":{"parent":{"type":"string"},"parent_group":{"type":"string"},"sector":{"type":"string"}}}}},"partner_order_id":{"type":"string"},"payment_amount":{"type":"string"},"payment_mode":{"type":"string"},"region_name":{"type":"string"},"required_documents":{"type":"array","items":{"type":"object"}},"scheduled_for":{},"service_kind":{"type":"string"},"sku_info":{},"state":{"type":"string"},"state_updated_at":{"type":"string"},"submitted_at":{"type":"string"},"tracking_url":{"type":"string"},"user":{"type":"object","properties":{"email":{"type":"string"},"fullname":{"type":"string"},"id":{"type":"integer"}}},"uuid":{"type":"string"},"weight_kg":{}}}}},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"integer","format":"int32"},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"object","properties":{"current_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"},"results":{"type":"array","items":{"type":"object"}}}},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"object","properties":{"order":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"state":{"type":"string"},"state_updated_at":{"type":"string"},"kind":{"type":"string"},"service_kind":{"type":"string"},"scheduled_for":{},"submitted_at":{"type":"string"},"item_quantity_count":{"type":"integer"},"delivery_attempts":{"type":"integer"},"payment_mode":{"type":"string"},"payment_amount":{"type":"string"},"delivery_failure_reason":{},"required_documents":{"type":"array","items":{"type":"string"}},"partner_order_id":{"type":"string"},"allowed_payment_types":{"type":"array","items":{"type":"string"}},"tracking_url":{"type":"string"},"sku_info":{"type":"string"},"region_name":{"type":"string"},"created_at":{"type":"string"},"brand_name":{"type":"string"},"billing_identifier":{"type":["string","null"]},"origin":{"type":"object","properties":{"id":{"type":"string","description":"Returned as a string."},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"arrived_at":{},"finished_at":{},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"address":{"type":"object","properties":{"id":{"type":"string","description":"Returned as a string."},"address1":{"type":"string"},"address2":{},"town":{},"building_name":{},"apartment_number":{},"country":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}}}},"destination":{"type":"object","properties":{"id":{"type":"string","description":"Returned as a string."},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"arrived_at":{},"finished_at":{},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"address":{"type":"object","properties":{"id":{"type":"string","description":"Returned as a string."},"address1":{"type":"string"},"address2":{},"town":{},"building_name":{},"apartment_number":{},"country":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"quantity":{"type":"integer"},"parcel_barcode":{"type":"string"},"parcel_barcode_generated_by":{"type":"string"}}}}}}}},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"object","required":["payment_mode","payment_amount"],"properties":{"payment_mode":{"type":"string","enum":["pre_paid","paid_on_delivery"]},"payment_amount":{"type":"number","description":"0 when prepaid, above 1 for collection on delivery."}}},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"boolean"},"id":"schema_7"},"schema_8":{"kind":"json-schema","data":{"type":"array","items":{"type":"object","properties":{"to_state":{"type":"string"},"occurred_at":{"type":"string"},"author":{"type":"object","properties":{"email":{"type":["string","null"]},"fullname":{"type":["string","null"]},"role":{"type":["string","null"]}}},"custodian":{"type":"object","properties":{"custodian_name":{"type":["string","null"]},"custodian_type":{"type":["string","null"]}}},"delivery_metrics":{"type":"object","properties":{"calls":{"type":"integer"},"messages":{"type":"integer"}}},"events":{"type":"array","items":{"type":"object"}},"internal_order":{"type":["object","null"]},"on_hold_reason":{"type":["string","null"]},"reason":{"type":["string","null"]},"return_to_origin_reason":{"type":["string","null"]}}}},"id":"schema_8"},"schema_9":{"kind":"json-schema","data":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The parcel label. The only field this operation reads. A "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"quantity"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" of 2 is accepted and silently ignored, with the parcel created at quantity 1."},"children":[]}]}]}]}}},"id":"schema_9"},"schema_10":{"kind":"json-schema","data":{"type":"object","properties":{}},"id":"schema_10"},"schema_11":{"kind":"json-schema","data":{"type":"object","properties":{"order_ids":{"type":"array","items":{}}}},"id":"schema_11"},"schema_12":{"kind":"json-schema","data":{"type":"array","items":{"type":"object","properties":{"allowed_payment_types":{"type":"array","items":{"type":"string"}},"billing_identifier":{},"brand_name":{"type":"string"},"collection_time":{"type":"object","properties":{"collection_after":{},"collection_before":{}}},"created_at":{"type":"string"},"delivery_attempts":{"type":"integer"},"delivery_failure_reason":{},"destination":{"type":"object","properties":{"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"apartment_number":{},"building_name":{},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"country":{"type":"string"},"id":{"type":"string"},"town":{"type":"string"}}},"arrived_at":{},"checked":{"type":"boolean"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"finished_at":{},"id":{"type":"string"},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"zone":{"type":"object","properties":{"parent":{"type":"string"},"parent_group":{"type":"string"},"sector":{"type":"string"}}}}},"display_items_info":{"type":"boolean"},"id":{"type":"integer"},"item_quantity_count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parcel_barcode":{"type":"string"},"parcel_barcode_generated_by":{"type":"string"},"quantity":{"type":"integer"},"weight":{}}}},"kind":{"type":"string"},"mission":{},"origin":{"type":"object","properties":{"address":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"apartment_number":{},"building_name":{},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}},"country":{"type":"string"},"id":{"type":"string"},"town":{"type":"string"}}},"arrived_at":{},"checked":{"type":"boolean"},"contact_name":{"type":"string"},"contact_phone":{"type":"string"},"finished_at":{},"id":{"type":"string"},"notes":{"type":"string"},"signature":{"type":"object","properties":{"url":{}}},"tracking_token":{"type":"string"},"tracking_url":{"type":"string"},"zone":{"type":"object","properties":{"parent":{"type":"string"},"parent_group":{"type":"string"},"sector":{"type":"string"}}}}},"partner_order_id":{"type":"string"},"payment_amount":{"type":"string"},"payment_mode":{"type":"string"},"region_name":{"type":"string"},"required_documents":{"type":"array","items":{"type":"object","properties":{}}},"scheduled_for":{},"service_kind":{"type":"string"},"sku_info":{},"state":{"type":"string"},"state_updated_at":{"type":"string"},"submitted_at":{"type":"string"},"tracking_url":{"type":"string"},"user":{"type":"object","properties":{"email":{"type":"string"},"fullname":{"type":"string"},"id":{"type":"integer"}}},"uuid":{"type":"string"}}}},"id":"schema_12"}},"exampleStore":{"paths/~1orders/post/requestBody/content/application~1json/examples/default":{"value":{"kind":"partner_same_day","payment_mode":"pre_paid","partner_order_id":"PARTNER-ORDER-ID","origin":{"contact_name":"Warehouse contact","contact_phone":"+971500000000","address":{"address1":"Example Warehouse, Street 1","address2":"Al Quoz Industrial Area 4","country":"UAE","town":"Dubai"}},"destination":{"contact_name":"Customer name","contact_phone":"+971599999999","contact_email":"customer@example.com","notes":"","address":{"address1":"1st Road","address2":"104G","country":"UAE","town":"Dubai"}},"products":[{"sku":"SKU-RUN-001","quantity":1,"description":"Running shoe red","barcode":"1234654-kt","selling_price":58.3,"hs_code":"64041100","country_of_origin":"CN","weight":0.8,"height":12,"width":20,"length":30}],"items":[{"name":"Parcel 1","quantity":1,"parcel_barcode":""}]},"key":"default","summary":"The payload Quiqup support sends","id":"paths/~1orders/post/requestBody/content/application~1json/examples/default"},"paths/~1orders/post/responses/201/content/application~1json/examples/Example 1":{"value":{"order":{"allowed_payment_types":["cash","card"],"billing_identifier":null,"brand_name":"Example Brand","collection_time":{"collection_after":"2022-12-16T16:30:00.000+04:00","collection_before":"2022-12-16T18:30:00.000+04:00"},"created_at":"2022-12-16T15:53:40.000+04:00","delivery_attempts":0,"delivery_time":{"delivery_after":"2022-12-16T15:53:40.000+04:00","delivery_before":"2022-12-17T23:00:00.000+04:00"},"destination":{"address":{"address1":"Sample building, Sample street","address2":"Al Musalla","coordinates":{"lat":25.3463,"lng":55.4209},"country":"UAE","id":"2000001","town":"Sharjah"},"checked":true,"contact_name":"Sample Customer","contact_phone":"+971500000001","id":"3000001","notes":"","signature":{},"tracking_token":"00000000000000000000000000000001","tracking_url":"https://track-ae.quiqup.com/00000000000000000000000000000001","zone":{"sector":"Sharjah 1"}},"display_items_info":false,"id":10000001,"item_quantity_count":1,"items":[{"id":"4000001","name":"Parcel 1","quantity":1,"parcel_barcode":"10000001-1"}],"kind":"partner_same_day","origin":{"address":{"address1":"Example Warehouse, Street 1","address2":"Al Quoz Industrial Area 4","coordinates":{"lat":25.135,"lng":55.23},"country":"UAE","id":"2000002","town":"Dubai"},"checked":true,"contact_name":"example-merchant","contact_phone":"+971500000002","id":"3000002","notes":"","signature":{},"tracking_token":"00000000000000000000000000000002","tracking_url":"https://track-ae.quiqup.com/00000000000000000000000000000002","zone":{"parent":"Al Quoz","parent_group":"Industrial","sector":"Al Quoz Industrial 4"}},"partner_order_id":"PARTNER-ORDER-ID","payment_amount":"0.0","payment_mode":"pre_paid","region_name":"Dubai","required_documents":[],"state":"pending","state_updated_at":"2022-12-16T15:53:40.000+04:00","submitted_at":"2022-12-16T15:53:40.000+04:00","tracking_url":"https://track-parcel.quiqup.com/00000000-0000-4000-8000-000000000001","user":{"email":"merchant@example.com","fullname":"Sample Merchant","id":15},"uuid":"00000000-0000-4000-8000-000000000001"}},"key":"Example 1","summary":"Example 1","id":"paths/~1orders/post/responses/201/content/application~1json/examples/Example 1"},"paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid":{"value":{"payment_mode":"pre_paid","payment_amount":0},"key":"prepaid","summary":"Switch to prepaid","id":"paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/prepaid"},"paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod":{"value":{"payment_mode":"paid_on_delivery","payment_amount":20},"key":"cod","summary":"Switch to collection on delivery","id":"paths/~1orders~1{order_id}/put/requestBody/content/application~1json/examples/cod"},"paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example":{"value":true,"id":"paths/~1orders~1{order_id}/put/responses/200/content/text~1plain/example"},"paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default":{"value":{"name":"Example"},"key":"default","summary":"default","id":"paths/~1orders~1{order_id}~1parcels/post/requestBody/content/application~1json/examples/default"},"paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1":{"value":[{"allowed_payment_types":["card"],"brand_name":"Example Brand","collection_time":{},"created_at":"2022-11-25T17:57:46.000+04:00","delivery_attempts":0,"destination":{"address":{"address1":"1st Road","address2":"104G","coordinates":{"lat":25.056,"lng":55.1631},"country":"UAE","id":"2000003","town":"Dubai"},"checked":false,"contact_name":"Customer name","contact_phone":"+971599999999","id":"3000003","notes":"","signature":{},"tracking_token":"00000000000000000000000000000003","tracking_url":"https://track.staging.quiqup.com/00000000000000000000000000000003","zone":{"parent":"Emirates Hills","parent_group":"Center-south","sector":"Jumeirah Islands"}},"display_items_info":false,"id":10000002,"item_quantity_count":1,"items":[{"id":"4000002","name":"Item's name here","parcel_barcode":"MY-LABEL-0001","parcel_barcode_generated_by":"partner","quantity":1}],"kind":"partner_same_day","origin":{"address":{"address1":"Example Warehouse, Street 1","address2":"Al Quoz Industrial Area 4","coordinates":{"lat":25.135,"lng":55.23},"country":"UAE","id":"2000004","town":"Dubai"},"checked":false,"contact_name":"Warehouse contact","contact_phone":"+971599999999","id":"3000004","notes":"","signature":{},"tracking_token":"00000000000000000000000000000004","tracking_url":"https://track.staging.quiqup.com/00000000000000000000000000000004","zone":{"parent":"Emirates Hills","parent_group":"Center-south","sector":"Jumeirah Islands"}},"partner_order_id":"PARTNER-ORDER-ID","payment_amount":"10.0","payment_mode":"paid_on_delivery","region_name":"Dubai","required_documents":[],"service_kind":"partner_same_day","state":"cancelled","state_updated_at":"2022-12-08T17:45:14.000+04:00","submitted_at":"2022-11-25T17:57:46.000+04:00","tracking_url":"https://track-parcel.staging.quiqup.com/00000000-0000-4000-8000-000000000002","user":{"email":"merchant@example.com","fullname":"Sample User","id":15},"uuid":"00000000-0000-4000-8000-000000000002"}],"key":"Example 1","summary":"Example 1","id":"paths/~1orders~1batch~1set_cancelled/put/responses/201/content/application~1json/examples/Example 1"}},"securitySchemeStore":{"oauthToken":{"id":"oauthToken","type":"oauth2","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Client credentials, issued by Quiqup on request. Only needed by platforms whose setup screens require a Client ID and Client Secret."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The token URL follows the environment: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api.staging.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on staging, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://api-ae.quiqup.com/oauth/token"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" on production."},"children":[]}]}]}],"flows":{"clientCredentials":{"tokenUrl":"https://api.staging.quiqup.com/oauth/token","scopes":{}}}},"bearerToken":{"id":"bearerToken","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"A Bearer token generated in Quiqdash under Organization > API keys. The usual path."},"children":[]}]}]}]}},"servers":[{"url":"https://api.staging.quiqup.com","description":"Staging. Build and test here."},{"url":"https://api-ae.quiqup.com","description":"Production. Real couriers, real charges."}],"specType":"openapi"},"options":{"mockServer":{"off":true},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/apis/lastmile.json?download"},{"url":"/_bundle/apis/lastmile.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Last-mile API","description":"This is the last-mile API: collection from a pickup point and delivery to a\ncustomer. If Quiqup holds your stock and picks it, you want the Fulfilment API instead. See\n[Which API do I need](/docs/choose).\n\nThe object you work with is the `order`. You will be creating orders through our Order API, these orders will follow a certain status life cycle, documented in [Order lifecycle](/docs/order-lifecycle).\n\n## The basics\nOur APIs are RESTful based and follow the below principles:\n\n* Accessible on staging through: https://api.staging.quiqup.com and on production through: https://api-ae.quiqup.com\n* It uses standard HTTP verbs like GET, POST, PUT and DELETE\n* Uses standard HTTP error responses to describe errors, for example: \n```json\n{\n    \"api_error\": {\n        \"id\": 1002,\n        \"code\": \"Error Code\",\n        \"message\": \"Error Message\",\n        \"human\": \"Human readable error message\",\n        \"description\": \"Detailed human readable error description\",\n        \"http_status_code\": 400,\n        \"attribute_errors\": [\n            { \"detail\": \"additional error code\" }\n        ]\n    }\n}\n```\n\n* Authentication and authorization are based on the OAuth 2.0 standard\n* All communication with our servers must be over SSL (https://), otherwise it will fail\n* POST data must be encoded as application/json\n* Most responses are encoded as application/json. Two are not: `GET /order_label/{order_id}` returns\na PDF, and `PUT /orders/{order_id}` returns the literal `true` with no `Content-Type` header at all.\nCheck the content type before parsing.\n\n## Typical flow\nA typical order flow:\n1. Get a Bearer token. Generate one yourself in Quiqdash, or, if you hold a `client_id` and `client_secret`, exchange them at `POST /oauth/token`, see the Auth reference.\n2. Create a pending order using `POST /orders`, see details in this reference.\n3. Mark the order as `ready_for_collection` using `PUT /orders/{order_id}/ready_for_collection`, see details in this reference. \n    1. There is an option to skip this step and directly create the orders in a ready for collection state, however the orders do actually need to be ready for collection. \n    2. Using this step option will thus depend on how the picking and packing process works.\n4. Request an order label by using: `GET /order_label/{order_id}` see details in this reference. This label needs to be saved as a PDF document, printed and used to label the order. The barcode on this label will be used by the couriers and our warehouse staff to scan the orders and keep you updated on the order status. The label can be downloaded before or after step 3.\n5. Order state updates, once the order has been placed it will go through various states (see [Order lifecycle](/docs/order-lifecycle)). There are two options on how you can receive updates on this:\n    1. These can be received in realtime through webhooks, see [Webhooks](/docs/webhooks)\n    2. Alternatively you can get the order state from GET /orders/{order_id}, see in this reference for details. "}},"baseSlug":"/apis/lastmile","routesMapping":{}}