{"openapi":"3.1.0","info":{"title":"Airblox Public API","description":"Rate, book, and track air cargo, plus the parcel manifest for bookings that deliver to the door. Create a booking with or without a waybill and flight, revise its packages while it is open, attach the manifest and waybill documents, then close it — which hands the parcels to the last-mile courier. Endpoints are scoped to the caller's organisation via the API key; no per-endpoint org parameter is required.","contact":{"name":"Airblox API support","email":"support@airblox.com"},"license":{"name":"Proprietary"},"version":"0.0.7"},"servers":[{"url":"https://api.dev.airblox.io/airblox","description":"Dev — integrate and test here"},{"url":"https://api.airblox.io/airblox","description":"Production — live bookings"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Quotes","description":"Get journey alternatives for a shipment"},{"name":"Booking","description":"Create bookings, upload documents, and read live bookings + tracking for the authenticated org"}],"paths":{"/api/v1/bookings/{bookingReference}/packages":{"get":{"tags":["Packages","Booking"],"summary":"List a booking's last-mile packages","description":"The booking's parcel manifest with per-parcel normalized status, plus the platform-served rollup (counts by status). Available on ANY booking — a parcel manifest is a shipment fact, not a last-mile one, so bookings without a delivery service carry one too; a booking with no packages returns an empty list and a zero rollup.\n\nTo answer *does the carrier know about this parcel?* read each parcel's `registration` block, not `status`: `status` says where the parcel IS, and a parcel the courier refused sits at `RECEIVED` — the same value it holds while waiting to be sent. `registration.retryable = false` means the parcel will never register as sent: fix it and re-send the manifest.\n\nParcels still waiting for a bound courier also carry `deliveryReadiness` — what that courier WOULD refuse, before anything is sent, with its own field named (`consignee.postal`) — and the rollup carries the manifest-wide `deliverability` summary. Both are absent when there is no readiness question: storing a parcel asks only for a recipient block and a country, because parcels are a shipment fact and exist on bookings that buy no delivery from us, so a carrier's own requirements are reported here rather than enforced when you send the manifest.","operationId":"getPackages","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"responses":{"200":{"description":"Packages returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingPackagesDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingPackagesDto"}}}}}},"put":{"tags":["Packages","Booking"],"summary":"Upsert a booking's last-mile packages","description":"Idempotent manifest upsert, keyed on each parcel's `reference`: new references are stored, changed ones updated, identical re-sends are `UNCHANGED` no-ops — so the whole manifest can be re-sent safely (e.g. after a `packagesStatus: WRITE_FAILED` on the create call, or when the final manifest lands after booking). Validation is per parcel: bad entries come back `REJECTED` with error codes while the rest are stored. Parcels are never deleted by this call.\n\nA reference that already exists on ANOTHER of your bookings is MOVED to this one — whichever manifest most recently lists a parcel owns it — and it keeps its courier tracking number and label. A move that is not possible (already handed over to the courier, or a different origin, so the existing label cannot describe it) comes back `REJECTED` with `REFERENCE_IN_USE` naming the reason.\n\nAccepted on ANY booking. A parcel manifest is a shipment fact — customs and client integrations reference parcels on bookings that buy no delivery from us — so this no longer requires a last-mile delivery service. Without one, parcels are simply stored (`RECEIVED`) and no courier is ever asked, so the `registration` blocks below stay `NOT_ATTEMPTED`.\n\n**Storing a parcel and shipping it are two different things.** Handing a parcel to the courier is a separate call the carrier can refuse — for a rejected address, a service the account cannot sell, a value with no currency. This response WAITS for that answer, so each result also carries a `registration` block (`REGISTERED` / `FAILED` with the courier's own code, message and whether retrying can help / `PENDING` / `NOT_ATTEMPTED`), and the response-level `registration` summarises the manifest. Registering is one courier round trip per parcel, so a large manifest cannot finish inside one HTTP response: when `registration.complete` is false, poll `GET /api/v1/bookings/{ref}/packages/registration`. **Never read `outcome: CREATED` alone as 'the courier has it'.**\n\nA recipient needs only the block itself and a `country` (ISO-3166 alpha-2) to be stored — name, address, city and postal code are optional, because a parcel is a shipment fact and bookings that buy no delivery carry parcels for customs reference. Where a courier IS bound, its own field requirements are reported instead: the rollup carries a `deliverability` summary, and each parcel carries `deliveryReadiness` on `GET /api/v1/bookings/{ref}/packages`.","operationId":"putPackages","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutBookingPackagesRequestDto"}}},"required":true},"responses":{"200":{"description":"Manifest processed — per-parcel outcomes returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PutBookingPackagesResponseDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PutBookingPackagesResponseDto"}}}}}}},"/api/v1/quotes":{"post":{"tags":["Quotes"],"summary":"Get shipping quotes for a shipment","description":"Returns one or more journey alternatives for the given shipment. Each option carries an `index` you echo back when booking. The proxy doesn't persist quotes — to commit a booking, resend the same shipment request with the selected index to `POST /api/v1/bookings`.","operationId":"getQuotes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingRequestDto"}}},"required":true},"responses":{"200":{"description":"Journey alternatives returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/QuoteResponseDto"}}}},"400":{"description":"Invalid shipment request (missing required fields, etc.)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/QuoteResponseDto"}}}}}}},"/api/v1/packages/labels":{"post":{"tags":["Packages"],"summary":"Get label download links in bulk","description":"Short-lived download URLs for up to 2000 tracking numbers in one call — one row per requested number, in request order. Each row is `OK` (with `url` — fetch promptly, links expire after about an hour), `NOT_FOUND`, `NO_LABEL` (regenerate via the per-parcel label endpoint on the booking), or `UNAVAILABLE` (temporary — retry). Labels download directly from storage; no bytes travel through this API.","operationId":"labelLinks","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageLabelsRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PackageLabelLinkDto"}}}}}}}},"/api/v1/bookings":{"get":{"tags":["Booking"],"summary":"List bookings","description":"Every booking the authenticated org owns. Use the optional `healthStatus` query param to narrow to a single lifecycle state — e.g. `IN_FLIGHT`, `AT_RISK`, `COMPLETED`. Returns an empty array when no booking matches.","operationId":"list","parameters":[{"name":"healthStatus","in":"query","description":"Optional journey health filter — passed through to the data tier.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BookingSummaryDto"}}}}}}},"post":{"tags":["Booking"],"summary":"Create a booking","description":"Creates a real (incomplete) booking directly from a shipment request. With no routing it's a leg-less open booking over `originAirport → destinationAirport` (`status = INCOMPLETE`); a `prearrangedLegs` prefix is booked with an open segment for the remainder. Returns the new `journeyId` + `bookingReference` — use the reference for tracking calls and the journeyId when uploading attachments. Idempotent on `(orgId, idempotencyKey)` — a re-POST with the same key returns the same booking.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingRequestDto"}}},"required":true},"responses":{"201":{"description":"Booking created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateBookingResponseDto"}}}},"400":{"description":"Invalid request — missing/blank airports, or missing clientId when the caller is not a client org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateBookingResponseDto"}}}}}}},"/api/v1/bookings/{journeyId}/attachments/{documentType}":{"post":{"tags":["Booking"],"summary":"Upload a document against a booking","description":"Uploads one file against the booking's `journeyId` (the value returned by the create call); the file attaches to that journey's documents. Ordinary `multipart/form-data` with a single `file` part — the same shape as every other upload on the platform, and what an HTTP client's file-upload helper produces by default. The part carries its own filename and content type, so no metadata headers are needed. Repeat the call once per attached file; the same `documentType` may be uploaded multiple times.","operationId":"uploadAttachment","parameters":[{"name":"journeyId","in":"path","description":"The journeyId returned by the create call.","required":true,"schema":{"type":"string","format":"uuid"},"example":"a57e1942-8247-487c-aba7-a2aee59c57d6"},{"name":"documentType","in":"path","description":"Document type — one of the recognized DocumentType values (journey-execution's canonical enum; Swagger lists the full set). Unknown values return 400.","required":true,"schema":{"type":"string","enum":["MAWB","HAWB","MANIFEST","MANIFEST_SUMMARY","RETURNED_PACKAGE_LIST","GROUND_HANDLING_AUTHORIZATION","AUTHORIZATION_FORM","ACAS","TSA","PACKAGE_LABELS","DG_DECLARATION","FORM_7512_SUBMISSION","LATAM_CARGO_ACCEPTANCE","EXPORT_AWB","AMS_1F_NOMINATION","CARGO_PAYMENT_RECEIPT","COMMERCIAL_INVOICE","PACKING_LIST","CERTIFICATE_OF_ORIGIN","CITES_PERMIT","PHYTOSANITARY_CERTIFICATE","BROKER_INVOICE","POD","OTHER","TRACKING"]},"example":"MANIFEST"},{"name":"Content-Type","in":"header","required":false,"schema":{"type":"string"}},{"name":"Content-Disposition","in":"header","required":false,"schema":{"type":"string"}},{"name":"X-Filename","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"One `file` part carrying the document.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}},"required":true},"responses":{"201":{"description":"Document stored","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingAttachmentDto"}}}},"400":{"description":"Unknown documentType or empty file","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingAttachmentDto"}}}},"401":{"description":"No auth context / no orgId on the JWT","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingAttachmentDto"}}}},"404":{"description":"journeyId not found in caller's org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingAttachmentDto"}}}}}}},"/api/v1/bookings/{bookingReference}/packages/{reference}/cancel":{"post":{"tags":["Packages","Booking"],"summary":"Cancel a parcel","description":"Cancels one parcel, addressed by its `reference`. Parcels not yet registered with a courier cancel immediately; registered parcels are cancelled at the courier (possible only until the courier job/manifest closes). Cancelling is idempotent. Returns the parcel with status CANCELLED.","operationId":"cancelPackage","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference.","required":true,"schema":{"type":"string"},"example":"ABX-1234"},{"name":"reference","in":"path","description":"The parcel's reference (the manifest key).","required":true,"schema":{"type":"string"},"example":"ORD-1001"}],"responses":{"200":{"description":"Parcel cancelled","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingPackageDto"}}}},"404":{"description":"Unknown booking reference or parcel reference","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingPackageDto"}}}},"409":{"description":"The parcel is past cancellation (already moving or terminal)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingPackageDto"}}}}}}},"/api/v1/bookings/{bookingReference}/finalize":{"post":{"tags":["Booking"],"summary":"Finalise a booking — hand it to the courier and close it","description":"The last act on a booking, and the API twin of the pre-alert email. Three things happen as ONE irreversible unit, in this order:\n\n1. the waybill and flight you send are recorded on the booking's final leg;\n2. every parcel the courier has accepted is handed over, and every parcel that still has **no label** is discarded — it could not be in the courier's job and was never going to ship;\n3. the booking closes: further package writes, cancels, moves and manifest uploads are all refused from then on.\n\n**The order is why this is one call.** The handover reads the waybill, airline, flight and ETA off the final leg, so recording them afterwards would hand the courier a job carrying tracking numbers and nothing else.\n\nEvery field in the body is optional. A booking whose flight was recorded earlier finalises with an empty body; one that never had a flight still closes, because closing means *no further edits* whether or not anything went to a courier.\n\n**Idempotent.** A repeat call replays the original outcome with `closedNow: false` and discards nothing further — so a retry, or a pre-alert email arriving after you finalised, is harmless.\n\n**Read `discardedParcels`.** A non-zero count means parcels you sent us are NOT shipping; `discarded` names the first of them.","operationId":"finalizeBooking","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeBookingRequestDto"}}}},"responses":{"200":{"description":"Booking finalised — or already was","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FinalizeBookingResponseDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FinalizeBookingResponseDto"}}}},"409":{"description":"Not yet: a manifest is still being read into this booking's parcels, or the courier is still registering them. Closing now would hand over an incomplete set and discard parcels that are about to be labelled. Wait and call again.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FinalizeBookingResponseDto"}}}},"422":{"description":"Air facts were sent for a booking that has no leg to record them against","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FinalizeBookingResponseDto"}}}}}}},"/api/v1/bookings/{bookingReference}/cargo":{"patch":{"tags":["Booking"],"summary":"Update cargo on a booking","description":"Partial update of the booking's declared cargo quantities: `shippingUnits` (boxes / handling units — what an air waybill counts as pieces), `pieces` (individual parcels on the manifest), `weightKg` (gross weight), `volumeCbm`. Send only the fields to change — omitted fields keep their current value; at least one field is required and all values must be positive. Updates are accepted until the booking's first leg departs; after that cargo is locked and the call returns 409. Returns the full updated booking.\n\n`chargeableWeightKg` appears on the cargo READ but is **not writable here and is ignored if sent**: it is the figure the carrier printed on the air waybill, so it is set from the waybill itself (or corrected by an Airblox operator), never declared by a caller.","operationId":"updateCargo","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCargoRequestDto"}}},"required":true},"responses":{"200":{"description":"Cargo updated — full booking returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}},"400":{"description":"No fields supplied, or a zero/negative value","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}},"409":{"description":"Cargo is locked — the booking's first leg has departed","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}}}}},"/api/v1/packages":{"get":{"tags":["Tracking","Packages"],"summary":"Track a parcel by your own reference","description":"The same tracking picture, addressed by the parcel `reference` you supplied on the manifest — no platform id needed. Available because parcel references are unique across your bookings (enforced at manifest intake). Works for parcels not yet registered with a courier: `trackingNumber` is null and the timeline shows intake events.","operationId":"byReference","parameters":[{"name":"reference","in":"query","description":"Your parcel reference, as supplied on the manifest.","required":true,"schema":{"type":"string"},"example":"ORD-1001"}],"responses":{"200":{"description":"Parcel found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackageTrackingDto"}}}},"404":{"description":"No parcel with that reference","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackageTrackingDto"}}}}}}},"/api/v1/packages/{trackingNumber}":{"get":{"tags":["Tracking","Packages"],"summary":"Track a parcel by tracking number","description":"The parcel's full tracking picture by its courier tracking number (returned when the parcel was registered): normalized `status`, the last movement, `estimatedDeliveryDate`, and the event timeline (oldest first). Designed for end-customer tracking pages — responses are cacheable for 30 seconds.","operationId":"byTrackingNumber","parameters":[{"name":"trackingNumber","in":"path","description":"The courier tracking number.","required":true,"schema":{"type":"string"},"example":"GT61123450039"}],"responses":{"200":{"description":"Parcel found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackageTrackingDto"}}}},"404":{"description":"No parcel with that tracking number","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PackageTrackingDto"}}}}}}},"/api/v1/bookings/{bookingReference}":{"get":{"tags":["Booking"],"summary":"Get a booking by reference","description":"Resolves the human-readable booking reference (e.g. `ABX-1234`) to a full booking view, including the per-leg breakdown. Returns 404 when the reference is unknown to the caller's org.","operationId":"getByReference","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"responses":{"200":{"description":"Booking found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDetailsDto"}}}}}}},"/api/v1/bookings/{bookingReference}/status":{"get":{"tags":["Tracking","Booking"],"summary":"Get tracking status for a booking","description":"Pre-assembled tracking timeline for a booking: top-level milestones (booking confirmed, AWB issued, customs cleared, …) plus per-leg events (departure, arrival, offload). Shape is stable across journeys — external consumers can render their own status page on top without mapping internal lifecycle states.","operationId":"getStatus","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"responses":{"200":{"description":"Status returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrackingStatusDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrackingStatusDto"}}}}}}},"/api/v1/bookings/{bookingReference}/packages/{reference}/label":{"get":{"tags":["Packages","Booking"],"summary":"Download a parcel's shipping label","description":"The shipping label the courier issued for one parcel, addressed by the parcel `reference`. Body is the label bytes — `Content-Type: application/pdf` or `text/plain` (ZPL) depending on the integration's label format. Available once the parcel is REGISTERED (the `labelUrl` field on the packages list points here).","operationId":"getPackageLabel","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference.","required":true,"schema":{"type":"string"},"example":"ABX-1234"},{"name":"reference","in":"path","description":"The parcel's reference (the manifest key).","required":true,"schema":{"type":"string"},"example":"ORD-1001"}],"responses":{"200":{"description":"Label bytes returned","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"404":{"description":"Unknown booking reference or parcel reference","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}},"409":{"description":"The parcel is not registered with a courier yet","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/api/v1/bookings/{bookingReference}/packages/registration":{"get":{"tags":["Packages","Booking"],"summary":"Did the courier accept this booking's parcels?","description":"Where the booking's manifest stands WITH THE COURIER. Registering a parcel is a separate call to the carrier that can be refused per parcel, so storing a manifest and shipping it are two different events — the manifest write waits for this answer and returns it, and this endpoint is how you finish the story for a manifest too large to resolve in one response.\n\nBranch on `complete`. While it is false, `pending` parcels have no answer yet: poll here (a few seconds apart) until it is true, then read `GET /api/v1/bookings/{ref}/packages` for per-parcel detail — each parcel carries a `registration` block with the courier's own code and message and whether the refusal is worth retrying. `state` is `COMPLETE`, `IN_PROGRESS`, or `NOT_ATTEMPTED` (nothing has gone to a courier and nothing will — no courier is bound to this booking).","operationId":"getPackagesRegistration","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference, e.g. `ABX-1234`.","required":true,"schema":{"type":"string"},"example":"ABX-1234"}],"responses":{"200":{"description":"Registration state returned","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManifestRegistrationDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ManifestRegistrationDto"}}}}}}},"/api/v1/bookings/{bookingReference}/packages/labels":{"get":{"tags":["Packages","Booking"],"summary":"Get the booking's label download links (paged)","description":"Short-lived download URLs for the booking's parcels, in manifest order — the way to collect labels for a whole booking. Page through with `page` (0-based) and `size` (default 200, max 500), fetching each page's URLs as you go: they expire after about an hour, and re-requesting a page mints fresh ones. Parcels with no label yet are included as `NO_LABEL` rows, so a page always describes the same parcels as the manifest and you can see what is not ready. Labels download directly from storage; no bytes travel through this API. To fetch an arbitrary subset instead — a reprint of a few damaged labels — POST /api/v1/packages/labels with their tracking numbers.","operationId":"labels","parameters":[{"name":"bookingReference","in":"path","description":"Human-readable booking reference.","required":true,"schema":{"type":"string"},"example":"ABX-1234"},{"name":"page","in":"query","description":"Zero-based page index.","required":false,"schema":{"type":"integer","format":"int32","default":0},"example":0},{"name":"size","in":"query","description":"Rows per page (max 500).","required":false,"schema":{"type":"integer","format":"int32","default":200},"example":200}],"responses":{"200":{"description":"A page of label links.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingLabelsPageDto"}}}},"404":{"description":"No booking with that reference for this org","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingLabelsPageDto"}}}}}}}},"components":{"schemas":{"BookingPackageEntryDto":{"type":"object","properties":{"reference":{"type":"string"},"weightKg":{"type":"number"},"dimensions":{"$ref":"#/components/schemas/PackageDimensionsDto"},"declaredValue":{"type":"number"},"declaredValueCurrency":{"type":"string"},"recipient":{"$ref":"#/components/schemas/PackageRecipientDto"},"signatureRequired":{"type":"boolean"},"leaveAtDoor":{"type":"boolean"},"doNotDropship":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageLineItemDto"}},"attributes":{"type":"object","additionalProperties":{"type":"object"}}}},"PackageDimensionsDto":{"type":"object","properties":{"lengthCm":{"type":"number"},"widthCm":{"type":"number"},"heightCm":{"type":"number"}}},"PackageLineItemDto":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"integer","format":"int32"},"unit":{"type":"string"},"value":{"type":"number"},"hsCode":{"type":"string"},"originCountry":{"type":"string"},"cpc":{"type":"string"},"productUrl":{"type":"string"},"orderNumber":{"type":"string"}}},"PackageRecipientDto":{"type":"object","properties":{"name":{"type":"string"},"attention":{"type":"string"},"addressLine1":{"type":"string"},"addressLine2":{"type":"string"},"addressLine3":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"}}},"PutBookingPackagesRequestDto":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/BookingPackageEntryDto"},"minItems":1}}},"DeliverabilityDto":{"type":"object","properties":{"provider":{"type":"string"},"checked":{"type":"integer","format":"int64"},"blocked":{"type":"integer","format":"int64"}}},"ManifestRegistrationDto":{"type":"object","properties":{"state":{"type":"string"},"registered":{"type":"integer","format":"int32"},"failed":{"type":"integer","format":"int32"},"pending":{"type":"integer","format":"int64"},"complete":{"type":"boolean"}}},"PackageErrorDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"PackageRegistrationDto":{"type":"object","properties":{"state":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"attempts":{"type":"integer","format":"int32"},"lastAttemptAt":{"type":"string","format":"date-time"}}},"PackageRollupDto":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"byStatus":{"type":"array","items":{"$ref":"#/components/schemas/StatusCountDto"}},"deliverability":{"$ref":"#/components/schemas/DeliverabilityDto"}}},"PackageWriteResultDto":{"type":"object","properties":{"reference":{"type":"string"},"outcome":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/PackageErrorDto"}},"registration":{"$ref":"#/components/schemas/PackageRegistrationDto"}}},"PutBookingPackagesResponseDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PackageWriteResultDto"}},"created":{"type":"integer","format":"int64"},"updated":{"type":"integer","format":"int64"},"unchanged":{"type":"integer","format":"int64"},"rejected":{"type":"integer","format":"int64"},"rollup":{"$ref":"#/components/schemas/PackageRollupDto"},"registration":{"$ref":"#/components/schemas/ManifestRegistrationDto"}}},"StatusCountDto":{"type":"object","properties":{"status":{"type":"string"},"count":{"type":"integer","format":"int64"}}},"PrearrangedLeg":{"type":"object","properties":{"originAirport":{"type":"string","maxLength":3,"minLength":3},"destinationAirport":{"type":"string","maxLength":3,"minLength":3},"carrierCode":{"type":"string","maxLength":3,"minLength":2},"flightNumber":{"type":"string"},"scheduledDeparture":{"type":"string","format":"date-time"},"scheduledArrival":{"type":"string","format":"date-time"},"awbNumber":{"type":"string"},"shipperCoveredCost":{"type":"boolean"}}},"ShippingRequestDto":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid"},"originAirport":{"type":"string","maxLength":3,"minLength":3},"destinationAirport":{"type":"string","maxLength":3,"minLength":3},"departureDate":{"type":"string","format":"date"},"cargoType":{"type":"string","enum":["GENERAL","PERISHABLE","DANGEROUS_GOODS","LIVE_ANIMALS","VALUABLE","PHARMACEUTICALS","HUMAN_REMAINS","HEAVY"]},"weightKg":{"type":"number"},"shippingUnits":{"type":"integer","format":"int32"},"pieces":{"type":"integer","format":"int32"},"volumeCbm":{"type":"number"},"temperatureRequirement":{"type":"string","enum":["AMBIENT","COOL","CHILLED","FROZEN","DEEP_FROZEN"]},"dangerousGoodsClass":{"type":"string"},"stackable":{"type":"boolean"},"lastMileDelivery":{"type":"boolean"},"lastMileProviderId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["QUALIFIED","SPOT"]},"maxLegs":{"type":"integer","format":"int32"},"prearrangedLegs":{"type":"array","items":{"$ref":"#/components/schemas/PrearrangedLeg"}}},"required":["departureDate","weightKg"]},"LastMileProviderDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"QuoteResponseDto":{"type":"object","properties":{"journeys":{"type":"array","items":{"$ref":"#/components/schemas/QuotedJourneyDto"}}}},"QuotedJourneyDto":{"type":"object","properties":{"index":{"type":"integer","format":"int32"},"totalTransitDays":{"type":"integer","format":"int32"},"estimatedDeliveryDate":{"type":"string","format":"date"},"tags":{"type":"array","items":{"type":"string"}},"legs":{"type":"array","items":{"$ref":"#/components/schemas/QuotedLegDto"}},"lastMile":{"$ref":"#/components/schemas/QuotedLastMileDto"}}},"QuotedLastMileDto":{"type":"object","properties":{"airport":{"type":"string"},"providerId":{"type":"string","format":"uuid"},"providerName":{"type":"string"},"availableProviders":{"type":"array","items":{"$ref":"#/components/schemas/LastMileProviderDto"}}}},"QuotedLegDto":{"type":"object","properties":{"sequence":{"type":"integer","format":"int32"},"originAirport":{"type":"string"},"destinationAirport":{"type":"string"},"carrierIataCode":{"type":"string"},"carrierName":{"type":"string"},"flightNumber":{"type":"string"},"departureDate":{"type":"string","format":"date"},"departureTime":{"type":"string"},"arrivalDate":{"type":"string","format":"date"},"arrivalTime":{"type":"string"}}},"PackageLabelsRequestDto":{"type":"object","properties":{"trackingNumbers":{"type":"array","items":{"type":"string"},"maxItems":2000,"minItems":0}}},"PackageLabelLinkDto":{"type":"object","properties":{"trackingNumber":{"type":"string"},"reference":{"type":"string"},"bookingReference":{"type":"string"},"url":{"type":"string"},"outcome":{"type":"string"}}},"CreateBookingRequestDto":{"type":"object","properties":{"clientId":{"type":"string","format":"uuid"},"originAirport":{"type":"string","maxLength":3,"minLength":3},"destinationAirport":{"type":"string","maxLength":3,"minLength":3},"departureDate":{"type":"string","format":"date"},"cargoType":{"type":"string","enum":["GENERAL","PERISHABLE","DANGEROUS_GOODS","LIVE_ANIMALS","VALUABLE","PHARMACEUTICALS","HUMAN_REMAINS","HEAVY"]},"weightKg":{"type":"number"},"shippingUnits":{"type":"integer","format":"int32"},"pieces":{"type":"integer","format":"int32"},"volumeCbm":{"type":"number"},"temperatureRequirement":{"type":"string","enum":["AMBIENT","COOL","CHILLED","FROZEN","DEEP_FROZEN"]},"dangerousGoodsClass":{"type":"string"},"stackable":{"type":"boolean"},"lastMileDelivery":{"type":"boolean"},"lastMileProviderId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["QUALIFIED","SPOT"]},"maxLegs":{"type":"integer","format":"int32"},"prearrangedLegs":{"type":"array","items":{"$ref":"#/components/schemas/PrearrangedLeg"}},"idempotencyKey":{"type":"string"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/BookingPackageEntryDto"}}},"required":["departureDate","weightKg"]},"CreateBookingResponseDto":{"type":"object","properties":{"journeyId":{"type":"string","format":"uuid"},"bookingReference":{"type":"string"},"status":{"type":"string"},"packagesStatus":{"type":"string"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/PackageWriteResultDto"}},"packagesError":{"type":"string"},"packagesRegistration":{"$ref":"#/components/schemas/ManifestRegistrationDto"}}},"BookingAttachmentDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"documentType":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"}}},"BookingPackageDto":{"type":"object","properties":{"reference":{"type":"string"},"status":{"type":"string"},"weightKg":{"type":"number"},"dimensions":{"$ref":"#/components/schemas/PackageDimensionsDto"},"declaredValue":{"type":"number"},"declaredValueCurrency":{"type":"string"},"recipient":{"$ref":"#/components/schemas/PackageRecipientDto"},"signatureRequired":{"type":"boolean"},"leaveAtDoor":{"type":"boolean"},"doNotDropship":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageLineItemDto"}},"attributes":{"type":"object","additionalProperties":{"type":"object"}},"registration":{"$ref":"#/components/schemas/PackageRegistrationDto"},"deliveryReadiness":{"$ref":"#/components/schemas/PackageDeliveryReadinessDto"},"trackingNumber":{"type":"string"},"labelUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"DeliveryDefectDto":{"type":"object","properties":{"field":{"type":"string"},"reason":{"type":"string"}}},"PackageDeliveryReadinessDto":{"type":"object","properties":{"provider":{"type":"string"},"deliverable":{"type":"boolean"},"defects":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryDefectDto"}}}},"FinalizeBookingRequestDto":{"type":"object","properties":{"mawbNumber":{"type":"string"},"carrierCode":{"type":"string"},"flightNumber":{"type":"string"},"scheduledDeparture":{"type":"string","format":"date-time"},"scheduledArrival":{"type":"string","format":"date-time"}}},"FinalizeBookingResponseDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"closedAt":{"type":"string","format":"date-time"},"closedNow":{"type":"boolean"},"mawbNumber":{"type":"string"},"flightNumber":{"type":"string"},"tenderedParcels":{"type":"integer","format":"int32"},"handovers":{"type":"integer","format":"int32"},"discardedParcels":{"type":"integer","format":"int32"},"discarded":{"type":"array","items":{"type":"string"}}}},"UpdateCargoRequestDto":{"type":"object","properties":{"shippingUnits":{"type":"integer","format":"int32"},"pieces":{"type":"integer","format":"int32"},"weightKg":{"type":"number"},"volumeCbm":{"type":"number"}}},"BookingDetailsDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"healthStatus":{"type":"string"},"origin":{"$ref":"#/components/schemas/RouteEndpointDto"},"destination":{"$ref":"#/components/schemas/RouteEndpointDto"},"totalLegs":{"type":"integer","format":"int32"},"completedLegs":{"type":"integer","format":"int32"},"clientName":{"type":"string"},"cargo":{"$ref":"#/components/schemas/CargoDto"},"legs":{"type":"array","items":{"$ref":"#/components/schemas/LegDto"}},"delivery":{"$ref":"#/components/schemas/DeliveryDto"},"lastMile":{"$ref":"#/components/schemas/LastMileDto"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CargoDto":{"type":"object","properties":{"type":{"type":"string"},"shippingUnits":{"type":"integer","format":"int32"},"pieces":{"type":"integer","format":"int32"},"weightKg":{"type":"number","format":"double"},"chargeableWeightKg":{"type":"number","format":"double"},"volumeCbm":{"type":"number","format":"double"}}},"CountryDto":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"DeliveryDto":{"type":"object","properties":{"estimated":{"type":"string","format":"date-time"},"actual":{"type":"string","format":"date-time"}}},"FlightDto":{"type":"object","properties":{"carrierIataCode":{"type":"string"},"carrierName":{"type":"string"},"flightNumber":{"type":"string"},"scheduled":{"$ref":"#/components/schemas/TimingDto"},"actual":{"$ref":"#/components/schemas/TimingDto"},"delayMinutes":{"type":"integer","format":"int32"}}},"LastMileDto":{"type":"object","properties":{"airport":{"type":"string"},"providerId":{"type":"string","format":"uuid"},"providerName":{"type":"string"},"status":{"type":"string"}}},"LegDto":{"type":"object","properties":{"sequence":{"type":"integer","format":"int32"},"origin":{"$ref":"#/components/schemas/RouteEndpointDto"},"destination":{"$ref":"#/components/schemas/RouteEndpointDto"},"state":{"$ref":"#/components/schemas/LegStateDto"},"flight":{"$ref":"#/components/schemas/FlightDto"},"awbNumber":{"type":"string"}}},"LegStateDto":{"type":"object","properties":{"bookingStatus":{"type":"string"},"flightStatus":{"type":"string"},"disruption":{"type":"string"},"disruptionResolution":{"type":"string"},"legStatus":{"type":"string"}}},"RouteEndpointDto":{"type":"object","properties":{"airport":{"type":"string"},"country":{"$ref":"#/components/schemas/CountryDto"}}},"TimingDto":{"type":"object","properties":{"departure":{"type":"string","format":"date-time"},"arrival":{"type":"string","format":"date-time"}}},"LastEventDto":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"city":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}}},"PackageTrackingDto":{"type":"object","properties":{"trackingNumber":{"type":"string"},"reference":{"type":"string"},"bookingReference":{"type":"string"},"status":{"type":"string"},"destinationAirport":{"type":"string"},"destinationCountry":{"type":"string"},"estimatedDeliveryDate":{"type":"string","format":"date"},"registeredAt":{"type":"string","format":"date-time"},"lastEvent":{"$ref":"#/components/schemas/LastEventDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/PackageTrackingEventDto"}}}},"PackageTrackingEventDto":{"type":"object","properties":{"status":{"type":"string"},"courierCode":{"type":"string"},"description":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}}},"BookingSummaryDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"healthStatus":{"type":"string"},"originAirport":{"type":"string"},"destinationAirport":{"type":"string"},"totalLegs":{"type":"integer","format":"int32"},"completedLegs":{"type":"integer","format":"int32"},"clientName":{"type":"string"},"estimatedDelivery":{"type":"string","format":"date-time"},"actualDelivery":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"LegStatusDto":{"type":"object","properties":{"sequence":{"type":"integer","format":"int32"},"originAirport":{"type":"string"},"destinationAirport":{"type":"string"},"phase":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneDto"}}}},"MilestoneDto":{"type":"object","properties":{"kind":{"type":"string"},"label":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"TrackingStatusDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"healthStatus":{"type":"string"},"milestones":{"type":"array","items":{"$ref":"#/components/schemas/MilestoneDto"}},"legs":{"type":"array","items":{"$ref":"#/components/schemas/LegStatusDto"}},"lastUpdatedAt":{"type":"string","format":"date-time"}}},"BookingPackagesDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"rollup":{"$ref":"#/components/schemas/PackageRollupDto"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/BookingPackageDto"}}}},"BookingLabelsPageDto":{"type":"object","properties":{"bookingReference":{"type":"string"},"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"totalParcels":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int32"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/PackageLabelLinkDto"}}}}},"securitySchemes":{"bearerAuth":{"type":"http","description":"Your Airblox API key (`ak_...`). The gateway verifies it and mints the short-lived internal token the services see — you never send that token yourself, and one you mint is refused at the gateway. The key carries your organisation and client identity in its own claims, which is why no endpoint takes an org or client parameter.","scheme":"bearer","bearerFormat":"JWT"}}}}