{"openapi":"3.0.3","info":{"title":"Wisdom Partner API","description":"Server-to-server APIs for connecting a company’s own systems to Wisdom, in the\nsections listed below. Each operation states the permission it requires, and a\ncredential holds only the permissions Pagoda Logistics has granted it.\n\n| Access | |\n|---|---|\n| **Base URL** | `https://gateway-api.pagodalog.com` (production) |\n| **Authentication** | Every request carries the API key and client secret in the `x-api-key` and `x-client-secret` headers. Credentials are issued by Pagoda Logistics and bound to one company; a credential reaches that company’s data only. |\n| **Permissions** | Each operation states the permission it requires; a credential holds only the permissions Pagoda Logistics has granted it. Permissions are independent — none implies another. |\n| **Rate limit** | 60 requests per minute per credential, counted separately for each API. Beyond that, `429` with a `Retry-After` header. |\n| **Errors** | Every failure returns `{ \"success\": false, \"message\", \"errors\" }` with a matching HTTP status. |","version":"1.0.0","contact":{"name":"Pagoda Logistics","email":"info@pagodalog.com"}},"servers":[{"url":"/","description":"This server"}],"security":[{"ApiKeyAuth":[],"ClientSecretAuth":[]}],"tags":[{"name":"Billing","description":"The company’s billed shipment rates, their breakdown and customs charges — per\nshipment and per period.\n\n| Amounts | |\n|---|---|\n| **total** | The billed price for the shipment: the invoiced price once the carrier invoice has been processed (`priceSource: \"invoiced\"`), the booked price before then (`\"booked\"`), or null while neither exists (`\"pending\"`). |\n| **surcharges, freight** | `surcharges` is the at-cost surcharge sum and `freight = total − surcharges`. |\n| **customs** | Customs charges are billed at cost on top of the total: **invoiced amount = `total` + `customsTotal`**. |\n| **Available history** | Billing data starts from the date Pagoda took over invoicing for the company. A request reaching further back is not an error — the window is moved up to that date, and the `from` in the response is the period actually served. |"},{"name":"Orders","description":"Orders from a webshop, an ERP or any other system are sent to Wisdom one call at a\ntime. Each order lands in **Order Management**, where the company’s team books it —\nthe API never books a shipment itself.\n\n| Sending an order | |\n|---|---|\n| **One call per order** | `PUT /api/v1/orders/{externalOrderId}`, where `externalOrderId` is the order’s id in the sending system. |\n| **Repeats are safe** | The same content again returns `200` with the order Wisdom already has; different content returns `409` — changing a sent order is not supported yet. |\n| **Delivery from the widget** | The Wisdom delivery widget’s `option.id` goes in `selectedDelivery.shippingMethodId` and, for pickup-point services, its `dropoff` object in `selectedDelivery.dropoffPoint`. |\n| **Delivery without the widget** | The sending system (an ERP, a webshop) chooses the service itself: its Wisdom service id goes in `selectedDelivery.shippingMethodId` — the known values are listed under `SelectedDelivery` below. `dropoffPoint` and `quotedPrice` can be left out. The system’s own name for the method can go in `shippingMethodName`, shown in Order Management only. |\n| **No delivery given** | `selectedDelivery` is optional. Without it, the company’s team chooses the service in Order Management before booking. |\n| **Follow-up** | `GET` the same URL: `unfulfilled` until the order is booked, then `fulfilled` with carrier, service, tracking number and the carrier’s status. |\n\n| Order data | |\n|---|---|\n| **Prices** | `items[].unitPrice` is what the shopper paid per unit after all discounts (order-level discounts spread over the lines), **excluding VAT**, in the order currency — the customs value for shipments leaving the EU. There is no separate VAT or discount field. `totalValue` is the order total as charged, incl. VAT and delivery, shown in Order Management only. |\n| **Units** | Weights in kg, dimensions in cm, countries ISO 3166-1 alpha-2, currencies ISO 4217. |\n| **Format** | `Content-Type: application/json`, at most 1 MB and 500 items per order. An optional field may be left out, empty (`\"\"`) or `null` — all three mean “not given”. |\n| **Validation** | Every problem is listed in `errors` (up to 50), e.g. `recipient.postalCode: is required`. Unknown fields are rejected, so a misspelled field fails loudly. Gaps that can be fixed in Wisdom before booking — a missing HS code, pickup point or weight — do not reject the order; they come back in `warnings`. |"}],"paths":{"/api/v1/billing/shipments":{"get":{"summary":"List shipments with billed amounts","description":"**Requires permission `billing:read`.**\n\nShipments created in the (inclusive) date range, newest first. Add `include=customs` to itemize customs charges per shipment.","parameters":[{"name":"from","in":"query","required":true,"description":"Range start (inclusive), YYYY-MM-DD. Moved up to the start of the available billing history when earlier — see the `from` in the response.","schema":{"type":"string","format":"date","example":"2026-08-01"}},{"name":"to","in":"query","required":true,"description":"Range end (inclusive), YYYY-MM-DD. At most 366 days after `from`.","schema":{"type":"string","format":"date","example":"2026-08-01"}},{"name":"include","in":"query","required":false,"description":"Set to `customs` to add `customsTotal` and `customs[]` to each shipment.","schema":{"type":"string","enum":["customs"]}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"One page of shipments.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"shipments":{"type":"array","items":{"$ref":"#/components/schemas/BillingShipment"}},"page":{"type":"integer","example":1},"pageSize":{"type":"integer","example":50},"totalCount":{"type":"integer","example":5},"from":{"type":"string","format":"date","description":"The window actually served — equal to the requested `from`, or the start of the available billing history when that is later."},"to":{"type":"string","format":"date"}}}}}}}},"400":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The credential lacks the `billing:read` permission, or is not linked to a company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected error on our side. Safe to retry; the message carries no details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-required-permission":"billing:read","tags":["Billing"]}},"/api/v1/billing/shipments/{trackingNumber}":{"get":{"summary":"One shipment with billed amounts and customs charges","parameters":[{"name":"trackingNumber","in":"path","required":true,"schema":{"type":"string","example":"1Z51W70X6792387382"}}],"responses":{"200":{"description":"The shipment. Customs data is always included when present.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"shipment":{"$ref":"#/components/schemas/BillingShipment"}}}}}}}},"401":{"description":"Missing, unknown or revoked credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The credential lacks the `billing:read` permission, or is not linked to a company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No shipment with that tracking number on this account, or it predates the start of the available billing history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected error on our side. Safe to retry; the message carries no details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"description":"**Requires permission `billing:read`.**","x-required-permission":"billing:read","tags":["Billing"]}},"/api/v1/billing/summary":{"get":{"summary":"Billed totals for a period","description":"**Requires permission `billing:read`.**\n\nAggregates the same amounts the list endpoint serves — overall and per carrier — so the two always reconcile. Periods covering more than 5000 shipments are rejected; narrow the range.","parameters":[{"name":"from","in":"query","required":true,"description":"Range start (inclusive), YYYY-MM-DD.","schema":{"type":"string","format":"date","example":"2026-08-01"}},{"name":"to","in":"query","required":true,"description":"Range end (inclusive), YYYY-MM-DD. At most 366 days after `from`.","schema":{"type":"string","format":"date","example":"2026-08-01"}}],"responses":{"200":{"description":"Period aggregates.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"overall":{"$ref":"#/components/schemas/BillingAggregate"},"byCarrier":{"type":"object","description":"Same aggregate per carrier code (e.g. ups, dhlfreight).","additionalProperties":{"$ref":"#/components/schemas/BillingAggregate"}}}}}}}}},"400":{"description":"Invalid query parameters, or too many shipments in range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The credential lacks the `billing:read` permission, or is not linked to a company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected error on our side. Safe to retry; the message carries no details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-required-permission":"billing:read","tags":["Billing"]}},"/api/v1/orders/{externalOrderId}":{"put":{"operationId":"sendOrder","summary":"Send an order to Order Management","description":"**Requires permission `orders:write`.**\n\nCreates the order once. Repeating the call with the same content returns the existing order (`200`); different content is refused (`409`).","parameters":[{"name":"externalOrderId","in":"path","required":true,"description":"The order’s id in the sending system — 1–64 characters: letters, digits, dot, underscore or hyphen (`docs` is reserved). A display number such as `#1001` goes in `orderNumber`.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","example":"100234"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"},"example":{"orderNumber":"#1001","orderDate":"2026-09-26T09:14:00+02:00","currency":"SEK","totalValue":922.5,"recipient":{"name":"Anna Andersson","email":"anna@example.com","phone":"+46701234567","addressLine1":"Storgatan 1","cityName":"Stockholm","postalCode":"11122","countryCode":"SE","residentialAddress":true},"items":[{"sku":"KL-1001","title":"Garden hose 20 m","quantity":2,"unitPrice":279.2,"weightPerUnit":1.2,"length":30,"width":30,"height":10,"hsCode":"391740","countryOfOrigin":"SE"}],"selectedDelivery":{"shippingMethodId":"dhlfreight-service-point","dropoffPoint":{"id":"SE-1234","name":"ICA Nära Storgatan","address":{"street":"Storgatan 5","postalCode":"11122","city":"Stockholm","countryCode":"SE"}},"quotedPrice":49,"currency":"SEK"}}}}},"responses":{"200":{"description":"This order was already received with the same content.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"},"warnings":{"type":"array","items":{"type":"string"},"description":"Gaps to fix in Wisdom before the order can be booked. The order was accepted regardless.","example":["items.0: hsCode missing — needed for customs (the shipment leaves the EU) before booking"]}}}}}}}},"201":{"description":"The order was received.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"},"warnings":{"type":"array","items":{"type":"string"},"description":"Gaps to fix in Wisdom before the order can be booked. The order was accepted regardless.","example":["items.0: hsCode missing — needed for customs (the shipment leaves the EU) before booking"]}}}}}}}},"400":{"description":"Invalid order — `errors` lists every problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The credential lacks the `orders:write` permission, or is not linked to a company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"An order with this externalOrderId already exists with different content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"The request body is larger than 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"The Content-Type is not application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected error on our side. Safe to retry; the message carries no details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-required-permission":"orders:write","tags":["Orders"]},"get":{"operationId":"getOrder","summary":"Status of an order","description":"**Requires permission `orders:read`.**\n\n`unfulfilled` until the order is booked in Wisdom, then `fulfilled` with its shipments: carrier, service, tracking number, the carrier’s status and the packages as booked.","parameters":[{"name":"externalOrderId","in":"path","required":true,"description":"The order’s id in the sending system — 1–64 characters: letters, digits, dot, underscore or hyphen (`docs` is reserved). A display number such as `#1001` goes in `orderNumber`.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","example":"100234"}}],"responses":{"200":{"description":"The order.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"result":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"}}}}}}}},"400":{"description":"The externalOrderId is not a valid id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing, unknown or revoked credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The credential lacks the `orders:read` permission, or is not linked to a company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No order with that externalOrderId on this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Unexpected error on our side. Safe to retry; the message carries no details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-required-permission":"orders:read","tags":["Orders"]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"ClientSecretAuth":{"type":"apiKey","in":"header","name":"x-client-secret"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Query parameter 'from' must be a date (YYYY-MM-DD)"},"errors":{"type":"array","items":{"type":"string"},"example":[]}}},"BillingShipment":{"type":"object","properties":{"trackingNumber":{"type":"string","nullable":true,"example":"1Z51W70X6792387382"},"reference1":{"type":"string","nullable":true,"example":"#18951"},"reference2":{"type":"string","nullable":true},"shipDate":{"type":"string","format":"date","nullable":true,"example":"2026-08-13"},"carrier":{"type":"string","nullable":true,"example":"ups"},"serviceCode":{"type":"string","nullable":true,"example":"08"},"senderCountry":{"type":"string","nullable":true,"example":"SE"},"recipientCountry":{"type":"string","nullable":true,"example":"US"},"pieces":{"type":"number","nullable":true,"example":1},"chargeableWeight":{"type":"number","nullable":true,"example":2.5},"currency":{"type":"string","nullable":true,"example":"SEK"},"priceSource":{"type":"string","enum":["invoiced","booked","pending"],"description":"invoiced = from the processed carrier invoice; booked = the price at booking (carrier invoice not processed yet); pending = no price yet."},"surcharges":{"type":"number","nullable":true,"example":62,"description":"At-cost surcharge sum. Null while pending."},"freight":{"type":"number","nullable":true,"example":462.7,"description":"total − surcharges. Null while pending."},"total":{"type":"number","nullable":true,"example":524.7,"description":"The billed total excluding customs. Null while pending."},"customsTotal":{"type":"number","example":453,"description":"Only with include=customs (list) or on the detail endpoint. Billed at cost on top of total: invoiced amount = total + customsTotal."},"customs":{"type":"array","items":{"$ref":"#/components/schemas/CustomsItem"},"description":"Itemized customs charges (same condition as customsTotal)."}}},"CustomsItem":{"type":"object","properties":{"label":{"type":"string","example":"Tull"},"amount":{"type":"number","example":100}}},"BillingAggregate":{"type":"object","properties":{"shipmentCount":{"type":"integer","example":5},"invoicedCount":{"type":"integer","example":4},"bookedCount":{"type":"integer","example":1},"pendingCount":{"type":"integer","example":0},"total":{"type":"number","example":1673.82},"surcharges":{"type":"number","example":124},"freight":{"type":"number","example":1549.82},"customsTotal":{"type":"number","example":763}}},"OrderRequest":{"type":"object","additionalProperties":false,"required":["currency","recipient","items"],"properties":{"orderNumber":{"type":"string","maxLength":35,"description":"The order number as shown to people, e.g. `#1001` — shown in Order Management and printed on the label as the shipment reference (hence the carriers’ 35-character limit). Not an id: the order is identified by the `externalOrderId` in the URL. When omitted, the externalOrderId is shown instead."},"orderDate":{"type":"string","format":"date-time","description":"ISO 8601 with offset, between the years 2000 and 2100; stored in UTC. Defaults to when Wisdom received the order."},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$","description":"ISO 4217, e.g. SEK (normalised to upper case)."},"totalValue":{"type":"number","minimum":0,"maximum":1000000000,"description":"Order total as charged, incl. VAT and delivery. Display only."},"recipient":{"$ref":"#/components/schemas/OrderRecipient"},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/OrderItem"}},"packages":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/OrderPackage"},"description":"Only when the parcels are already known. Otherwise Wisdom packs from the items using the company’s packaging rules."},"selectedDelivery":{"$ref":"#/components/schemas/SelectedDelivery"},"shippingMethodName":{"type":"string","maxLength":255,"description":"The sending system’s own name for the delivery method, e.g. `Hemleverans`. Shown in Order Management next to the service, for the team choosing or checking it. Display only: it never chooses the service — `selectedDelivery` does."},"paymentStatus":{"type":"string","enum":["pending","authorized","paid","partially_paid","partially_refunded","refunded","voided","failed"],"description":"Payment state when the order is sent; shown in Order Management. A snapshot — send the order when it is ready to ship (paid or authorized)."}}},"OrderRecipient":{"type":"object","additionalProperties":false,"required":["name","addressLine1","cityName","countryCode"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"contactName":{"type":"string","maxLength":100,"description":"Defaults to name."},"email":{"type":"string","format":"email","maxLength":254,"description":"Recommended — carriers send delivery notifications."},"phone":{"type":"string","maxLength":40,"description":"Recommended, with country code."},"addressLine1":{"type":"string","minLength":1,"maxLength":100},"addressLine2":{"type":"string","maxLength":100},"addressLine3":{"type":"string","maxLength":100},"cityName":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","maxLength":20,"description":"Required, except for countries that have no postal codes."},"region":{"type":"string","maxLength":100,"description":"State / province code where the country uses one, e.g. `CA` for California."},"countryCode":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2, e.g. SE (normalised to upper case; the United Kingdom is GB)."},"residentialAddress":{"type":"boolean","description":"`false` for a business address. Defaults to `true` (a private address)."}}},"OrderItem":{"type":"object","additionalProperties":false,"required":["title","quantity","unitPrice"],"properties":{"sku":{"type":"string","maxLength":100},"title":{"type":"string","minLength":1,"maxLength":255},"quantity":{"type":"integer","minimum":1,"maximum":100000},"unitPrice":{"type":"number","minimum":0,"maximum":1000000000,"description":"Paid per unit after all discounts, excluding VAT, in the order currency."},"weightPerUnit":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":50000,"description":"kg per unit."},"length":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm per unit."},"width":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm per unit."},"height":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm per unit."},"hsCode":{"type":"string","description":"HS / commodity code, 6–10 digits (dots and spaces allowed). Needed outside the EU."},"countryOfOrigin":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"ISO 3166-1 alpha-2. Needed outside the EU."}}},"OrderPackage":{"type":"object","additionalProperties":false,"required":["count","length","width","height","weight"],"properties":{"count":{"type":"integer","minimum":1,"maximum":1000},"length":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm."},"width":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm."},"height":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":10000,"description":"cm."},"weight":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":50000,"description":"kg, per package."},"packaging":{"type":"string","enum":["unspecified","package","full-pallet","half-pallet","ups-express-box","ups-express-pak","ups-express-tube","ups-express-envelope"],"default":"package"}}},"SelectedDelivery":{"type":"object","additionalProperties":false,"required":["shippingMethodId"],"description":"Optional. The Wisdom service for the order — the delivery widget’s `option.id`, or a service the sending system chooses from the known values. `shippingMethodId` is required only when `selectedDelivery` is sent; leave `selectedDelivery` out to have the service chosen in Order Management.","properties":{"shippingMethodId":{"type":"string","description":"The Wisdom service id — the widget’s `option.id`, or one of the known values. Known values: `collect`, `dhlfreight-service-point`, `dhlfreight-paket`, `dhlfreight-paket-home`, `dhlfreight-home-delivery`, `dhlfreight-parcel-connect-plus`, `dhlfreight-euroconnect`, `dhlfreight-euroconnect-plus`, `dhlfreight-euroline`, `dhlfreight-eurapid`, `dhlfreight-pall`, `dhlfreight-stycke`, `dhlfreight-parti`, `dhlfreight-nordic-pallet`, `dhlfreight-special`, `dhlfreight-int-parcel`, `ups-standard`, `ups-standard-d2r`, `ups-expedited`, `ups-expedited-d2r`, `ups-express`, `ups-express-d2r`, `ups-express-saver`, `ups-express-saver-d2r`, `ups-express-plus`, `ups-express-plus-d2r`, `ups-worldwide-economy-ddu`. `collect` means the shopper collects the order at the merchant: send the widget’s location as `dropoffPoint`; nothing is booked with a carrier.","example":"dhlfreight-service-point"},"dropoffPoint":{"$ref":"#/components/schemas/DropoffPoint"},"quotedPrice":{"type":"number","minimum":0,"maximum":1000000000,"description":"What the shopper was charged for delivery. Informational."},"currency":{"type":"string","pattern":"^[A-Za-z]{3}$"}}},"DropoffPoint":{"type":"object","required":["id"],"description":"The widget’s `dropoff` object, as received. Include its address (street, postalCode, city): carriers book pickup points by address. Other fields it carries (distance, opening hours) are accepted and ignored.","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","maxLength":255},"address":{"$ref":"#/components/schemas/DropoffPointAddress"}}},"DropoffPointAddress":{"type":"object","properties":{"street":{"type":"string","maxLength":255},"postalCode":{"type":"string","maxLength":20},"city":{"type":"string","maxLength":100},"countryCode":{"type":"string","pattern":"^[A-Za-z]{2}$"}}},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Wisdom’s id for the order."},"externalOrderId":{"type":"string","example":"100234"},"orderNumber":{"type":"string","example":"#1001","description":"As sent, or the externalOrderId when none was sent."},"status":{"type":"string","enum":["unfulfilled","fulfilled"],"description":"`unfulfilled` until the order is booked in Wisdom, then `fulfilled` — as long as a shipment stands (a voided label, shipment status `cancelled`, turns it back to `unfulfilled`). New values may be added — treat an unknown value as not fulfilled."},"paymentStatus":{"type":"string","nullable":true,"enum":["pending","authorized","paid","partially_paid","partially_refunded","refunded","voided","failed",null],"description":"As sent with the order."},"createdAt":{"type":"string","format":"date-time"},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"},"description":"The shipments Wisdom booked for the order — empty until booked. An array so that a re-booked label or a split delivery can be listed; this version returns at most one, the current booking."}}},"Shipment":{"type":"object","properties":{"carrier":{"type":"object","properties":{"id":{"type":"string","nullable":true,"example":"dhlfreight","description":"Known values: `ups`, `upsscs`, `schenker`, `expeditors`, `matkahuolto`, `pagoda`, `dhlgf`, `dhlfreight`, `ceva`, `hrx`, `geodis`, `dsv`."},"name":{"type":"string","nullable":true,"example":"DHL Freight"}}},"service":{"type":"object","description":"The service booked — may differ from `selectedDelivery` if it was changed in Wisdom. When the booking record carries no service id, the order’s service in Wisdom is reported (as set there, else as sent).","properties":{"id":{"type":"string","nullable":true,"example":"dhlfreight-service-point","description":"Wisdom service id, the same values as `selectedDelivery.shippingMethodId`."},"name":{"type":"string","nullable":true,"example":"DHL Service Point"},"code":{"type":"string","nullable":true,"example":"103","description":"The carrier’s product code."}}},"trackingNumber":{"type":"string","nullable":true},"status":{"type":"string","enum":["booked","picked_up","in_transit","delivered","delivered_to_pickup_point","exception","cancelled","unknown"],"description":"What the carrier reports (`booked` until its first tracking event). New values may be added."},"statusText":{"type":"string","nullable":true,"description":"The latest tracking event in words — the carrier’s, or Wisdom’s own before the first event; `Shipment cancelled` once a label is voided."},"shipDate":{"type":"string","format":"date","nullable":true},"expectedDelivery":{"type":"string","format":"date","nullable":true},"deliveredDate":{"type":"string","format":"date","nullable":true},"packages":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentPackage"},"description":"The packages as booked."}}},"ShipmentPackage":{"type":"object","description":"A booked package. A dimension or weight the booking did not record is 0; count is at least 1.","properties":{"count":{"type":"integer","minimum":1},"length":{"type":"number","minimum":0,"description":"cm."},"width":{"type":"number","minimum":0,"description":"cm."},"height":{"type":"number","minimum":0,"description":"cm."},"weight":{"type":"number","minimum":0,"description":"kg."},"packaging":{"type":"string","enum":["unspecified","package","full-pallet","half-pallet","ups-express-box","ups-express-pak","ups-express-tube","ups-express-envelope"]}}}}}}