{"openapi":"3.0.2","paths":{"/http/inquiry":{"post":{"summary":"Create a public inquiry","tags":["inquiry"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"contactName":{},"contactEmail":{"type":"string","format":"email","maxLength":255},"subject":{},"description":{"type":"string","minLength":1,"maxLength":8192},"contactPhone":{"type":"string","maxLength":32,"nullable":true},"companyName":{"nullable":true},"polPortId":{"type":"string","format":"uuid","nullable":true},"podPortId":{"type":"string","format":"uuid","nullable":true},"desiredEtd":{"type":"string","nullable":true},"desiredEta":{"type":"string","nullable":true},"cargoDetails":{"nullable":true}},"required":["contactName","contactEmail","subject","description"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"status":{"type":"string","enum":["submitted","reviewed","quoted","closed","cancelled"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":0},"contactName":{"type":"string"},"contactEmail":{"type":"string"},"contactPhone":{"type":"string","nullable":true},"companyName":{"type":"string","nullable":true},"subject":{"type":"string"},"description":{"type":"string"},"desiredEtd":{"type":"string","nullable":true},"desiredEta":{"type":"string","nullable":true},"polPortCode":{"type":"string","nullable":true},"podPortCode":{"type":"string","nullable":true},"quoteReference":{"type":"string","nullable":true},"quotedAt":{"type":"string","format":"date-time","nullable":true},"closedAt":{"type":"string","format":"date-time","nullable":true},"closeReason":{"type":"string","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"cancelReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","status","version","contactName","contactEmail","contactPhone","companyName","subject","description","desiredEtd","desiredEta","quoteReference","quotedAt","closedAt","closeReason","cancelledAt","cancelReason","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/http/inquiry/lookup":{"post":{"summary":"Look up a shipment by job code and PIN","tags":["inquiry"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"jobCode":{"type":"string","minLength":1,"maxLength":64},"pin":{}},"required":["jobCode","pin"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"jobShipment":{"type":"string","nullable":true},"vessel":{"type":"string","nullable":true},"voy":{"type":"string","nullable":true},"pol":{"type":"string","nullable":true},"pod":{"type":"string","nullable":true},"etd":{"type":"string","nullable":true},"eta":{"type":"string","nullable":true},"mblNo":{"type":"string","nullable":true},"hblNo":{"type":"string","nullable":true},"status":{"type":"string"},"polCode":{"type":"string","nullable":true},"podCode":{"type":"string","nullable":true}},"required":["code","jobShipment","vessel","voy","pol","pod","etd","eta","mblNo","hblNo","status"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/http/prealert":{"post":{"summary":"Submit a new pre-alert","tags":["prealert"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"partnerBrandSlug":{"type":"string","nullable":true},"submitterOrganizationId":{"type":"string","format":"uuid"},"expectedArrivalDate":{"type":"string"},"vesselName":{},"portOfLoadingId":{"type":"string","format":"uuid"},"portOfDischargeId":{"type":"string","format":"uuid"},"payloadJson":{"nullable":true},"consigneeCustomerId":{"type":"string","format":"uuid","nullable":true},"agentCustomerId":{"type":"string","format":"uuid","nullable":true},"referenceNo":{"nullable":true},"actualArrivalDate":{"type":"string","nullable":true},"voyageNo":{"type":"string","maxLength":32,"nullable":true},"mblNo":{"nullable":true},"vesselId":{"type":"string","format":"uuid","nullable":true},"carrier":{"type":"string","maxLength":128,"nullable":true},"purchaseOrderNo":{"type":"string","maxLength":64,"nullable":true},"freightTerms":{"type":"string","maxLength":32,"nullable":true},"cargoType":{"type":"string","enum":["LCL","FCL","AIR","CONSO","ECO"],"nullable":true},"hblNo":{"nullable":true},"bookingDate":{"type":"string","nullable":true},"specialHandling":{"type":"string","maxLength":1024,"nullable":true},"shippingMarks":{"type":"string","maxLength":4096,"nullable":true},"container":{"type":"string","maxLength":128,"nullable":true},"shipperName":{"nullable":true},"consigneeName":{"nullable":true},"notifyPartyName":{"nullable":true},"shipperCustomerId":{"type":"string","format":"uuid","nullable":true},"notifyPartyCustomerId":{"type":"string","format":"uuid","nullable":true},"factoryCustomerId":{"type":"string","format":"uuid","nullable":true},"salesManagerStaffId":{"type":"string","format":"uuid","nullable":true},"commodityDescription":{"type":"string","maxLength":1024,"nullable":true},"packageCount":{"type":"integer","minimum":0,"nullable":true},"packageType":{"type":"string","maxLength":32,"nullable":true},"grossWeightKg":{"type":"number","minimum":0,"maximum":999999999.999,"nullable":true},"volumeCbm":{"type":"number","minimum":0,"maximum":9999999.999,"nullable":true},"factoryName":{"nullable":true},"containerNos":{"type":"string","maxLength":1024,"nullable":true},"containerType20":{"type":"string","enum":["fr","gp","hq","ht","ot","pf","rf","rh","rt","sn","tn"],"nullable":true},"containerCount20":{"type":"integer","minimum":0,"nullable":true},"containerType40":{"type":"string","enum":["fr","gp","hq","ht","ot","pf","rf","rh","rt","sn","tn"],"nullable":true},"containerCount40":{"type":"integer","minimum":0,"nullable":true},"vesselCallSign":{"type":"string","maxLength":32,"nullable":true},"etdDate":{"type":"string","nullable":true},"actualDepartureAt":{"type":"string","format":"date-time","nullable":true},"cfsCloseDate":{"type":"string","nullable":true},"memo1":{"type":"string","maxLength":250,"nullable":true},"memo2":{"type":"string","maxLength":250,"nullable":true},"memo3":{"type":"string","maxLength":250,"nullable":true},"memo4":{"type":"string","maxLength":250,"nullable":true},"memo5":{"type":"string","maxLength":250,"nullable":true},"delayInfo":{"type":"string","maxLength":100,"nullable":true},"isFlagged":{"type":"boolean"},"isNominated":{"type":"boolean"},"sourceChannel":{"type":"string","enum":["manual","xml","api","legacy"]},"arrivalMailSentAt":{"type":"string","format":"date-time","nullable":true},"legacyPrimaryFilename":{"type":"string","maxLength":256,"nullable":true},"legacyPrimaryFileUpdatedAt":{"type":"string","format":"date-time","nullable":true}},"required":["submitterOrganizationId","expectedArrivalDate","vesselName","portOfLoadingId","portOfDischargeId"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"code":{"type":"string"},"partnerBrandSlug":{"type":"string","nullable":true},"status":{"type":"string","enum":["submitted","cancelled"]},"referenceNo":{"type":"string","nullable":true},"expectedArrivalDate":{"type":"string","nullable":true},"actualArrivalDate":{"type":"string","nullable":true},"vesselName":{"type":"string","nullable":true},"voyageNo":{"type":"string","nullable":true},"mblNo":{"type":"string","nullable":true},"submittedAt":{"type":"string","format":"date-time","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"acceptedAt":{"type":"string","format":"date-time","nullable":true},"rejectedAt":{"type":"string","format":"date-time","nullable":true},"withdrawnAt":{"type":"string","format":"date-time","nullable":true},"cancelledAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","code","partnerBrandSlug","status","referenceNo","expectedArrivalDate","actualArrivalDate","vesselName","voyageNo","mblNo","submittedAt","reviewedAt","acceptedAt","rejectedAt","withdrawnAt","cancelledAt","createdAt","updatedAt"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"429":{"description":"429","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"501":{"description":"501","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/http/agent/status/{submissionId}":{"get":{"summary":"Look up agent submission status","tags":["agent"],"parameters":[{"name":"submissionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["draft","submitted","under_review","accepted","rejected","withdrawn"]},"submittedAt":{"type":"string","format":"date-time","nullable":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true},"rejectionReason":{"type":"string","nullable":true}},"required":["id","status","submittedAt","reviewedAt","rejectionReason"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}},"/http/v1/freight/stock-updates":{"post":{"summary":"Receive the stock-in and stock-out values of import consolidation jobs","tags":["freight"],"parameters":[],"requestBody":{"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","nullable":true},"items":{"type":"array","items":{"nullable":true},"minItems":1,"maxItems":200,"description":"Rows of JobCode, SubCode, StockInDate, StockInTime, StockOutDate, StockOutTime, StockUpdated and Operator (FreightStockUpdateItem)"}},"required":["items"]}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"JobCode":{"type":"string","nullable":true},"SubCode":{"type":"integer","nullable":true},"result":{"type":"string","enum":["applied","unchanged","stale","not_found","rejected"]},"reason":{"type":"string","enum":["INVALID_ROW","INVALID_STOCK_UPDATED","INVALID_STOCK_IN_DATE","INVALID_STOCK_IN_TIME","INVALID_STOCK_OUT_DATE","INVALID_STOCK_OUT_TIME","NOT_IMPORT_CONSOLIDATION"]}},"required":["JobCode","SubCode","result"]}}},"required":["results"]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}},"500":{"description":"500","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}},"required":["error"]}}}}}}}},"info":{"title":"freightman external HTTP API","version":"0.1.0","description":"Public HTTP surface for freightman. Gated by `X-API-Key`; see RULES.md for the contract pattern. Internal dashboards talk tRPC at `/trpc` — everything here is explicitly external-facing."},"servers":[{"url":"/"}]}