{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial"]},"type":"markdown"},"seo":{"title":"Error responses"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"error-responses","__idx":0},"children":["Error responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applies to both APIs."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The two return different error shapes, and an integration that spans both has to handle both."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A connector wraps all of this in its own message, so what you see on the Integration Orders page is a reason string, not an HTTP error. ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/lastmile/integration-orders"},"children":["That page"]}," is the right one."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-two-envelopes","__idx":1},"children":["The two envelopes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Credentials, order states and webhooks are shared. Error shapes are not: the two APIs use completely different envelopes."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Last-mile"},"children":["Last-mile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fulfilment"},"children":["Fulfilment"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Host"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api-ae.quiqup.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["platform-api.quiqup.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Top-level key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Field errors"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attribute_errors"]},", an array of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{detail}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.fields"]},", an array of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{field, message}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Names the bad field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you call both, write two error handlers. Branch on the host, not on trying to parse one shape and falling back to the other."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"fulfilment-errors","__idx":2},"children":["Fulfilment errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," carry the error code, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," carries a sentence, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.type"]}," says what kind of failure it was."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": \"invalid_argument\",\n  \"code\": \"invalid_argument\",\n  \"message\": \"Invalid Input\",\n  \"details\": {\n    \"type\": \"input\",\n    \"fields\": [\n      { \"field\": \"name\", \"message\": \"required\" },\n      { \"field\": \"email\", \"message\": \"email\" },\n      { \"field\": \"address.street\", \"message\": \"required\" }\n    ]\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.fields"]}," names the field that failed, using dotted paths for nested objects. Read it and show it to the user. This is the part last-mile does not have."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"fulfilment-error-codes","__idx":3},"children":["Fulfilment error codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"HTTP"},"children":["HTTP"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"details.type"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["details.type"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invalid_argument"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["input"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["400"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["failed_precondition"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthenticated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["unauthorized"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["permission_denied"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["forbidden"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["not_found"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["not_found"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["already_exists"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["429"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resource_exhausted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["499"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canceled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integration"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data_loss"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["500"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unknown"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["503"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unavailable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["504"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deadline_exceeded"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["internal"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The list is not exhaustive and more codes are added over time. Branch on the HTTP status and treat an unrecognised ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," as its status class."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"last-mile-errors","__idx":4},"children":["Last-mile errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Which shape you get depends on the endpoint and on how early the request was rejected."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"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\": [ { \"detail\": \"additional error code\" } ]\n} }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"error\": \"invalid_client\" }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"error\": \"unauthorized\" }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"result\": 103, \"level\": \"error\", \"message\": \"00001 is an invalid postcode\" }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"which-last-mile-endpoint-returns-which","__idx":5},"children":["Which last-mile endpoint returns which"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Endpoint"},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Envelope"},"children":["Envelope"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/orders"]}," operation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error"]}," shape, sent alongside four more keys carrying the same two strings: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errors[0].detail"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_details[0].detail"]}," repeat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.message"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_detail"]}," repeats ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.human"]},". Read ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," for the machine-ish string and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.human"]}," for the sentence."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /oauth/token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"error\": \"invalid_client\", \"error_description\": \"...\" }"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any endpoint, missing or expired token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP 401 with a bare ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"error\": \"unauthorized\" }"]},". The request is rejected before the payload is read, so there is no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last shape above, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"result\", \"level\", \"message\" }"]},", does not come from any ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/orders"]}," endpoint. It exists elsewhere on the platform, so handle it defensively if you meet it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Three things about the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error"]}," shape will catch you out."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.http_status_code"]}," does not always match the HTTP status. A create with an invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["items"]}," array comes back as HTTP ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["400"]}," carrying ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http_status_code: 422"]},". Trust the HTTP status."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.message"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}," are sometimes ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["empty strings"]},". An invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_mode"]},", and an invalid ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]},", both return 422 with every message field blank. There is nothing in the response telling you which field was wrong."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attribute_errors"]}," comes back as an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["array"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{detail}"]},". Some older Quiqup material shows it as a bare object. The array is what the API sends."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The five fields are not independent. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errors[0].detail"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_details[0].detail"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.message"]}," all carry the same string, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_detail"]}," repeats ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api_error.human"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"validation-errors-on-order-creation","__idx":6},"children":["Validation errors on order creation"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Message"},"children":["Message"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'dropoff.address1' must not be blank"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination.address.address1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error messages say ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dropoff"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pickup"]},"; the request fields are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["origin"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Validation failed: Postcode can't be blank"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["none"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["There is no postcode field in the contract."]}," See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/lastmile/create-an-order#address-object"},"children":["Create an order"]}," before acting on this."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unknown servicekind: \"...\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["kind"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use a value from ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/order-lifecycle#service-types"},"children":["Service types"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[order][billing_identifier] invalid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["billing_identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP 400. The identifier could not be resolved. Retry once, then ask support. An identifier that simply is not linked to your account does ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," produce this: it is accepted and ignored, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/lastmile/create-an-order#billing_identifier"},"children":["billing_identifier"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Same day service is not enabled for your account"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["kind"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422. Same Day is not enabled on the account. Ask your account manager."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[origin] is missing, [destination] is missing, [items] is missing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["those three"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422. The three top-level objects the API actually requires."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[destination][address][address1] is missing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination.address.address1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422. Required on both stops."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[order][items] invalid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["items"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP 400. An ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["items"]}," entry with no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[payment_amount] is missing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422 from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /orders/{order_id}"]},". The two payment fields must be sent together."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["(empty string)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_mode"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422 with no message at all. One of those two values is not in the allowed set."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CanSubmitJobPolicy failed policy check"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["any"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["See below."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cansubmitjobpolicy-failed-policy-check","__idx":7},"children":["CanSubmitJobPolicy failed policy check"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["One string covers several unrelated commercial restrictions. None of them are payload bugs, so debugging your request will not help."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Restriction"},"children":["Restriction"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Who lifts it"},"children":["Who lifts it"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Does retrying later work?"},"children":["Does retrying later work?"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer segmentation rule"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account manager"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tier closed"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account manager"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quiqdash closed for high demand"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operations"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hourly order limit reached"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account manager"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes, after the window resets"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["3PL (third-party logistics partner) not accepting orders"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operations"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"missing-orders-do-not-give-you-a-404","__idx":8},"children":["Missing orders do not give you a 404"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Case"},"children":["Case"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What actually happens"},"children":["What actually happens"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /orders/{order_id}"]}," on an id that does not exist"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["403"]},", not 404. It reads like an authentication problem and is not."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /order_label/{order_id}"]}," on an id that does not exist"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["200"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type: application/pdf"]},", and a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["zero-byte body"]},". Nothing tells you the order is missing. Check the content length before writing the response to a file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An update endpoint returns 404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wrong HTTP method for that path. The update operation is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /orders/{order_id}"]},", not ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A label request 404s"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the path. The label endpoint is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /order_label/{order_id}"]}]},". A path built under the order resource does not exist."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5xx","__idx":9},"children":["5xx"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both APIs. Malformed payloads can surface as 500 rather than 422 on the last-mile ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /orders"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /orders/{order_id}/ready_for_collection"]},". Validate your payload shape before assuming an outage."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If it persists, send the exact request, the exact response and the UTC timestamp to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:apisupport@quiqup.com"},"children":["apisupport@quiqup.com"]},"."]}]},"headings":[{"value":"Error responses","id":"error-responses","depth":1},{"value":"The two envelopes","id":"the-two-envelopes","depth":2},{"value":"Fulfilment errors","id":"fulfilment-errors","depth":2},{"value":"Fulfilment error codes","id":"fulfilment-error-codes","depth":3},{"value":"Last-mile errors","id":"last-mile-errors","depth":2},{"value":"Which last-mile endpoint returns which","id":"which-last-mile-endpoint-returns-which","depth":3},{"value":"Validation errors on order creation","id":"validation-errors-on-order-creation","depth":3},{"value":"CanSubmitJobPolicy failed policy check","id":"cansubmitjobpolicy-failed-policy-check","depth":3},{"value":"Missing orders do not give you a 404","id":"missing-orders-do-not-give-you-a-404","depth":3},{"value":"5xx","id":"5xx","depth":2}],"frontmatter":{"seo":{"title":"Error responses"}},"lastModified":"2026-10-16T10:23:15.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/errors","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}