{"openapi":"3.0.3","info":{"title":"Airblox ↔ Allied API","version":"1.0.0","license":{"name":"Proprietary","url":"https://airblox.com/legal"},"description":"Integration between Airblox and Allied for air cargo shipments. Airblox opens a shipment with three calls (JSON details, manifest file, AWB file); Allied returns document files (ACAS_STATUS_NOTIFICATION, ACAS, AMS, 7512, 1F_NOMINATION, ISC_RECEIPT, BUP_RECEIPT) via a callback endpoint that takes the AWB and document_type as URL path parameters, which may arrive at different times. The callback is documented as a path under the Airblox callback host so it renders in Swagger UI. All file transfers use multipart/form-data.\n"},"servers":[{"url":"https://api.allied.example","description":"Allied API (Airblox → Allied)"},{"url":"https://api.airblox.com/allied","description":"Airblox callback host (Allied → Airblox)"}],"tags":[{"name":"Shipments","description":"Airblox submits shipments to Allied."},{"name":"Webhooks (Allied → Airblox)","description":"Document file callbacks pushed by Allied to the Airblox callback host. Each operation overrides the server to the Airblox callback host.\n"}],"security":[{"bearerAuth":[]}],"paths":{"/shipments/awb/{awb_number}":{"post":{"tags":["Shipments"],"summary":"Call 1 of 2 — submit shipment details (JSON)","description":"Airblox sends Allied the shipment details as JSON to open the shipment. Send this before the document uploads. The AWB number is the path parameter.\n","operationId":"submitShipmentDetails","parameters":[{"$ref":"#/components/parameters/AwbNumber"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentDetails"}}}},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"409":{"description":"Shipment details already submitted for this AWB."}}}},"/shipments/awb/{awb_number}/document/{document_type}":{"post":{"tags":["Shipments"],"summary":"Call 2 of 2 — upload a document (manifest or AWB)","description":"Upload a document for an existing shipment. One endpoint handles both document types, selected by the document_type path parameter.\n","operationId":"uploadShipmentDocument","parameters":[{"$ref":"#/components/parameters/AwbNumber"},{"$ref":"#/components/parameters/SubmissionDocumentTypePath"}],"requestBody":{"$ref":"#/components/requestBodies/FileUpload"},"responses":{"200":{"$ref":"#/components/responses/Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No shipment details exist yet for this AWB."},"409":{"description":"This document has already been uploaded for this AWB."},"413":{"description":"File exceeds the size limit."},"415":{"description":"File type not supported."}}}},"/awb/{awb_number}/document/{document_type}":{"servers":[{"url":"https://api.airblox.com/allied"}],"post":{"tags":["Webhooks (Allied → Airblox)"],"summary":"Document callback (any type)","description":"Allied posts a document file to Airblox. The AWB and the kind of document are given by the awb_number and document_type path parameters (see enum). One endpoint handles all document types.\n","operationId":"webhookDocument","parameters":[{"$ref":"#/components/parameters/AwbNumber"},{"$ref":"#/components/parameters/DocumentTypePath"}],"requestBody":{"$ref":"#/components/requestBodies/FileUpload"},"responses":{"200":{"$ref":"#/components/responses/CallbackAccepted"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"DocumentType":{"type":"string","enum":["ACAS_STATUS_NOTIFICATION","ACAS","AMS","7512","1F_NOMINATION","ISC_RECEIPT","BUP_RECEIPT"]},"SubmissionDocumentType":{"type":"string","description":"Document types Airblox uploads to Allied at submission.","enum":["MANIFEST","AWB"]},"ShipmentDetails":{"type":"object","required":["originAirport","destinationAirport","departureDate","weightKg","cargoType","pieces","lastMileDelivery","mode"],"properties":{"originAirport":{"type":"string","description":"Origin airport IATA code.","example":"PVG"},"destinationAirport":{"type":"string","description":"Destination airport IATA code.","example":"LIM"},"departureDate":{"type":"string","format":"date","example":"2026-05-20"},"weightKg":{"type":"number","example":850},"cargoType":{"type":"string","description":"Cargo type. Confirm full set with Allied.","example":"GENERAL"},"pieces":{"type":"integer","example":12},"lastMileDelivery":{"type":"boolean","example":false},"mode":{"type":"string","description":"Shipment mode. Confirm full set with Allied.","example":"QUALIFIED"},"prearrangedLegs":{"type":"array","items":{"$ref":"#/components/schemas/PrearrangedLeg"}}}},"PrearrangedLeg":{"type":"object","required":["originAirport","destinationAirport","carrierCode","flightNumber","scheduledDeparture","scheduledArrival","awbNumber","shipperCoveredCost"],"properties":{"originAirport":{"type":"string","example":"PVG"},"destinationAirport":{"type":"string","example":"MIA"},"carrierCode":{"type":"string","example":"5Y"},"flightNumber":{"type":"string","example":"5Y123"},"scheduledDeparture":{"type":"string","format":"date-time","example":"2026-05-20T08:00:00+08:00"},"scheduledArrival":{"type":"string","format":"date-time","example":"2026-05-20T12:20:00-04:00"},"awbNumber":{"type":"string","example":"123-12345675"},"shipperCoveredCost":{"type":"boolean","example":true}}},"SuccessResponse":{"type":"object","properties":{"status":{"type":"string","enum":["success"],"example":"success"}}},"CallbackAck":{"type":"object","properties":{"awb_number":{"type":"string","example":"123-45678901"},"document_type":{"$ref":"#/components/schemas/DocumentType"},"received":{"type":"boolean","example":true}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}},"parameters":{"AwbNumber":{"name":"awb_number","in":"path","required":true,"description":"Air Waybill number.","schema":{"type":"string","pattern":"^[0-9]{3}-[0-9]{8}$","example":"123-45678901"}},"DocumentTypePath":{"name":"document_type","in":"path","required":true,"description":"The kind of document being delivered.","schema":{"$ref":"#/components/schemas/DocumentType"}},"SubmissionDocumentTypePath":{"name":"document_type","in":"path","required":true,"description":"The kind of document being uploaded (manifest or AWB).","schema":{"$ref":"#/components/schemas/SubmissionDocumentType"}}},"responses":{"Success":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"CallbackAccepted":{"description":"Acknowledged by Airblox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallbackAck"}}}},"BadRequest":{"description":"Missing or malformed fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBodies":{"FileUpload":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"The file to upload. Max 25 MB."}}},"encoding":{"file":{"contentType":"application/pdf, text/csv, application/xml"}}}}}}}}