{"openapi":"3.0.3","info":{"title":"GB Cargo Partner API","version":"1.0.0","description":"All money is an integer number of pence (GBP). All codes (errors, statuses, scopes, events) are stable and language-independent; human text is in `message` (en by default, vi with Accept-Language: vi or ?lang=vi). Errors: { ok:false, error, message, request_id }. Pagination: cursor + limit (max 200), response { data, next_cursor, has_more }. Rate limit per key (X-RateLimit-Limit/Remaining/Reset, Retry-After on 429). Mutating POSTs accept Idempotency-Key. Webhooks: see x-webhooks."},"servers":[{"url":"https://cargo.gbglobal.trade/api/v1"}],"tags":[{"name":"System"},{"name":"Rates"},{"name":"Quotes"},{"name":"Tracking"},{"name":"Orders"},{"name":"Payments"},{"name":"Addresses"},{"name":"Ledger"},{"name":"Batches"},{"name":"Webhooks"}],"paths":{"/openapi.json":{"get":{"tags":["System"],"summary":"OpenAPI 3 document. Public copy omits admin/staff endpoints; send a valid Bearer key with an admin:/staff: scope for the full document","operationId":"get__openapi_json","security":[],"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found"}}}},"/me":{"get":{"tags":["System"],"summary":"Describe the calling API key (scopes, partner, expiry, limits)","operationId":"get__me","security":[{"bearerAuth":[]}],"x-required-scope":null,"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/rates":{"get":{"tags":["Rates"],"summary":"Current published rates for all routes","operationId":"get__rates","security":[{"bearerAuth":[]}],"x-required-scope":"rates:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/quotes":{"post":{"tags":["Quotes"],"summary":"Price a shipment (no order is created)","operationId":"post__quotes","security":[{"bearerAuth":[]}],"x-required-scope":"quotes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/tracking/{code}":{"get":{"tags":["Tracking"],"summary":"Public tracking (6 milestones) for a GBT-... code","operationId":"get__tracking_code","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"tracking:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/tracking/search":{"post":{"tags":["Tracking"],"summary":"Look up up to 50 tracking codes at once","operationId":"post__tracking_search","security":[{"bearerAuth":[]}],"x-required-scope":"tracking:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingSearch"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/tracking/updates":{"post":{"tags":["Tracking"],"summary":"Carrier pushes a status update (same rules as POST /api/v1/partner/status)","operationId":"post__tracking_updates","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"tracking:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingUpdate"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders":{"post":{"tags":["Orders"],"summary":"Create an order (optionally confirm it; on-account accounts are charged to the ledger)","operationId":"post__orders","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"get":{"tags":["Orders"],"summary":"List own orders (cursor pagination, limit <= 200; filters status, route, from, to, q)","operationId":"get__orders","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"route","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}":{"get":{"tags":["Orders"],"summary":"Order detail by numeric id or code GBG-...","operationId":"get__orders_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"patch":{"tags":["Orders"],"summary":"Edit a DRAFT order (partial update)","operationId":"patch__orders_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"delete":{"tags":["Orders"],"summary":"Delete a DRAFT order","operationId":"delete__orders_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:write","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}/confirm":{"post":{"tags":["Orders"],"summary":"Confirm a draft (on_account: ledger debit, blocked above credit limit)","operationId":"post__orders_id_confirm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderConfirm"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}/cancel":{"post":{"tags":["Orders"],"summary":"Cancel an order that has not been received yet (ledger charges are credited back)","operationId":"post__orders_id_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"orders:write","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}/payments":{"get":{"tags":["Payments"],"summary":"Payments, amount outstanding and bank transfer details of an order","operationId":"get__orders_id_payments","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"payments:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}/payments/report":{"post":{"tags":["Payments"],"summary":"Report that the bank transfer has been made","operationId":"post__orders_id_payments_report","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"payments:write","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/orders/{id}/payments/card":{"post":{"tags":["Payments"],"summary":"Start a hosted card checkout; returns the URL to pay","operationId":"post__orders_id_payments_card","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"payments:write","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/addresses":{"get":{"tags":["Addresses"],"summary":"List saved addresses","operationId":"get__addresses","security":[{"bearerAuth":[]}],"x-required-scope":"addresses:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"post":{"tags":["Addresses"],"summary":"Save an address","operationId":"post__addresses","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"addresses:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/addresses/{id}":{"get":{"tags":["Addresses"],"summary":"Get an address","operationId":"get__addresses_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"addresses:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"put":{"tags":["Addresses"],"summary":"Update an address","operationId":"put__addresses_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"addresses:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"delete":{"tags":["Addresses"],"summary":"Delete an address","operationId":"delete__addresses_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"addresses:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/ledger":{"get":{"tags":["Ledger"],"summary":"Own balance, credit limit and ageing (0-30 / 31-60 / 60+ days)","operationId":"get__ledger","security":[{"bearerAuth":[]}],"x-required-scope":"ledger:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/ledger/statement":{"get":{"tags":["Ledger"],"summary":"Own statement (date filter, cursor; format=csv needs from+to)","operationId":"get__ledger_statement","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"ledger:read","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/batches":{"get":{"tags":["Batches"],"summary":"List batches (latest 100)","operationId":"get__batches","security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"post":{"tags":["Batches"],"summary":"Create a batch","operationId":"post__batches","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120},"description":"Same key + same body replays the first response (48 h); same key + different body = 422 idempotency_key_reuse"}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/batches/{id}":{"get":{"tags":["Batches"],"summary":"Batch with its orders","operationId":"get__batches_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"patch":{"tags":["Batches"],"summary":"Rename / change note","operationId":"patch__batches_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"delete":{"tags":["Batches"],"summary":"Delete an EMPTY batch","operationId":"delete__batches_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/batches/{id}/orders":{"post":{"tags":["Batches"],"summary":"Add orders by code (GBG-..., GBT-... or partner tracking)","operationId":"post__batches_id_orders","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAdd"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/batches/{id}/status":{"post":{"tags":["Batches"],"summary":"Move every order in the batch to a status (per-order result)","operationId":"post__batches_id_status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"batches:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusRequest"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List own webhook endpoints","operationId":"get__webhooks","security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"post":{"tags":["Webhooks"],"summary":"Register an https endpoint; the signing secret is shown once","operationId":"post__webhooks","security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Endpoint detail","operationId":"get__webhooks_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"patch":{"tags":["Webhooks"],"summary":"Update url / events / name / active","operationId":"patch__webhooks_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}},"delete":{"tags":["Webhooks"],"summary":"Delete an endpoint and its history","operationId":"delete__webhooks_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks/{id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Issue a new signing secret (shown once)","operationId":"post__webhooks_id_rotate_secret","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Queue a webhook.ping delivery","operationId":"post__webhooks_id_test","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks/{id}/deliveries":{"get":{"tags":["Webhooks"],"summary":"Delivery history (cursor)","operationId":"get__webhooks_id_deliveries","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/webhooks/{id}/deliveries/{did}/redeliver":{"post":{"tags":["Webhooks"],"summary":"Send a past delivery again","operationId":"post__webhooks_id_deliveries_did_redeliver","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"did","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"x-required-scope":"webhooks:rw","responses":{"200":{"description":"OK. JSON { ok: true, ..., request_id } (or CSV/PDF for those endpoints)"},"201":{"description":"Created"},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"invalid_api_key / api_key_expired"},"403":{"description":"insufficient_scope / ip_not_allowed / partner_required"},"404":{"description":"not_found"},"429":{"description":"rate_limited (see Retry-After, X-RateLimit-*)"}}}},"/partner/status":{"post":{"tags":["Tracking"],"summary":"LEGACY carrier status update (kept for existing integrations; prefer POST /tracking/updates)","operationId":"post_partner_status","security":[{"bearerAuth":[]}],"x-required-scope":"tracking:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingUpdate"}}}},"responses":{"200":{"description":"{ ok: true, unchanged?: true }"},"400":{"description":"tracking_code_required | invalid_status | invalid_occurred_at"},"401":{"description":"invalid_api_key"},"403":{"description":"insufficient_scope"},"404":{"description":"unknown_tracking_code"},"409":{"description":"invalid_transition"},"429":{"description":"rate_limited"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key gbk_... created by an administrator. Each key has scopes."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"string","description":"Stable machine-readable code (see x-error-codes)"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["ok","error","request_id"]},"QuoteRequest":{"type":"object","properties":{"route":{"type":"string","enum":["UK_VN_HN","UK_VN_HCM","VN_UK","UK_UK"]},"parcels":{"type":"array","maxItems":20,"items":{"type":"object","required":["kg","l_cm","w_cm","h_cm"],"properties":{"kg":{"type":"number","minimum":0.1,"maximum":70},"l_cm":{"type":"number","maximum":200},"w_cm":{"type":"number","maximum":200},"h_cm":{"type":"number","maximum":200}}}},"hours":{"type":"number","description":"UK_UK only (0.5-24)"},"options":{"type":"array","items":{"type":"string"}},"insured_value_pence":{"type":"integer","minimum":0,"description":"Pence (GBP minor unit), integer"}},"required":["route"]},"TrackingSearch":{"type":"object","properties":{"codes":{"type":"array","maxItems":50,"items":{"type":"string"}}},"required":["codes"]},"TrackingUpdate":{"type":"object","properties":{"tracking_code":{"type":"string","description":"Public GBT-... code, or the partner tracking already linked to your key/carrier"},"status":{"type":"string","enum":["dispatched","in_transit","customs","at_destination","out_for_delivery","delivered","on_hold","returned","lost"]},"note":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"}},"required":["tracking_code","status"]},"OrderCreate":{"type":"object","properties":{"route":{"type":"string","enum":["UK_VN_HN","UK_VN_HCM","VN_UK","UK_UK"]},"parcels":{"type":"array","items":{"type":"object","required":["kg","l_cm","w_cm","h_cm"],"properties":{"kg":{"type":"number","minimum":0.1,"maximum":70},"l_cm":{"type":"number","maximum":200},"w_cm":{"type":"number","maximum":200},"h_cm":{"type":"number","maximum":200}}}},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"qty":{"type":"integer","minimum":1},"value_pence":{"type":"integer","minimum":0,"description":"Pence (GBP minor unit), integer"}},"required":["description","qty"]}},"hours":{"type":"number"},"booking_at":{"type":"string","description":"UK_UK only, London local time YYYY-MM-DDTHH:mm"},"sender":{"type":"object","required":["name","phone","line1","city"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string","description":"UK postcode required when the side is in the UK"},"country":{"type":"string"}}},"receiver":{"type":"object","required":["name","phone","line1","city"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string","description":"UK postcode required when the side is in the UK"},"country":{"type":"string"}}},"options":{"type":"array","items":{"type":"string"}},"insured_value_pence":{"type":"integer","minimum":0,"description":"Pence (GBP minor unit), integer"},"notes":{"type":"string"},"ack_prohibited":{"type":"boolean","description":"Required (true) for international routes"},"external_ref":{"type":"string","maxLength":80},"confirm":{"type":"boolean","default":false},"payment_method":{"type":"string","enum":["on_account","bank"],"description":"Default on_account when the account has on-account billing enabled"}},"required":["route"]},"OrderConfirm":{"type":"object","properties":{"payment_method":{"type":"string","enum":["on_account","bank"]}}},"Address":{"type":"object","required":["name","phone","line1","city"],"properties":{"name":{"type":"string"},"phone":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string","description":"UK postcode required when the side is in the UK"},"country":{"type":"string"}}},"StatusRequest":{"type":"object","properties":{"to":{"type":"string"},"public_note":{"type":"string"},"internal_note":{"type":"string"}},"required":["to"]},"Batch":{"type":"object","properties":{"name":{"type":"string"},"note":{"type":"string"}}},"BatchAdd":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"}}},"required":["codes"]},"WebhookCreate":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri","description":"Public https URL (private/loopback addresses are rejected)"},"events":{"type":"array","items":{"type":"string","enum":["order.created","order.status_changed","payment.received","order.cancelled","ledger.entry"]},"description":"Empty/omitted = all events"}},"required":["name","url"]},"WebhookPatch":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["order.created","order.status_changed","payment.received","order.cancelled","ledger.entry"]}},"active":{"type":"boolean"}}}}},"x-scopes":["rates:read","quotes:write","tracking:read","tracking:write","orders:read","orders:write","payments:read","payments:write","addresses:rw","ledger:read","webhooks:rw","batches:rw"],"x-error-codes":{"invalid_api_key":{"http":401,"en":"Missing or invalid API key.","vi":"Thiếu hoặc sai khóa API."},"api_key_expired":{"http":401,"en":"API key has expired.","vi":"Khóa API đã hết hạn."},"ip_not_allowed":{"http":403,"en":"Request IP is not in the key allowlist.","vi":"IP không nằm trong danh sách cho phép của khóa."},"partner_inactive":{"http":403,"en":"Partner account is disabled.","vi":"Tài khoản đối tác đã bị tắt."},"insufficient_scope":{"http":403,"en":"The API key lacks the required scope.","vi":"Khóa API không có quyền (scope) cần thiết."},"partner_required":{"http":403,"en":"This key is not linked to a partner.","vi":"Khóa này chưa gắn với đối tác."},"rate_limited":{"http":429,"en":"Too many requests.","vi":"Quá nhiều yêu cầu."},"not_found":{"http":404,"en":"Resource not found.","vi":"Không tìm thấy."},"bad_json":{"http":400,"en":"Request body is not valid JSON.","vi":"Nội dung không phải JSON hợp lệ."},"bad_request":{"http":400,"en":"Invalid request.","vi":"Yêu cầu không hợp lệ."},"bad_cursor":{"http":400,"en":"Invalid cursor.","vi":"Cursor không hợp lệ."},"bad_limit":{"http":400,"en":"limit must be an integer between 1 and 200.","vi":"limit phải là số nguyên từ 1 đến 200."},"bad_date":{"http":400,"en":"Invalid date. Use DD/MM/YYYY or YYYY-MM-DD (the API accepts YYYY-MM-DD only).","vi":"Ngày không hợp lệ. Nhập dạng DD/MM/YYYY hoặc YYYY-MM-DD (API chỉ nhận YYYY-MM-DD)."},"bad_status":{"http":400,"en":"Unknown status code.","vi":"Mã trạng thái không hợp lệ."},"bad_scopes":{"http":400,"en":"Invalid scope list.","vi":"Danh sách scope không hợp lệ."},"bad_ip_allowlist":{"http":400,"en":"Invalid IP allowlist.","vi":"Danh sách IP không hợp lệ."},"bad_expires_at":{"http":400,"en":"expires_at must be a future time.","vi":"expires_at phải ở tương lai."},"name_required":{"http":400,"en":"name is required.","vi":"Cần nhập tên."},"bad_amount":{"http":400,"en":"Invalid amount: it must be a positive number (web forms and CSV: pounds, e.g. 12.50; API: whole pence, e.g. 1250).","vi":"Số tiền không hợp lệ: phải là số dương (biểu mẫu web và CSV: bảng Anh, ví dụ 12.50; API: số nguyên pence, ví dụ 1250)."},"bad_credit_limit":{"http":400,"en":"Invalid credit limit.","vi":"Hạn mức không hợp lệ."},"bad_terms_days":{"http":400,"en":"terms_days must be 0-365.","vi":"terms_days phải từ 0 đến 365."},"note_required":{"http":400,"en":"A note is required for adjustments.","vi":"Bút toán điều chỉnh bắt buộc có ghi chú."},"bad_kind":{"http":400,"en":"Type must be deposit or withdrawal.","vi":"Loại phải là nộp tiền (deposit) hoặc rút tiền (withdrawal)."},"bad_webhook_url":{"http":400,"en":"Webhook URL must be a public https URL.","vi":"URL webhook phải là https công khai."},"webhook_limit_reached":{"http":409,"en":"Webhook limit reached (5 endpoints per partner). Delete one first.","vi":"Đã đủ 5 endpoint webhook cho mỗi đối tác. Hãy xóa bớt một cái."},"ip_allowlist_required":{"http":400,"en":"Admin/staff API keys must have an ip_allowlist.","vi":"Khóa API admin/staff bắt buộc có danh sách IP cho phép (ip_allowlist)."},"idempotency_key_required":{"http":400,"en":"Idempotency-Key header is required for this request.","vi":"Bắt buộc có Idempotency-Key cho yêu cầu này."},"bad_events":{"http":400,"en":"Unknown webhook event.","vi":"Sự kiện webhook không hợp lệ."},"idempotency_key_reuse":{"http":422,"en":"Idempotency-Key was already used with a different request.","vi":"Idempotency-Key đã dùng cho yêu cầu khác."},"idempotency_in_progress":{"http":409,"en":"A request with this Idempotency-Key is still being processed.","vi":"Yêu cầu cùng Idempotency-Key đang được xử lý."},"bad_idempotency_key":{"http":400,"en":"Idempotency-Key must be 8-120 printable characters.","vi":"Idempotency-Key phải gồm 8-120 ký tự."},"credit_limit_exceeded":{"http":402,"en":"The order would exceed the account credit limit.","vi":"Đơn vượt hạn mức công nợ của tài khoản."},"ledger_inactive":{"http":409,"en":"On-account billing is not enabled for this account.","vi":"Tài khoản chưa bật ghi nợ."},"not_editable":{"http":409,"en":"The order can no longer be edited.","vi":"Đơn không thể sửa nữa."},"invalid_transition":{"http":409,"en":"Invalid status change.","vi":"Bước chuyển trạng thái không hợp lệ."},"conflict":{"http":409,"en":"The resource was just updated elsewhere.","vi":"Dữ liệu vừa được cập nhật ở nơi khác."},"exists":{"http":409,"en":"Already exists.","vi":"Đã tồn tại."},"batch_not_empty":{"http":409,"en":"The batch still contains orders.","vi":"Lô vẫn còn đơn."},"unknown_tracking_code":{"http":404,"en":"Unknown tracking code.","vi":"Mã tracking không tồn tại."},"tracking_code_required":{"http":400,"en":"tracking_code is required.","vi":"Cần có tracking_code."},"invalid_status":{"http":400,"en":"Unknown status.","vi":"Trạng thái không hợp lệ."},"invalid_occurred_at":{"http":400,"en":"occurred_at is invalid.","vi":"occurred_at không hợp lệ."},"too_many_codes":{"http":400,"en":"At most 50 codes per request.","vi":"Tối đa 50 mã mỗi yêu cầu."},"partner_has_no_account":{"http":409,"en":"This partner has no login account; ledger needs one.","vi":"Đối tác chưa có tài khoản; công nợ cần tài khoản."},"partner_not_found":{"http":404,"en":"Partner not found or inactive.","vi":"Không thấy đối tác (hoặc đã tắt)."},"partner_user_mismatch":{"http":409,"en":"The order belongs to a different account than this partner.","vi":"Đơn thuộc tài khoản khác với đối tác này."},"user_not_customer":{"http":409,"en":"That email belongs to a staff/admin account.","vi":"Email đó là tài khoản nhân viên/admin."},"user_already_partner":{"http":409,"en":"That account is already a partner.","vi":"Tài khoản đó đã là đối tác."},"too_many_addresses":{"http":409,"en":"Address book is full (50).","vi":"Sổ địa chỉ đã đầy (50)."},"bad_surcharge":{"http":400,"en":"Invalid surcharge.","vi":"Phụ phí không hợp lệ."},"bad_prohibited":{"http":400,"en":"Invalid prohibited item (VI and EN labels required).","vi":"Mục hàng cấm không hợp lệ (cần nhãn VI và EN)."},"bad_payment_method":{"http":400,"en":"payment_method must be on_account or bank.","vi":"payment_method phải là on_account hoặc bank."},"not_payable_order":{"http":409,"en":"The order cannot accept payment now.","vi":"Đơn hiện không nhận thanh toán."},"order_not_payable":{"http":409,"en":"The order cannot accept payment now.","vi":"Đơn hiện không nhận thanh toán."},"nothing_due":{"http":409,"en":"Nothing left to pay.","vi":"Không còn khoản cần thanh toán."},"email_not_verified":{"http":403,"en":"The owner account email is not verified.","vi":"Email tài khoản chủ đơn chưa xác minh."},"incomplete":{"http":422,"en":"The order is incomplete.","vi":"Đơn chưa đủ thông tin."},"not_receivable":{"http":409,"en":"Order is not at the warehouse yet.","vi":"Đơn chưa ở kho."},"weigh_required":{"http":409,"en":"Weigh first.","vi":"Cần cân/đo thực trước."},"payment_required":{"http":409,"en":"Payment must be received first.","vi":"Cần nhận đủ tiền trước."},"no_balance_due":{"http":409,"en":"No balance due.","vi":"Không có chênh lệch cần thu."},"cannot_cancel":{"http":409,"en":"The order can no longer be cancelled online.","vi":"Đơn không còn hủy online được."},"card_disabled":{"http":409,"en":"Card payment is not enabled.","vi":"Chưa mở thanh toán thẻ."},"card_unavailable":{"http":502,"en":"Card payment is unavailable right now.","vi":"Thanh toán thẻ đang không dùng được."},"not_payable":{"http":409,"en":"The payment is no longer pending.","vi":"Khoản thanh toán không còn chờ."},"unknown_route":{"http":400,"en":"Unknown route.","vi":"Tuyến không hợp lệ."},"export_too_large":{"http":413,"en":"The export is above the row limit; choose a shorter date range.","vi":"File xuất vượt giới hạn số dòng; hãy chọn khoảng ngày ngắn hơn."},"server_error":{"http":500,"en":"Internal error.","vi":"Lỗi hệ thống."}},"x-order-statuses":["draft","awaiting_payment","confirmed","awaiting_dropoff","received","awaiting_adjustment_payment","dispatched","in_transit","customs","at_destination","out_for_delivery","delivered","on_hold","cancelled","returned","lost"],"x-webhooks":{"description":"POST to your https endpoint, JSON { id, type, created, data }. Headers: X-GB-Event, X-GB-Delivery, X-GB-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, `${t}.${rawBody}`)>. Reply 2xx within 10 s; otherwise retried after 1 min, 5 min, 30 min, 2 h, 6 h, 24 h, then marked dead.","events":{"order.created":"Order confirmed/submitted. data: { order }","order.status_changed":"data: { order, from, to }","order.cancelled":"data: { order }","payment.received":"data: { order, payment }","ledger.entry":"data: { entry, balance_pence, credit_limit_pence }"}}}