{ "openapi": "3.0.0", "info": { "title": "Terminal49 API Reference", "version": "0.2.0", "contact": { "name": "Terminal49 API support", "url": "https://www.terminal49.com", "email": "support@terminal49.com" }, "description": "The Terminal 49 API offers a convenient way to programmatically track your shipments from origin to destination.\n\nPlease enter your API key into the \"Variables\" tab before using these endpoints within Postman.", "x-label": "Beta", "termsOfService": "https://www.terminal49.com/terms" }, "servers": [ { "url": "https://api.terminal49.com/v2", "description": "Production" } ], "paths": { "/shipments": { "get": { "summary": "List shipments", "tags": [ "Shipments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/shipment" } }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/port" }, { "$ref": "#/components/schemas/terminal" } ] } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } }, "examples": { "En-route to NY with inland move": { "value": { "data": [ { "id": "62738624-7032-4a50-892e-c55826228c25", "type": "shipment", "attributes": { "created_at": "2024-06-26T17:28:59Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "OOLU2148468620", "normalized_number": "2148468620", "shipping_line_scac": "OOLU", "shipping_line_name": "Orient Overseas Container Line", "shipping_line_short_name": "OOCL", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "CNNBG", "port_of_lading_name": "Ningbo", "port_of_discharge_locode": "USLAX", "port_of_discharge_name": "Los Angeles", "pod_vessel_name": "EVER FORWARD", "pod_vessel_imo": "9850551", "pod_voyage_number": "1119E", "destination_locode": "USCLE", "destination_name": "Cleveland", "destination_timezone": "America/New_York", "destination_ata_at": null, "destination_eta_at": "2024-07-02T08:00:00Z", "pol_etd_at": null, "pol_atd_at": "2024-06-09T03:42:00Z", "pol_timezone": "Asia/Shanghai", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": "2024-06-22T13:36:00Z", "pod_timezone": "America/Los_Angeles", "line_tracking_last_attempted_at": "2024-06-26T17:28:59Z", "line_tracking_last_succeeded_at": "2024-06-26T17:28:59Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/62738624-7032-4a50-892e-c55826228c25" }, "relationships": { "port_of_lading": { "data": { "id": "2a90c27b-c2ee-45e2-892f-5c695d74e2d0", "type": "port" } }, "port_of_discharge": { "data": { "id": "47b27584-4ec9-4e2f-95e1-7a42928cc40c", "type": "port" } }, "pod_terminal": { "data": { "id": "42c53b13-0d29-4fa6-8663-7343a56319f1", "type": "terminal" } }, "destination": { "data": { "id": "3b1cc325-ffe9-400a-82ce-f5c4891af382", "type": "port" } }, "destination_terminal": { "data": { "id": "ce22669e-14b2-4501-b782-f0a360f07cd0", "type": "terminal" } }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "7aefc29e-0898-4825-8376-4f998b51d033", "type": "container" } ] } } }, { "id": "baaa725e-aa0e-4937-ac78-54d9e2e8621e", "type": "shipment", "attributes": { "created_at": "2024-06-26T16:47:42Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "HDMUTAOM72244900", "normalized_number": "TAOM72244900", "shipping_line_scac": "HDMU", "shipping_line_name": "Hyundai Merchant Marine", "shipping_line_short_name": "Hyundai", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "CNQDG", "port_of_lading_name": "Qingdao", "port_of_discharge_locode": "USSAV", "port_of_discharge_name": "Savannah", "pod_vessel_name": "UMM SALAL", "pod_vessel_imo": "9525857", "pod_voyage_number": "0038E", "destination_locode": "USROQ", "destination_name": "Rossville", "destination_timezone": "America/Chicago", "destination_ata_at": null, "destination_eta_at": "2024-06-30T07:05:00Z", "pol_etd_at": null, "pol_atd_at": "2024-05-07T03:01:00Z", "pol_timezone": "Asia/Shanghai", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": "2024-06-20T21:27:00Z", "pod_timezone": "America/New_York", "line_tracking_last_attempted_at": "2024-06-26T16:48:04Z", "line_tracking_last_succeeded_at": "2024-06-26T16:48:04Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/baaa725e-aa0e-4937-ac78-54d9e2e8621e" }, "relationships": { "port_of_lading": { "data": { "id": "0ccbe8af-c8d0-4abd-a842-3bfad1d82024", "type": "port" } }, "port_of_discharge": { "data": { "id": "6129528d-846e-4571-ae16-b5328a4285ab", "type": "port" } }, "pod_terminal": { "data": { "id": "a243bdf8-0da3-4056-a6a7-05fe8ab43999", "type": "terminal" } }, "destination": { "data": { "id": "87ca3f37-e4d1-46eb-9eb1-6b5ffafde95d", "type": "port" } }, "destination_terminal": { "data": null }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "772cd872-9677-4c68-9b7a-4e9e843b00e2", "type": "container" }, { "id": "52efc544-0de1-452f-bcf8-0290a6ce5c11", "type": "container" }, { "id": "3107692e-61ad-4b4c-b3d4-78348b2e37ff", "type": "container" } ] } } }, { "id": "7721a48c-5e93-43c9-9f5f-5be10a87fdde", "type": "shipment", "attributes": { "created_at": "2024-06-26T16:28:39Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "OOLU2738424980", "normalized_number": "2738424980", "shipping_line_scac": "OOLU", "shipping_line_name": "Orient Overseas Container Line", "shipping_line_short_name": "OOCL", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "ITSPE", "port_of_lading_name": "La Spezia", "port_of_discharge_locode": "USSAV", "port_of_discharge_name": "Savannah", "pod_vessel_name": "OOCL GUANGZHOU", "pod_vessel_imo": "9404869", "pod_voyage_number": "162E", "destination_locode": "USATL", "destination_name": "Atlanta", "destination_timezone": "America/New_York", "destination_ata_at": null, "destination_eta_at": "2024-06-27T06:42:00Z", "pol_etd_at": null, "pol_atd_at": "2024-06-05T08:03:00Z", "pol_timezone": "Europe/Rome", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": "2024-06-23T15:34:00Z", "pod_timezone": "America/New_York", "line_tracking_last_attempted_at": "2024-06-26T16:28:39Z", "line_tracking_last_succeeded_at": "2024-06-26T16:28:39Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/7721a48c-5e93-43c9-9f5f-5be10a87fdde" }, "relationships": { "port_of_lading": { "data": { "id": "b5656766-a56f-4b32-8e03-d240e7519604", "type": "port" } }, "port_of_discharge": { "data": { "id": "6129528d-846e-4571-ae16-b5328a4285ab", "type": "port" } }, "pod_terminal": { "data": { "id": "a243bdf8-0da3-4056-a6a7-05fe8ab43999", "type": "terminal" } }, "destination": { "data": { "id": "7daf9ea3-3018-4d62-b88c-43803df9030c", "type": "port" } }, "destination_terminal": { "data": { "id": "022ef8fc-1e2a-4ad6-8eae-330d65eb1c8e", "type": "terminal" } }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "2a25fd3e-a18e-47cc-9cea-62771e82d0f2", "type": "container" }, { "id": "6cdc725d-2b31-40f9-86dd-76225390a488", "type": "container" }, { "id": "2f1e9a9d-4689-4f4d-84a8-64409b56521d", "type": "container" } ] } } }, { "id": "32b5ad78-43ba-42d9-bdc0-4cf12320e020", "type": "shipment", "attributes": { "created_at": "2024-06-26T15:59:52Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "OOLU2738277190", "normalized_number": "2738277190", "shipping_line_scac": "OOLU", "shipping_line_name": "Orient Overseas Container Line", "shipping_line_short_name": "OOCL", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "CNQDG", "port_of_lading_name": "Qingdao", "port_of_discharge_locode": "USLAX", "port_of_discharge_name": "Los Angeles", "pod_vessel_name": "EVER FORWARD", "pod_vessel_imo": "9850551", "pod_voyage_number": "1119E", "destination_locode": "USMEM", "destination_name": "Memphis", "destination_timezone": "America/Chicago", "destination_ata_at": null, "destination_eta_at": "2024-07-01T14:00:00Z", "pol_etd_at": null, "pol_atd_at": "2024-06-02T18:22:00Z", "pol_timezone": "Asia/Shanghai", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": "2024-06-22T13:36:00Z", "pod_timezone": "America/Los_Angeles", "line_tracking_last_attempted_at": "2024-06-26T15:59:52Z", "line_tracking_last_succeeded_at": "2024-06-26T15:59:52Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/32b5ad78-43ba-42d9-bdc0-4cf12320e020" }, "relationships": { "port_of_lading": { "data": { "id": "0ccbe8af-c8d0-4abd-a842-3bfad1d82024", "type": "port" } }, "port_of_discharge": { "data": { "id": "47b27584-4ec9-4e2f-95e1-7a42928cc40c", "type": "port" } }, "pod_terminal": { "data": { "id": "42c53b13-0d29-4fa6-8663-7343a56319f1", "type": "terminal" } }, "destination": { "data": { "id": "ba0b9f68-2025-40ca-ae12-1c2210cca333", "type": "port" } }, "destination_terminal": { "data": { "id": "d0ec0da1-8a3a-4b11-b1e3-5716bbc71dc3", "type": "terminal" } }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "60d2fd62-14e2-4ca2-a927-9633fc58fdff", "type": "container" }, { "id": "0ffe3e75-b3df-4d20-b9f4-97bbbcec404d", "type": "container" } ] } } }, { "id": "bd117d3b-8fa4-487c-9bab-25c15e227d1a", "type": "shipment", "attributes": { "created_at": "2024-06-26T15:59:35Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "OOLU2147973020", "normalized_number": "2147973020", "shipping_line_scac": "OOLU", "shipping_line_name": "Orient Overseas Container Line", "shipping_line_short_name": "OOCL", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "IDSUB", "port_of_lading_name": "Surabaya", "port_of_discharge_locode": "USLAX", "port_of_discharge_name": "Los Angeles", "pod_vessel_name": "CMA CGM A.LINCOLN", "pod_vessel_imo": "9780859", "pod_voyage_number": "1TU70E1MA", "destination_locode": null, "destination_name": null, "destination_timezone": null, "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": "2024-05-14T02:37:00Z", "pol_timezone": "Asia/Jakarta", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": "2024-06-23T21:58:00Z", "pod_timezone": "America/Los_Angeles", "line_tracking_last_attempted_at": "2024-06-26T15:59:35Z", "line_tracking_last_succeeded_at": "2024-06-26T15:59:35Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/bd117d3b-8fa4-487c-9bab-25c15e227d1a" }, "relationships": { "port_of_lading": { "data": { "id": "4201ab42-c51f-48ac-b7a1-12146e02c6a2", "type": "port" } }, "port_of_discharge": { "data": { "id": "47b27584-4ec9-4e2f-95e1-7a42928cc40c", "type": "port" } }, "pod_terminal": { "data": { "id": "eaa2580c-5f5b-4198-85e4-821145d62098", "type": "terminal" } }, "destination": { "data": null }, "destination_terminal": { "data": null }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "815ff702-fdb5-4455-a28e-314c345d7481", "type": "container" } ] } } } ], "meta": { "size": 5, "total": 34044 }, "links": { "self": "https://api.terminal49.com/v2/shipments?page[size]=5", "current": "https://api.terminal49.com/v2/shipments?page[number]=1&page[size]=5", "next": "https://api.terminal49.com/v2/shipments?page[number]=2&page[size]=5", "last": "https://api.terminal49.com/v2/shipments?page[number]=6809&page[size]=5" } } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Errors": { "value": { "error": [ { "title": "Invalid arrival_date_from", "detail": "filter['arrival_from'] must be in the format 'YYYY-MM-DD' and a valid date" }, { "title": "Invalid arrival_date_to", "detail": "filter['arrival_from'] must be in the format 'YYYY-MM-DD' and a valid date" }, { "title": "Invalid port_of_lading", "detail": "port_of_discharge must be an array of 5 character UN/LOCODEs" }, { "title": "Invalid port_of_discharge", "detail": "port_of_discharge must be an array of 5 character UN/LOCODEs" } ] } } } } } } }, "operationId": "get-shipments", "description": "Returns a list of your shipments. The shipments are returned sorted by creation date, with the most recent shipments appearing first.\n\nThis api will return all shipments associated with the account. Shipments created via the `tracking_request` API aswell as the ones added via the dashboard will be retuned via this endpoint. ", "parameters": [ { "schema": { "type": "integer", "default": 1 }, "in": "query", "name": "page[number]", "description": "\n" }, { "schema": { "type": "integer", "default": 30 }, "in": "query", "name": "page[size]", "description": "\n" }, { "schema": { "type": "string" }, "in": "query", "name": "q", "description": "\nSearch shipments by master bill of lading, reference number, or container number.", "deprecated": true }, { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include" }, { "schema": { "type": "string" }, "in": "query", "name": "number", "description": "Search shipments by the original tracking `request_number` — typically a master bill of lading or booking number. This filter does **not** match container numbers; to look up a shipment by container number, use `GET /containers?filter[number]={container_number}` and include the related shipment via `include=shipment`." }, { "schema": { "type": "boolean" }, "in": "query", "name": "filter[tracking_stopped]", "description": "Filter shipments by whether they are still tracking or not" } ] } }, "/shipments/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Shipment Id" } ], "get": { "summary": "Get a shipment", "tags": [ "Shipments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/shipment" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/port" }, { "$ref": "#/components/schemas/terminal" } ] } } } }, "examples": { "En-route to NY with inland move": { "value": { "data": { "id": "02b1bd6f-407c-45bb-8645-06e7ee34e7e3", "type": "shipment", "attributes": { "created_at": "2024-06-26T15:05:20Z", "ref_numbers": [], "tags": [], "bill_of_lading_number": "MEDUF5399896", "normalized_number": "MEDUF5399896", "shipping_line_scac": "MSCU", "shipping_line_name": "Mediterranean Shipping Company", "shipping_line_short_name": "MSC", "customer_name": "Sodor Steamworks", "port_of_lading_locode": "FRLEH", "port_of_lading_name": "Le Havre", "port_of_discharge_locode": "USNYC", "port_of_discharge_name": "New York / New Jersey", "pod_vessel_name": "MSC ANISHA R.", "pod_vessel_imo": "9227297", "pod_voyage_number": "421A", "destination_locode": "USIND", "destination_name": "Indianapolis", "destination_timezone": "US/Eastern", "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": "2024-06-11T22:00:00Z", "pol_timezone": "Europe/Paris", "pod_eta_at": null, "pod_original_eta_at": null, "pod_ata_at": null, "pod_timezone": "America/New_York", "line_tracking_last_attempted_at": "2024-06-26T15:05:20Z", "line_tracking_last_succeeded_at": "2024-06-26T15:05:20Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "links": { "self": "/v2/shipments/02b1bd6f-407c-45bb-8645-06e7ee34e7e3" }, "relationships": { "port_of_lading": { "data": { "id": "fe7fc831-8a81-4079-8938-b90015912e8b", "type": "port" } }, "port_of_discharge": { "data": { "id": "f7cb530a-9e60-412c-a5bc-205a2f34ba54", "type": "port" } }, "pod_terminal": { "data": { "id": "b859f5c3-8515-41da-bf20-39c0a5ada887", "type": "terminal" } }, "destination": { "data": { "id": "e1e492f6-c8ba-45a9-ad1a-67a7e74547ce", "type": "port" } }, "destination_terminal": { "data": null }, "line_tracking_stopped_by_user": { "data": null }, "containers": { "data": [ { "id": "55a700e4-7005-45a9-92fd-1ff38641dbd9", "type": "container" } ] } } }, "links": { "self": "https://api.terminal49.com/v2/shipments/02b1bd6f-407c-45bb-8645-06e7ee34e7e3?include=containers" }, "included": [ { "id": "55a700e4-7005-45a9-92fd-1ff38641dbd9", "type": "container", "attributes": { "number": "CAIU7432986", "seal_number": null, "created_at": "2024-06-26T15:05:21Z", "ref_numbers": [], "pod_arrived_at": null, "pod_discharged_at": "2024-06-22T04:00:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": true, "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T17:51:12Z", "fees_at_pod_terminal": [], "pickup_lfd": "2024-07-07T04:00:00Z", "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Yard - Y0709A", "pod_last_tracking_request_at": "2024-06-26T17:51:12Z", "shipment_last_tracking_request_at": "2024-06-26T15:05:20Z", "availability_known": true, "pod_timezone": "America/New_York", "final_destination_timezone": "US/Eastern", "empty_terminated_timezone": "US/Eastern", "pod_rail_carrier_scac": "CSXT", "ind_rail_carrier_scac": "CSXT", "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": null, "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": "2024-07-07T04:00:00Z", "pickup_lfd_rail": null, "pickup_lfd_line": "2024-07-07T04:00:00Z" }, "current_status": "available" }, "relationships": { "shipment": { "data": { "id": "02b1bd6f-407c-45bb-8645-06e7ee34e7e3", "type": "shipment" } }, "pickup_facility": { "data": null }, "pod_terminal": { "data": { "id": "b859f5c3-8515-41da-bf20-39c0a5ada887", "type": "terminal" } }, "transport_events": { "data": [ { "id": "45b542cb-332b-4684-b915-42e3a0759823", "type": "transport_event" }, { "id": "174ed528-a1a9-4002-aef0-f2c9369199da", "type": "transport_event" }, { "id": "7a2f30a6-a756-4c14-9477-fbfc1c7fe2f8", "type": "transport_event" }, { "id": "e7365004-175a-46e8-96cd-dbed0f3daf21", "type": "transport_event" }, { "id": "7c567bf3-7f01-4a3d-a176-eaa1f7165585", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "2956f71c-bfb9-4e49-b9e2-1b4d53c74cac", "type": "raw_event" }, { "id": "391e0eda-65b5-4fc3-a53d-25ecd9570259", "type": "raw_event" }, { "id": "74810c04-6c8a-4194-8cff-52936584a965", "type": "raw_event" }, { "id": "4b1500e2-b23b-4896-87bd-c38b1d16f385", "type": "raw_event" }, { "id": "8b9a7d88-720a-4304-8c1e-a3336e39f481", "type": "raw_event" }, { "id": "bf1f59c5-5dd8-4013-87f9-d7056bc87114", "type": "raw_event" } ] } } } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Not Found": { "value": { "errors": [ { "status": "404", "title": "Not Found" } ] } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "invalid_rotation": { "summary": "Invalid rotation degrees", "value": { "errors": [ { "status": "422", "title": "Invalid rotation", "detail": "degrees must be one of: 90, 180, 270" } ] } }, "no_document_attached": { "summary": "No file attached", "value": { "errors": [ { "status": "422", "title": "No document attached" } ] } } } } } } }, "operationId": "get-shipment-id", "description": "Retrieves the details of an existing shipment. You need only supply the unique shipment `id` that was returned upon `tracking_request` creation.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include" } ] }, "patch": { "summary": "Edit a shipment", "operationId": "patch-shipments-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/shipment" } } } } } } }, "description": "Update a shipment", "tags": [ "Shipments" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes" ], "properties": { "attributes": { "type": "object", "properties": { "ref_numbers": { "type": "array", "example": [ "REFNUMBER10" ], "description": "Shipment ref numbers.", "items": { "type": "string" } }, "tags": { "type": "array", "x-stoplight": { "id": "02itol38fmg55" }, "uniqueItems": true, "description": "Tags related to a shipment", "items": { "x-stoplight": { "id": "64x90wvr9d6nd" }, "type": "string", "example": "tag1, tag2" } } } } } } } } } } } } }, "/shipments/{id}/stop_tracking": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "patch": { "summary": "Stop tracking a shipment", "operationId": "patch-shipments-id-stop-tracking", "tags": [ "Shipments" ], "description": "We'll stop tracking the shipment, which means that there will be no more updates. You can still access the shipment's previously-collected information via the API or dashboard.\n\nYou can resume tracking a shipment by calling the `resume_tracking` endpoint, but keep in mind that some information is only made available by our data sources at specific times, so a stopped and resumed shipment may have some information missing.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/shipment" } } } } } } } } }, "/shipments/{id}/resume_tracking": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "patch": { "summary": "Resume tracking a shipment", "operationId": "patch-shipments-id-resume-tracking", "tags": [ "Shipments" ], "description": "Resume tracking a shipment. Keep in mind that some information is only made available by our data sources at specific times, so a stopped and resumed shipment may have some information missing.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/shipment" } } } } } } } } }, "/tracking_requests": { "post": { "summary": "Create a tracking request", "operationId": "post-track", "responses": { "201": { "description": "Tracking Request Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/tracking_request" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/shipping_line" } ] } } } }, "examples": { "Pending Tracking Request": { "value": { "data": { "id": "ba4cb904-827f-4038-8e31-1e92b3356218", "type": "tracking_request", "attributes": { "request_number": "MEDUFR030802", "request_type": "bill_of_lading", "scac": "MSCU", "ref_numbers": [], "created_at": "2020-04-04T16:13:35-07:00", "updated_at": "2020-04-04T17:13:35-07:00", "status": "pending", "failed_reason": null }, "relationships": { "tracked_object": { "data": null }, "customer": { "data": { "id": "f7cb530a-9e60-412c-a5bc-205a2f34ba54", "type": "party" } } }, "links": { "self": "/v2/tracking_requests/ba4cb904-827f-4038-8e31-1e92b3356218" } } } } } } }, "headers": {} }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Error Examples": { "value": { "errors": [ { "status": "422", "source": { "pointer": "/data/attributes/scac" }, "title": "Unprocessable Entity", "detail": "Scac can't be blank", "code": "blank" }, { "status": "422", "source": { "pointer": "/data/attributes/scac" }, "title": "Unprocessable Entity", "detail": "Scac 'XXXX' is not recognized", "code": "blank" }, { "status": "422", "source": { "pointer": "/data/attributes/scac" }, "title": "Unprocessable Entity", "detail": "Scac 'UALC' is not supported. We do not currently integrate with Universal Africa Lines", "code": "blank" }, { "status": "422", "source": { "pointer": "/data/attributes/request_number" }, "title": "Unprocessable Entity", "detail": "Request number can't be blank", "code": "blank" } ] } } } } } }, "429": { "description": "Too Many Requests - You've hit the create tracking requests limit. Please try again in a minute.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "429" }, "title": { "type": "string", "example": "Too Many Requests" }, "detail": { "type": "string", "example": "You've hit the create tracking requests limit. Please try again in a minute." } } } } } } } }, "headers": { "Retry-After": { "description": "Number of seconds to wait before making another request", "schema": { "type": "integer", "example": 60 } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "attributes": { "type": "object", "properties": { "request_type": { "type": "string", "example": "bill_of_lading", "enum": [ "bill_of_lading", "booking_number", "container" ], "description": " The type of document number to be supplied. Container number support is currently in BETA." }, "request_number": { "type": "string", "example": "MEDUFR030802" }, "scac": { "type": "string", "description": "The carrier SCAC to use for this tracking request. Required unless `auto_detect_vocc_scac` is `true`.", "example": "MSCU", "minLength": 4, "maxLength": 4 }, "auto_detect_vocc_scac": { "type": "boolean", "description": "Set to `true` to have Terminal49 infer the carrier SCAC from `request_number` when `scac` is not supplied. Detection is asynchronous: the tracking request is created immediately (HTTP `201`) with `status: \"pending\"` and `scac: null`. If a carrier is inferred, the request transitions to `status: \"created\"` with the detected `scac` populated. If no supported carrier can be inferred, it transitions to `status: \"failed\"` with `failed_reason: \"scac_auto_detect_failed\"` and no shipment is created. Poll the tracking request or use webhooks to observe the outcome \u2014 the create response does not include the detected `scac`.", "default": false, "example": true }, "ref_numbers": { "type": "array", "description": "Optional list of reference numbers to be added to the shipment when tracking request completes", "items": { "type": "string" } }, "shipment_tags": { "type": "array", "description": "Optional list of tags to be added to the shipment when tracking request completes", "items": { "type": "string" } } }, "required": [ "request_type", "request_number" ] }, "relationships": { "type": "object", "properties": { "customer": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "party" ] } } } } } } }, "type": { "enum": [ "tracking_request" ], "type": "string" } }, "required": [ "type" ] } } }, "examples": { "Example: MSC BL": { "value": { "data": { "attributes": { "request_type": "bill_of_lading", "request_number": "MEDUFR030802", "ref_numbers": [ "PO12345", "HBL12345", "CUSREF1234" ], "shipment_tags": [ "camembert" ], "scac": "MSCU" }, "relationships": { "customer": { "data": { "id": "f7cb530a-9e60-412c-a5bc-205a2f34ba54", "type": "party" } } }, "type": "tracking_request" } } }, "Example: Auto-detect carrier SCAC": { "value": { "data": { "attributes": { "request_type": "bill_of_lading", "request_number": "MEDUFR030802", "auto_detect_vocc_scac": true, "ref_numbers": [ "PO12345" ] }, "type": "tracking_request" } } } } } }, "description": "Create a shipment tracking request" }, "security": [ { "authorization": [] } ], "description": "To track an ocean shipment, create a new tracking request. `request_type` and `request_number` are always required. Supply either a shipping line `scac` or set `auto_detect_vocc_scac` to `true` to have Terminal49 infer the SCAC from the request number before creating the tracking request.\n\nAuto-detection uses the same carrier prediction capability as the Infer Tracking Number endpoint and runs asynchronously. The tracking request is created immediately (HTTP `201`) with `status: \"pending\"`; if no supported carrier can be inferred it transitions to `status: \"failed\"` with `failed_reason: \"scac_auto_detect_failed\"` and no shipment is created. Once a tracking request is created we will attempt to fetch the shipment details and its related containers from the shipping line. If the attempt is successful we will create a new shipment object including any related container objects. We will send a `tracking_request.succeeded` webhook notification to your webhooks.\n\nIf the attempt to fetch fails then we will send a `tracking_request.failed` webhook notification to your `webhooks`.\n\nA `tracking_request.succeeded` or `tracking_request.failed` webhook notification will only be sent if you have at least one active webhook.

This endpoint is limited to 100 tracking requests per minute.", "tags": [ "Tracking Requests" ], "parameters": [] }, "parameters": [], "get": { "summary": "List tracking requests", "operationId": "get-tracking-requests", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/tracking_request" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/shipping_line" }, { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] }, "links": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } } } }, "description": "" } ] } } } }, "examples": {} } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Not Found": { "value": { "errors": [ { "status": "404", "title": "Not Found" } ] } } } } } } }, "description": "Returns a list of your tracking requests. The tracking requests are returned sorted by creation date, with the most recent tracking request appearing first.", "tags": [ "Tracking Requests" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "q", "description": "A search term to be applied against request_number and reference_numbers.", "deprecated": true }, { "schema": { "type": "string" }, "in": "query", "name": "filter[request_number]", "description": "filter by `request_number`" }, { "schema": { "type": "string", "enum": [ "created", "pending", "failed" ], "example": "created" }, "in": "query", "name": "filter[status]", "description": "filter by `status`" }, { "schema": { "type": "string", "example": "MSCU" }, "in": "query", "name": "filter[scac]", "description": "filter by shipping line `scac`" }, { "schema": { "type": "string", "example": "2020-04-28T22:59:15Z", "format": "date-time" }, "in": "query", "name": "filter[created_at][start]", "description": "filter by tracking_requests `created_at` after a certain ISO8601 timestamp" }, { "schema": { "type": "string", "format": "date-time", "example": "2020-04-28T22:59:15Z" }, "in": "query", "description": "filter by tracking_requests `created_at` before a certain ISO8601 timestamp", "name": "filter[created_at][end]" }, { "schema": { "type": "string", "example": "2020-04-28T22:59:15Z", "format": "date-time" }, "in": "query", "name": "filter[updated_at][start]", "description": "filter by tracking_requests `updated_at` after a certain ISO8601 timestamp" }, { "schema": { "type": "string", "format": "date-time", "example": "2020-04-28T22:59:15Z" }, "in": "query", "description": "filter by tracking_requests `updated_at` before a certain ISO8601 timestamp", "name": "filter[updated_at][end]" }, { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include. 'tracked_object' is included by default." }, { "schema": { "type": "integer" }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer" }, "in": "query", "name": "page[size]" } ] } }, "/tracking_requests/infer_number": { "post": { "summary": "Infer Tracking Number", "operationId": "post-infer-number", "x-beta": true, "description": "Predict the carrier SCAC (VOCC) and number type from a tracking number. Provide a container number, bill of lading number, or booking number and receive the predicted carrier with confidence and a decision value. Use this to auto-populate carrier fields before creating a tracking request.", "tags": [ "Tracking Requests" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "The tracking number to analyze (container number, bill of lading, or booking number)", "example": "WHLU1234560" } }, "required": [ "number" ] }, "examples": { "Container Number": { "value": { "number": "WHLU1234560" } }, "Bill of Lading": { "value": { "number": "EGLV084900042045" } } } } } }, "responses": { "200": { "description": "Successfully inferred number type and shipping line", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "example": "req_123e4567-e89b-12d3-a456-426614174000" }, "type": { "type": "string", "example": "infer_number_results" }, "attributes": { "type": "object", "properties": { "number_type": { "type": "string", "enum": [ "container", "bill_of_lading", "booking" ] }, "validation": { "type": "object", "properties": { "is_valid": { "type": "boolean", "nullable": true }, "type": { "type": "string", "enum": [ "container", "shipment" ] }, "check_digit_passed": { "type": "boolean", "nullable": true }, "parsed_number": { "type": "string", "nullable": true }, "reason": { "type": "string", "nullable": true } } }, "shipping_line": { "type": "object", "properties": { "decision": { "type": "string", "enum": [ "auto_select", "needs_confirmation", "no_prediction" ] }, "selected": { "type": "object", "nullable": true, "properties": { "scac": { "type": "string" }, "name": { "type": "string" }, "confidence": { "type": "number" } } }, "candidates": { "type": "array", "items": { "type": "object", "properties": { "scac": { "type": "string" }, "name": { "type": "string" }, "confidence": { "type": "number" } } } } } } } } } } } }, "examples": { "Container - Auto Select": { "value": { "data": { "id": "req_123e4567-e89b-12d3-a456-426614174000", "type": "infer_number_results", "attributes": { "number_type": "container", "validation": { "is_valid": true, "type": "container", "check_digit_passed": true, "parsed_number": null, "reason": null }, "shipping_line": { "decision": "auto_select", "selected": { "scac": "WHLC", "name": "Wan Hai Lines", "confidence": 1 }, "candidates": [ { "scac": "WHLC", "name": "Wan Hai Lines", "confidence": 1 } ] } } } } } } } } }, "422": { "description": "Unprocessable Entity - Invalid tracking number format", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string" }, "detail": { "type": "string" } } } } } }, "examples": { "Invalid Number": { "value": { "errors": [ { "status": "422", "detail": "This reference number is not valid." } ] } } } } } }, "429": { "description": "Too Many Requests - Rate limit exceeded", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string" }, "detail": { "type": "string" } } } } } }, "examples": { "Rate Limit Exceeded": { "value": { "errors": [ { "status": "429", "detail": "Rate limit exceeded" } ] } } } } }, "headers": { "Retry-After": { "description": "Number of seconds to wait before making another request", "schema": { "type": "integer", "example": 60 } } } } }, "security": [ { "authorization": [] } ] } }, "/tracking_requests/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Tracking Request ID" } ], "get": { "summary": "Get a single tracking request", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/tracking_request" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/shipping_line" } ] } } } }, "examples": { "With Status Created": { "value": { "data": { "id": "ba4cb904-827f-4038-8e31-1e92b3356218", "type": "tracking_request", "attributes": { "request_number": "MEDUFR030802", "request_type": "bill_of_lading", "scac": "MSCU", "ref_numbers": [], "created_at": "2020-04-04T16:13:35-07:00", "updated_at": "2020-04-04T17:13:35-07:00", "status": "created", "failed_reason": null }, "relationships": { "tracked_object": { "data": { "id": "eb6f218a-0b4a-47f9-8ef9-759aa5e0ea83", "type": "shipment" } } }, "links": { "self": "/v2/tracking_requests/ba4cb904-827f-4038-8e31-1e92b3356218" } }, "included": [ { "id": "eb6f218a-0b4a-47f9-8ef9-759aa5e0ea83", "type": "shipment", "attributes": { "created_at": "2020-04-04T16:13:37-07:00", "bill_of_lading_number": "MEDUFR030802", "ref_numbers": [], "shipping_line_scac": "MSCU", "shipping_line_name": "Mediterranean Shipping Company", "port_of_lading_locode": "FRFOS", "port_of_lading_name": "Fos-Sur-Mer", "port_of_discharge_locode": "USOAK", "port_of_discharge_name": "Oakland", "pod_vessel_name": "MSC ALGECIRAS", "pod_vessel_imo": "9605243", "pod_voyage_number": "920A", "destination_locode": "USOAK", "destination_name": "Oakland", "destination_timezone": "America/Los_Angeles", "destination_ata_at": "2019-06-21T18:46:00-07:00", "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": "2019-05-24T03:00:00-07:00", "pol_timezone": "Europe/Paris", "pod_eta_at": null, "pod_ata_at": "2019-06-21T18:46:00-07:00", "pod_timezone": "America/Los_Angeles" }, "relationships": { "port_of_lading": { "data": { "id": "6d8c6c29-72a6-49ad-87b7-fd045f202212", "type": "port" } }, "port_of_discharge": { "data": { "id": "42d1ba3a-f4b8-431d-a6fe-49fd748a59e7", "type": "port" } }, "pod_terminal": { "data": null }, "destination": { "data": { "id": "42d1ba3a-f4b8-431d-a6fe-49fd748a59e7", "type": "port" } }, "containers": { "data": [ { "id": "11c1fa10-52a5-48e2-82f4-5523756b3d0f", "type": "container" } ] } }, "links": { "self": "/v2/shipments/eb6f218a-0b4a-47f9-8ef9-759aa5e0ea83" } } ] } }, "Multiple containers": { "value": { "data": { "id": "62c30bd4-d7fc-40dc-9fd6-fb39224301f5", "type": "tracking_request", "attributes": { "request_number": "212157148", "request_type": "bill_of_lading", "scac": "MAEU", "ref_numbers": [], "shipment_tags": [], "created_at": "2021-07-27T16:44:14Z", "updated_at": "2021-07-27T17:44:14Z", "status": "created", "failed_reason": null, "is_retrying": false, "retry_count": null }, "relationships": { "tracked_object": { "data": { "id": "dfc9f601-f6fe-412e-a71c-feabcc2dd4e3", "type": "shipment" } }, "customer": { "data": null } }, "links": { "self": "/v2/tracking_requests/62c30bd4-d7fc-40dc-9fd6-fb39224301f5" } }, "links": { "self": "https://api.terminal49.com/v2/tracking_requests/62c30bd4-d7fc-40dc-9fd6-fb39224301f5?filter%5Bstatus%5D=created" }, "included": [ { "id": "dfc9f601-f6fe-412e-a71c-feabcc2dd4e3", "type": "shipment", "attributes": { "created_at": "2021-07-27T16:44:16Z", "ref_numbers": null, "tags": [], "bill_of_lading_number": "212157148", "shipping_line_scac": "MAEU", "shipping_line_name": "Maersk", "shipping_line_short_name": "Maersk", "port_of_lading_locode": "MYTPP", "port_of_lading_name": "Tanjung Pelepas", "port_of_discharge_locode": null, "port_of_discharge_name": null, "pod_vessel_name": null, "pod_vessel_imo": null, "pod_voyage_number": null, "destination_locode": null, "destination_name": null, "destination_timezone": null, "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": null, "pol_timezone": "Asia/Kuala_Lumpur", "pod_eta_at": "2021-09-15T15:00:00Z", "pod_ata_at": null, "pod_timezone": null, "line_tracking_last_attempted_at": null, "line_tracking_last_succeeded_at": "2021-07-27T16:44:16Z", "line_tracking_stopped_at": null, "line_tracking_stopped_reason": null }, "relationships": { "port_of_lading": { "data": { "id": "6c387786-252c-476d-9f99-7d835b6b978b", "type": "port" } }, "port_of_discharge": { "data": null }, "pod_terminal": { "data": null }, "destination": { "data": null }, "destination_terminal": { "data": null }, "containers": { "data": [ { "id": "965880c9-a37e-4ed7-a060-9c49c0f0c5ed", "type": "container" }, { "id": "ea1f8e08-fcdf-498d-9cb5-0c370b023eeb", "type": "container" }, { "id": "67f55105-8ea2-4137-9244-f9cc204f5766", "type": "container" }, { "id": "5ab5d058-772c-466c-bc73-0b8767ad5a79", "type": "container" } ] } }, "links": { "self": "/v2/shipments/dfc9f601-f6fe-412e-a71c-feabcc2dd4e3" } } ] } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Not Found": { "value": { "errors": [ { "status": "404", "title": "Not Found" } ] } } } } } } }, "operationId": "get-track-request-by-id", "description": "Get the details and status of an existing tracking request. ", "tags": [ "Tracking Requests" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include. 'tracked_object' is included by default." } ], "x-internal": false }, "patch": { "summary": "Edit a tracking request", "operationId": "patch-track-request-by-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/tracking_request" } } } } } } }, "description": "Update a tracking request", "tags": [ "Tracking Requests" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes", "type" ], "properties": { "attributes": { "type": "object", "properties": { "ref_number": { "type": "string", "example": "REFNUMBER11", "description": "Tracking request ref number." } } } } } } } } } } } }, "/tracking_requests/{tracking_request_id}/custom_fields": { "parameters": [ { "schema": { "type": "string" }, "name": "tracking_request_id", "in": "path", "required": true, "description": "Tracking request ID" } ], "get": { "summary": "List tracking request custom fields", "operationId": "get-tracking-requests-custom-fields", "tags": [ "Tracking Requests" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a tracking request custom field", "operationId": "post-tracking-requests-custom-fields", "tags": [ "Tracking Requests" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "api_slug", "value" ], "properties": { "api_slug": { "type": "string" }, "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } }, "example": { "data": { "type": "custom_field", "attributes": { "api_slug": "customer_reference_number", "value": "ABC124" } } } } } } } }, "/tracking_requests/{tracking_request_id}/custom_fields/{api_slug}": { "parameters": [ { "schema": { "type": "string" }, "name": "tracking_request_id", "in": "path", "required": true, "description": "Tracking request ID" }, { "schema": { "type": "string" }, "name": "api_slug", "in": "path", "required": true, "description": "Custom field api_slug" } ], "patch": { "summary": "Update a tracking request custom field", "operationId": "patch-tracking-requests-custom-fields-api-slug", "tags": [ "Tracking Requests" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "value" ], "properties": { "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } }, "delete": { "summary": "Delete a tracking request custom field", "operationId": "delete-tracking-requests-custom-fields-api-slug", "tags": [ "Tracking Requests" ], "responses": { "204": { "description": "No Content" } } } }, "/webhooks/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get single webhook", "tags": [ "Webhooks" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/webhook" } } } } } } }, "operationId": "get-webhooks-id", "description": "Get the details of a single webhook" }, "patch": { "summary": "Edit a webhook", "operationId": "patch-webhooks-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/webhook" } } } } } } }, "description": "Update a single webhook", "tags": [ "Webhooks" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes", "type" ], "properties": { "attributes": { "type": "object", "properties": { "url": { "type": "string", "example": "https://webhook.site/#!/39084fbb-d887-42e8-be08-b9183ad02362", "format": "uri", "description": "The URL of the webhook endpoint." }, "events": { "type": "array", "description": "The list of events to enable for this endpoint.", "uniqueItems": true, "minItems": 1, "items": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ] } }, "active": { "type": "boolean" }, "headers": { "type": "array", "description": "Optional custom headers to pass with each webhook invocation", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the header. (Please not this will be auto-capitalized) " }, "value": { "type": "string", "description": "The value to pass for the header\n" } } } } } }, "type": { "type": "string", "enum": [ "webhook" ] } } } }, "required": [ "data" ] }, "examples": {} } } } }, "delete": { "summary": "Delete a webhook", "operationId": "delete-webhooks-id", "responses": { "200": { "description": "OK" } }, "description": "Delete a webhook", "tags": [ "Webhooks" ] } }, "/webhooks": { "get": { "summary": "List webhooks", "tags": [ "Webhooks" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/webhook" } }, "meta": { "$ref": "#/components/schemas/meta" }, "links": { "$ref": "#/components/schemas/links" } } }, "examples": { "example-1": { "value": { "data": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "webhook", "attributes": { "url": "http://example.com", "active": true, "events": [ "tracking_request.succeeded" ], "secret": "WEBHOOK_SECRET_PLACEHOLDER", "headers": [ { "name": "x-secret-sauce", "value": "sriracha" } ] } } ], "meta": { "size": 0, "total": 0 }, "links": { "last": "http://example.com", "next": "http://example.com", "prev": "http://example.com", "first": "http://example.com", "self": "http://example.com" } } } } } } } }, "operationId": "get-webhooks", "description": "Get a list of all the webhooks", "parameters": [ { "schema": { "type": "integer" }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer" }, "in": "query", "name": "page[size]" } ] }, "post": { "summary": "Create a webhook", "operationId": "post-webhooks", "tags": [ "Webhooks" ], "description": "You can configure a webhook via the API to be notified about events that happen in your Terminal49 account. These events can be realted to tracking_requests, shipments and containers. \n\nThis is the recommended way tracking shipments and containers via the API. You should use this instead of polling our the API periodically. ", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes", "type" ], "properties": { "attributes": { "type": "object", "required": [ "url", "active" ], "properties": { "url": { "type": "string", "example": "https://webhook.site/#!/39084fbb-d887-42e8-be08-b9183ad02362", "format": "uri", "description": "The URL of the webhook endpoint." }, "events": { "type": "array", "uniqueItems": true, "description": "The list of events to enable for this endpoint.", "minItems": 1, "items": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ], "example": "tracking_request.succeeded" } }, "active": { "type": "boolean" }, "headers": { "type": "array", "description": "Optional custom headers to pass with each webhook invocation", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the header. (Please note this will be auto-capitalized) " }, "value": { "type": "string", "description": "The value to pass for the header\n" } } } } } }, "type": { "type": "string", "enum": [ "webhook" ] } } } }, "required": [ "data" ] }, "examples": { "Test Webhook (all events)": { "value": { "data": { "attributes": { "url": "https://webhook.site/", "events": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered" ], "active": true }, "type": "webhook" } } } } } }, "description": "" }, "responses": { "201": { "description": "Create a test webhook endpoint", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/webhook" } } }, "examples": { "Test Endpoint Created": { "value": { "data": { "type": "webhook", "id": "9809fb96-7754-488f-99df-29ca8d410d89", "attributes": { "url": "https://webhook.site/", "active": true, "events": [ "tracking_request.succeeded" ], "secret": "WEBHOOK_SECRET_PLACEHOLDER", "created_at": "2020-06-05T19:06:13Z" } } } } } }, "application/xml": { "schema": { "$ref": "#/components/schemas/webhook" } } } } } }, "parameters": [] }, "/webhooks/events": { "get": { "summary": "List webhook events", "tags": [ "Webhooks" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "webhook_event_category" ] }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "events": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "example": "tracking_request.succeeded" }, "description": { "type": "string" } }, "required": [ "name", "description" ] } } }, "required": [ "name", "events" ] } }, "required": [ "id", "type", "attributes" ] } } } }, "examples": { "Event categories": { "value": { "data": [ { "id": "tracking-request-events", "type": "webhook_event_category", "attributes": { "name": "Tracking Request Events", "events": [ { "name": "tracking_request.succeeded", "description": "Shipment created and linked to the tracking request." } ] } } ] } } } } } } }, "operationId": "get-webhooks-events", "description": "Returns webhook event categories and event names available to the authenticated account. Events may be filtered by account features." }, "parameters": [] }, "/webhook_notifications/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a single webhook notification", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/webhook_notification" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/webhook" }, { "$ref": "#/components/schemas/tracking_request" }, { "$ref": "#/components/schemas/transport_event" }, { "$ref": "#/components/schemas/estimated_event" }, { "$ref": "#/components/schemas/container_updated_event" } ] } } } }, "examples": { "Tracking Request": { "value": { "data": { "id": "a76187fc-5749-43f9-9053-cfaad9790a31", "type": "webhook_notification", "attributes": { "id": "a76187fc-5749-43f9-9053-cfaad9790a31", "event": "tracking_request.succeeded", "delivery_status": "pending", "created_at": "2020-09-11T21:25:34Z" }, "relationships": { "reference_object": { "data": { "id": "bdeca506-9741-4ab1-a0a7-cfd1d908e923", "type": "tracking_request" } }, "webhook": { "data": { "id": "914b21ce-dd7d-4c49-8503-65aba488e9a9", "type": "webhook" } }, "webhook_notification_logs": { "data": [] } } }, "included": [ { "id": "bdeca506-9741-4ab1-a0a7-cfd1d908e923", "type": "tracking_request", "attributes": { "request_number": "TE497ED1063E", "request_type": "bill_of_lading", "scac": "MSCU", "ref_numbers": [], "created_at": "2020-09-11T21:25:34Z", "updated_at": "2020-09-11T22:25:34Z", "status": "created", "failed_reason": null, "is_retrying": false, "retry_count": null }, "relationships": { "tracked_object": { "data": { "id": "b5b10c0a-8d18-46da-b4c2-4e5fa790e7da", "type": "shipment" } } }, "links": { "self": "/v2/tracking_requests/bdeca506-9741-4ab1-a0a7-cfd1d908e923" } }, { "id": "b5b10c0a-8d18-46da-b4c2-4e5fa790e7da", "type": "shipment", "attributes": { "created_at": "2020-09-11T21:25:33Z", "bill_of_lading_number": "TE497ED1063E", "ref_numbers": [], "shipping_line_scac": "MSCU", "shipping_line_name": "Mediterranean Shipping Company", "port_of_lading_locode": "MXZLO", "port_of_lading_name": "Manzanillo", "port_of_discharge_locode": "USOAK", "port_of_discharge_name": "Port of Oakland", "pod_vessel_name": "MSC CHANNE", "pod_vessel_imo": "9710438", "pod_voyage_number": "098N", "destination_locode": null, "destination_name": null, "destination_timezone": null, "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": "2020-08-29T21:25:33Z", "pol_timezone": "America/Mexico_City", "pod_eta_at": "2020-09-18T21:25:33Z", "pod_ata_at": null, "pod_timezone": "America/Los_Angeles" }, "relationships": { "port_of_lading": { "data": { "id": "4384d6a5-5ccc-43b7-8d19-4a9525e74c08", "type": "port" } }, "port_of_discharge": { "data": { "id": "2a765fdd-c479-4345-b71d-c4ef839952e2", "type": "port" } }, "pod_terminal": { "data": { "id": "17891bc8-52da-40bf-8ff0-0247ec05faf1", "type": "terminal" } }, "destination": { "data": null }, "containers": { "data": [ { "id": "b2fc728c-e2f5-4a99-8899-eb7b34ef22d7", "type": "container" } ] } }, "links": { "self": "/v2/shipments/b5b10c0a-8d18-46da-b4c2-4e5fa790e7da" } }, { "id": "b2fc728c-e2f5-4a99-8899-eb7b34ef22d7", "type": "container", "attributes": { "number": "ARDU1824900", "seal_number": "139F1451", "created_at": "2020-09-11T21:25:34Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": 53507, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": null, "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": null, "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": null, "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null, "current_status": "on_ship" }, "relationships": { "shipment": { "data": { "id": "b5b10c0a-8d18-46da-b4c2-4e5fa790e7da", "type": "shipment" } }, "pod_terminal": { "data": { "id": "17891bc8-52da-40bf-8ff0-0247ec05faf1", "type": "terminal" } }, "transport_events": { "data": [ { "id": "56078596-5293-4c84-9245-cca00a787265", "type": "transport_event" } ] } } }, { "id": "56078596-5293-4c84-9245-cca00a787265", "type": "transport_event", "attributes": { "event": "container.transport.vessel_departed", "created_at": "2020-09-11T21:25:34Z", "voyage_number": null, "timestamp": "2020-08-29T21:25:33Z", "location_locode": "MXZLO", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "b5b10c0a-8d18-46da-b4c2-4e5fa790e7da", "type": "shipment" } }, "container": { "data": { "id": "b2fc728c-e2f5-4a99-8899-eb7b34ef22d7", "type": "container" } }, "vessel": { "data": null }, "location": { "data": { "id": "2a765fdd-c479-4345-b71d-c4ef839952e2", "type": "port" } }, "terminal": { "data": null } } } ] } }, "Estimated Event": { "value": { "data": { "id": "d7e04138-b59d-4c41-9d2d-251d95bedd6e", "type": "webhook_notification", "attributes": { "id": "d7e04138-b59d-4c41-9d2d-251d95bedd6e", "event": "shipment.estimated.arrival", "delivery_status": "pending", "created_at": "2020-09-11T21:25:34Z" }, "relationships": { "reference_object": { "data": { "id": "b68bc6cb-2c37-43f6-889b-86a16b2b6fe6", "type": "estimated_event" } }, "webhook": { "data": { "id": "614eab61-ae3c-4d40-bbe9-41200a172691", "type": "webhook" } } } }, "included": [ { "id": "b68bc6cb-2c37-43f6-889b-86a16b2b6fe6", "type": "estimated_event", "attributes": { "created_at": "2020-04-06T19:02:46-07:00", "estimated_timestamp": "2020-04-09T19:02:46-07:00", "voyage_number": "A1C", "event": "shipment.estimated.arrival", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "715ed64b-6195-49f6-9407-1383a8088bfd", "type": "shipment" } }, "port": { "data": { "id": "ed4001a5-ad9d-43c3-883c-79354f422510", "type": "port" } }, "vessel": { "data": { "id": "ebf68c6c-9d0d-4383-aa41-e097009dfb4c", "type": "vessel" } } } }, { "id": "ed4001a5-ad9d-43c3-883c-79354f422510", "type": "port", "attributes": { "id": "ed4001a5-ad9d-43c3-883c-79354f422510", "name": "Port of Oakland", "code": "USOAK", "state_abbr": "CA", "city": "Oakland", "country_code": "US", "time_zone": "America/Los_Angeles" } }, { "id": "715ed64b-6195-49f6-9407-1383a8088bfd", "type": "shipment", "attributes": { "created_at": "2020-04-06T19:02:46-07:00", "bill_of_lading_number": "TE49DD6650B9", "ref_numbers": [ "REF-4A25EA" ], "shipping_line_scac": "MSCU", "shipping_line_name": "Mediterranean Shipping Company", "port_of_lading_locode": "MXZLO", "port_of_lading_name": "Manzanillo", "port_of_discharge_locode": "USOAK", "port_of_discharge_name": "Port of Oakland", "pod_vessel_name": "MSC CHANNE", "pod_vessel_imo": "9710438", "pod_voyage_number": "098N", "destination_locode": null, "destination_name": null, "destination_timezone": null, "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": null, "pol_timezone": "America/Mexico_City", "pod_eta_at": "2020-04-13T19:02:46-07:00", "pod_ata_at": null, "pod_timezone": "America/Los_Angeles" }, "relationships": { "port_of_lading": { "data": { "id": "1378c720-efe9-4562-a2ad-562002eb4b1d", "type": "port" } }, "port_of_discharge": { "data": { "id": "ed4001a5-ad9d-43c3-883c-79354f422510", "type": "port" } }, "pod_terminal": { "data": { "id": "2508d879-4451-4d7f-ab23-92258b5df553", "type": "terminal" } }, "destination": { "data": null }, "containers": { "data": [] } }, "links": { "self": "/v2/shipments/715ed64b-6195-49f6-9407-1383a8088bfd" } } ] } }, "Transport Event": { "value": { "data": { "id": "abec839a-48fe-4540-93d7-d3ea3d67bdbf", "type": "webhook_notification", "attributes": { "id": "abec839a-48fe-4540-93d7-d3ea3d67bdbf", "event": "container.transport.vessel_arrived", "delivery_status": "pending", "created_at": "2020-07-28T23:12:53Z" }, "relationships": { "reference_object": { "data": { "id": "a6ecb8ab-98d6-4cab-8487-ce9dd7be082b", "type": "transport_event" } }, "webhook": { "data": { "id": "534d498b-8332-439a-accb-129dfd144ceb", "type": "webhook" } }, "webhook_notification_logs": { "data": [] } } }, "included": [ { "id": "a6ecb8ab-98d6-4cab-8487-ce9dd7be082b", "type": "transport_event", "attributes": { "event": "container.transport.vessel_arrived", "created_at": "2020-07-28T23:12:53Z", "voyage_number": null, "timestamp": "2020-07-28T23:12:53Z", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "1fc35241-4c8b-420d-803a-9e6661720a05", "type": "shipment" } }, "container": { "data": { "id": "8c2f335a-b155-4021-87f0-9b040159a981", "type": "container" } }, "vessel": { "data": { "id": "b381c692-8dad-4f04-873f-d9e567143335", "type": "vessel" } }, "location": { "data": { "id": "f5a8a49f-d8b2-4d2a-8a43-0e4ff0ce7995", "type": "port" } }, "terminal": { "data": { "id": "26fede8d-2c6d-4bf5-98d6-5a86d30f17a9", "type": "terminal" } } } }, { "id": "f5a8a49f-d8b2-4d2a-8a43-0e4ff0ce7995", "type": "port", "attributes": { "id": "f5a8a49f-d8b2-4d2a-8a43-0e4ff0ce7995", "name": "Port of Oakland", "code": "USOAK", "state_abbr": "CA", "city": "Oakland", "country_code": "US", "time_zone": "America/Los_Angeles" } }, { "id": "1fc35241-4c8b-420d-803a-9e6661720a05", "type": "shipment", "attributes": { "created_at": "2020-07-28T23:12:53Z", "bill_of_lading_number": "TE491846459E", "ref_numbers": [ null ], "shipping_line_scac": "MSCU", "shipping_line_name": "Mediterranean Shipping Company", "port_of_lading_locode": "MXZLO", "port_of_lading_name": "Manzanillo", "port_of_discharge_locode": "USOAK", "port_of_discharge_name": "Port of Oakland", "pod_vessel_name": "MSC CHANNE", "pod_vessel_imo": "9710438", "pod_voyage_number": "098N", "destination_locode": null, "destination_name": null, "destination_timezone": null, "destination_ata_at": null, "destination_eta_at": null, "pol_etd_at": null, "pol_atd_at": "2020-07-15T23:12:53Z", "pol_timezone": "America/Mexico_City", "pod_eta_at": "2020-08-04T23:12:53Z", "pod_ata_at": null, "pod_timezone": "America/Los_Angeles" }, "relationships": { "port_of_lading": { "data": { "id": "06564cb7-77d6-4e0e-8e4a-37756ca21bc9", "type": "port" } }, "port_of_discharge": { "data": { "id": "f5a8a49f-d8b2-4d2a-8a43-0e4ff0ce7995", "type": "port" } }, "pod_terminal": { "data": { "id": "06f5d3bb-f258-4f1b-8c2f-db78248f6e29", "type": "terminal" } }, "destination": { "data": null }, "containers": { "data": [ { "id": "8c2f335a-b155-4021-87f0-9b040159a981", "type": "container" } ] } }, "links": { "self": "/v2/shipments/1fc35241-4c8b-420d-803a-9e6661720a05" } } ] } }, "Container Updated Event": { "value": { "data": { "id": "416e293f-4423-47f7-abf3-1ae97054f41f", "type": "webhook_notification", "attributes": { "id": "416e293f-4423-47f7-abf3-1ae97054f41f", "event": "container.updated", "delivery_status": "pending", "created_at": "2020-06-04T22:03:09Z" }, "relationships": { "reference_object": { "data": { "id": "fc48cb10-b7a8-47a4-a12f-89bce7434978", "type": "container_updated_event" } }, "webhook": { "data": { "id": "cda37836-aa40-455e-8b43-5fd74930c7f6", "type": "webhook" } }, "webhook_notification_logs": { "data": [] } } }, "included": [ { "id": "fc48cb10-b7a8-47a4-a12f-89bce7434978", "type": "container_updated_event", "attributes": { "changeset": { "available_for_pickup": [ false, true ], "pod_terminal_holds": [ null, [ { "name": "customs", "status": "hold", "description": "CUST EXAM" } ] ] }, "timestamp": "2020-06-04T22:03:09Z", "timezone": "America/Los_Angeles" }, "relationships": { "container": { "data": { "id": "1445af31-991c-4d52-a183-6c3ea97cd6e8", "type": "container" } }, "terminal": { "data": { "id": "07db0258-1911-4acf-8e70-0cfe4b100f80", "type": "terminal" } } } }, { "id": "1445af31-991c-4d52-a183-6c3ea97cd6e8", "type": "container", "attributes": { "number": "GLDU1355602", "seal_number": "431ac97412228532", "created_at": "2020-05-04T22:03:09Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": 55634, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": null, "availability_known": true, "available_for_pickup": null, "pod_arrived_at": "2020-06-04T22:03:08Z", "pod_discharged_at": "2020-06-04T22:03:08Z", "final_destination_full_out_at": "2020-06-04T22:03:08Z", "pod_full_out_at": null, "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null, "current_status": "picked_up" }, "relationships": { "shipment": { "data": null } } }, { "id": "07db0258-1911-4acf-8e70-0cfe4b100f80", "type": "terminal", "attributes": { "id": "07db0258-1911-4acf-8e70-0cfe4b100f80", "nickname": "Denesik-Hintz", "name": "Adams LLC Terminal", "firms_code": "E005" }, "relationships": { "port": { "data": { "id": "d8a92775-95f9-47be-a6d2-42542a32d5fc", "type": "port" } } } } ] } } } } } } }, "operationId": "get-webhook-notification-id", "description": "\n", "tags": [ "Webhook Notifications" ], "parameters": [ { "schema": { "type": "string" }, "in": "query", "description": "Comma delimited list of relations to include.", "name": "include" } ] } }, "/webhook_notifications": { "get": { "summary": "List webhook notifications", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/webhook_notification" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/webhook" }, { "$ref": "#/components/schemas/tracking_request" }, { "$ref": "#/components/schemas/transport_event" }, { "$ref": "#/components/schemas/estimated_event" } ] } } } } } } } }, "operationId": "get-webhook-notifications", "description": "Return the list of webhook notifications. This can be useful for reconciling your data if your endpoint has been down. ", "tags": [ "Webhook Notifications" ], "parameters": [ { "schema": { "type": "integer" }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer" }, "in": "query", "name": "page[size]" }, { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include." } ] } }, "/webhook_notifications/examples": { "get": { "summary": "Get webhook notification payload examples", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/webhook_notification" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/webhook" }, { "$ref": "#/components/schemas/tracking_request" }, { "$ref": "#/components/schemas/transport_event" }, { "$ref": "#/components/schemas/estimated_event" } ] } } } } } } } }, "operationId": "get-webhook-notifications-example", "description": "Returns an example payload as it would be sent to a webhook endpoint for the provided `event` ", "tags": [ "Webhook Notifications" ], "parameters": [ { "schema": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ], "example": "container.transport.full_out" }, "in": "query", "name": "event", "description": "The webhook notification event name you wish to see an example of" } ] }, "parameters": [] }, "/webhooks/ips": { "get": { "summary": "List webhook IPs", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook_notification_ips": { "type": "array", "items": { "type": "string", "format": "ipv4" } }, "last_updated": { "type": "string", "format": "date-time" } } }, "examples": { "Example List of IPs": { "value": { "webhook_notification_ips": [ "35.222.62.171", "3.230.67.145", "44.217.15.129" ], "last_updated": "2023-10-17T21:23:16Z" } } } } } } }, "operationId": "get-webhooks-ips", "description": "Return the list of IPs used for sending webhook notifications. This can be useful for whitelisting the IPs on the firewall.", "tags": [ "Webhooks" ], "parameters": [] } }, "/webhooks/trigger": { "post": { "summary": "Trigger a webhook test delivery", "operationId": "post-webhooks-trigger", "tags": [ "Webhooks" ], "description": "Send a one-time test webhook notification payload to a target HTTPS URL without creating a webhook endpoint.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "url", "event" ], "properties": { "url": { "type": "string", "format": "uri", "example": "https://webhook.site/your-endpoint", "description": "Destination URL for the test webhook delivery. Must be HTTPS." }, "event": { "type": "string", "example": "tracking_request.succeeded", "description": "Webhook event name to use for generating an example payload." }, "secret": { "type": "string", "example": "optional-test-secret", "description": "Optional secret used to sign the request in `X-T49-Webhook-Signature`." } } }, "examples": { "Trigger webhook test delivery": { "value": { "url": "https://webhook.site/your-endpoint", "event": "tracking_request.succeeded", "secret": "optional-test-secret" } } } } } }, "responses": { "200": { "description": "Webhook test delivery attempt result", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "Destination URL that the test webhook delivery attempted to call." }, "succeeded": { "type": "boolean", "description": "Whether the webhook delivery attempt was considered successful (HTTP 200, 201, 202, or 204)." }, "error": { "type": "string", "nullable": true, "description": "Error message captured when delivery failed, or `null` when no error occurred." }, "status_code": { "type": "integer", "nullable": true, "description": "HTTP status code returned by the destination endpoint, or `null` if no response was received." }, "request_headers": { "type": "object", "additionalProperties": true, "description": "Headers sent by Terminal49 with the test webhook request." }, "request_body": { "type": "string", "description": "Serialized JSON payload delivered to the target URL." }, "response_headers": { "type": "object", "additionalProperties": true, "nullable": true, "description": "Headers returned by the destination endpoint, or `null` when unavailable." }, "response_body": { "type": "string", "nullable": true, "description": "Raw response body returned by the destination endpoint, or `null` when unavailable." } } }, "examples": { "Delivery succeeded": { "value": { "url": "https://webhook.site/your-endpoint", "succeeded": true, "error": null, "status_code": 200, "request_headers": { "Content-Type": "application/json", "User-Agent": "Terminal49 Webhook Bot", "X-T49-Webhook-Signature": "abc123" }, "request_body": "webhook notification payload JSON", "response_headers": { "content-type": "application/json" }, "response_body": "ok" } } } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "detail": { "type": "string", "example": "url is required" } } } } } }, "examples": { "Missing url": { "value": { "errors": [ { "detail": "url is required" } ] } } } } } } } } }, "/containers": { "get": { "summary": "List containers", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/container" } }, "included": { "type": "array", "items": { "$ref": "#/components/schemas/shipment" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } }, "examples": { "Example List of containers": { "value": { "data": [ { "id": "be0b247b-c144-4163-8919-cf9178930736", "type": "container", "attributes": { "number": "TCLU6718159", "seal_number": null, "created_at": "2024-06-26T15:05:18Z", "ref_numbers": [], "pod_arrived_at": "2024-06-21T14:12:00Z", "pod_discharged_at": "2024-06-23T00:19:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": false, "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 53502, "pod_full_out_at": "2024-06-26T16:15:00Z", "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T18:47:56Z", "fees_at_pod_terminal": [], "pickup_lfd": null, "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Community", "pod_last_tracking_request_at": "2024-06-26T18:47:56Z", "shipment_last_tracking_request_at": "2024-06-26T15:05:18Z", "availability_known": true, "pod_timezone": "America/New_York", "final_destination_timezone": null, "empty_terminated_timezone": "America/New_York", "pod_rail_carrier_scac": null, "ind_rail_carrier_scac": null, "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": null, "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": null, "pickup_lfd_rail": null, "pickup_lfd_line": null }, "current_status": "picked_up" }, "relationships": { "shipment": { "data": { "id": "cc8f8e43-d6a9-4edb-a8c0-d0ab03c113d3", "type": "shipment" } }, "pickup_facility": { "data": null }, "pod_terminal": { "data": { "id": "a243bdf8-0da3-4056-a6a7-05fe8ab43999", "type": "terminal" } }, "transport_events": { "data": [ { "id": "fb53b35c-6a0c-4e22-b196-b623e8ba7db5", "type": "transport_event" }, { "id": "179897a3-04f5-450b-86e1-db57970c0248", "type": "transport_event" }, { "id": "a119b8e6-10c5-4967-8364-885f7dbf8e50", "type": "transport_event" }, { "id": "3372d58c-df89-46a2-b064-b308a9dc7040", "type": "transport_event" }, { "id": "800a3e59-8231-4e42-a80f-73c97cfb1be9", "type": "transport_event" }, { "id": "d466676b-0073-4b0c-89aa-d42486e9ed4f", "type": "transport_event" }, { "id": "85665836-5915-4cb9-ab78-b8487598cd0d", "type": "transport_event" }, { "id": "94cca22a-520a-4d19-a551-0554aceb3794", "type": "transport_event" }, { "id": "032e812f-d5e4-48af-8d79-2c2b41a07032", "type": "transport_event" }, { "id": "1b7dd74d-eff6-4e06-9a15-234295ce6fd5", "type": "transport_event" }, { "id": "b9f07b7e-1653-4209-b375-4588653d5275", "type": "transport_event" }, { "id": "a35f3c1b-ad35-4347-b0f2-9e08f0d4ca64", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "e26fc659-f79d-4cc0-8efc-5ce5e8444891", "type": "raw_event" }, { "id": "8820af5e-cb77-41c5-a897-906f2c56eb1e", "type": "raw_event" }, { "id": "a628a2c2-dab6-4b04-b3ae-d7ec99098a89", "type": "raw_event" }, { "id": "6ca157f9-3b58-4db5-8155-fc7b41a62611", "type": "raw_event" }, { "id": "6fb06390-4b0a-4c1f-9703-ec89927df7f3", "type": "raw_event" }, { "id": "26fe408d-e091-412a-a2fb-23a4d778b6b9", "type": "raw_event" }, { "id": "16490dd8-d79f-468a-91b1-dbb30bb45c85", "type": "raw_event" }, { "id": "ff3db923-a644-4706-8057-1bd53c95fbd5", "type": "raw_event" }, { "id": "3fd27ffd-9618-477f-b1a9-cbc179defefe", "type": "raw_event" }, { "id": "f92efdd3-f79c-4a1c-97ce-9a47588b525c", "type": "raw_event" }, { "id": "3b2a88ef-df0b-4e61-99c1-d4a175910111", "type": "raw_event" }, { "id": "9b367e33-9e43-488f-8217-081698adf40d", "type": "raw_event" }, { "id": "ee0915df-e2f8-46b0-acf1-816871ca142d", "type": "raw_event" } ] } } }, { "id": "a9e52f3d-2fa9-467c-8deb-09e90dac2f0b", "type": "container", "attributes": { "number": "TCLU2224327", "seal_number": null, "created_at": "2024-06-26T15:05:34Z", "ref_numbers": [], "pod_arrived_at": "2024-06-21T14:12:00Z", "pod_discharged_at": "2024-06-23T17:21:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": false, "equipment_type": "dry", "equipment_length": 20, "equipment_height": "standard", "weight_in_lbs": 44225, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T18:47:56Z", "fees_at_pod_terminal": [], "pickup_lfd": null, "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Yard", "pod_last_tracking_request_at": "2024-06-26T18:47:56Z", "shipment_last_tracking_request_at": "2024-06-26T15:05:34Z", "availability_known": true, "pod_timezone": "America/New_York", "final_destination_timezone": "America/Chicago", "empty_terminated_timezone": "America/Chicago", "pod_rail_carrier_scac": "CSXT", "ind_rail_carrier_scac": "CSXT", "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": "2024-07-02T14:20:00Z", "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": null, "pickup_lfd_rail": null, "pickup_lfd_line": null }, "current_status": "awaiting_inland_transfer" }, "relationships": { "shipment": { "data": { "id": "99f84294-3bda-4765-81b3-31765e6d2a24", "type": "shipment" } }, "pickup_facility": { "data": { "id": "e6fa9a01-511b-4f43-a7e1-d628315b84ef", "type": "terminal" } }, "pod_terminal": { "data": { "id": "a243bdf8-0da3-4056-a6a7-05fe8ab43999", "type": "terminal" } }, "transport_events": { "data": [ { "id": "4a5a04b7-8974-4c46-beaa-bf55004422c9", "type": "transport_event" }, { "id": "11c90391-aa9c-408b-b20e-daed8dd09586", "type": "transport_event" }, { "id": "d7f23c71-7084-4fbb-9fef-740f624182aa", "type": "transport_event" }, { "id": "c4c3537d-5c47-4623-afe0-edc0dd6f75c5", "type": "transport_event" }, { "id": "e4002e13-0a74-4bd4-9147-787bb21e2fda", "type": "transport_event" }, { "id": "57b5568f-d8a6-443d-b1c8-be5cd080e5ed", "type": "transport_event" }, { "id": "0771cff1-79bf-4eaa-9d9d-790cb433ce44", "type": "transport_event" }, { "id": "031021b9-7b39-41f7-bd45-26cc8cb799d2", "type": "transport_event" }, { "id": "9956448d-34d3-4c23-bcfd-19807eb4034f", "type": "transport_event" }, { "id": "f1caf6ea-3e92-4b68-bcea-556828301062", "type": "transport_event" }, { "id": "2dd558a8-fa07-454c-acf3-b53d072264af", "type": "transport_event" }, { "id": "83118511-d9ed-4b16-b323-5e685d9b266e", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "f256289f-219d-45f6-b727-56fb9c6bc433", "type": "raw_event" }, { "id": "c5581f60-ffb2-4ef0-a855-b70acd3b294f", "type": "raw_event" }, { "id": "3c6716f9-814c-4459-9bbb-753f010446b2", "type": "raw_event" }, { "id": "62c7b849-c99b-4e37-9861-105141cc0a4c", "type": "raw_event" }, { "id": "7db37d43-426a-4f84-82af-2957621ce466", "type": "raw_event" }, { "id": "d4342119-db56-46fc-8299-f573f5b52e73", "type": "raw_event" }, { "id": "ba159c3b-590c-43ff-bc04-b0354fd326f4", "type": "raw_event" }, { "id": "ec1be31a-17f1-4f6f-85ab-c74cb0dbe6cb", "type": "raw_event" }, { "id": "d12c4656-0d1f-4f30-a0fa-a2ee887741a8", "type": "raw_event" }, { "id": "146d56e2-b41d-4469-8202-0c7d7315e794", "type": "raw_event" }, { "id": "6b86b4d1-f85f-4c26-9fbc-3132a62f0fbc", "type": "raw_event" }, { "id": "bb2c9105-e421-4372-9265-e61b3fa54851", "type": "raw_event" }, { "id": "3a09c49f-c12e-49e9-b2de-b8dca2b3d608", "type": "raw_event" }, { "id": "54d91ebc-8f57-4764-b7c6-a3f4dc2459be", "type": "raw_event" }, { "id": "9e788c46-9431-41eb-baee-c8b14fb4f590", "type": "raw_event" }, { "id": "d3051802-8b6f-497d-ad16-fb35547c8662", "type": "raw_event" }, { "id": "af3090e7-c6d3-4d8e-88aa-9cd757102f9b", "type": "raw_event" }, { "id": "95daf204-d95d-4a89-bedf-358bedb8b3b8", "type": "raw_event" } ] } } }, { "id": "8d1faeeb-3890-4fac-8659-cd13737b26f1", "type": "container", "attributes": { "number": "CMAU0619052", "seal_number": null, "created_at": "2024-06-26T15:02:11Z", "ref_numbers": [], "pod_arrived_at": "2024-06-22T22:10:00Z", "pod_discharged_at": "2024-06-23T20:38:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": false, "equipment_type": "dry", "equipment_length": 20, "equipment_height": "standard", "weight_in_lbs": null, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T18:47:47Z", "fees_at_pod_terminal": [], "pickup_lfd": "2024-06-27T07:00:00Z", "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Grounded", "pod_last_tracking_request_at": "2024-06-26T18:47:47Z", "shipment_last_tracking_request_at": "2024-06-26T15:02:11Z", "availability_known": true, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": "Asia/Shanghai", "empty_terminated_timezone": "Asia/Shanghai", "pod_rail_carrier_scac": null, "ind_rail_carrier_scac": null, "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": null, "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": "2024-06-27T07:00:00Z", "pickup_lfd_rail": null, "pickup_lfd_line": "2024-06-27T07:00:00Z" }, "current_status": "not_available" }, "relationships": { "shipment": { "data": { "id": "f706cbea-3264-473d-8d26-af257f3bc1be", "type": "shipment" } }, "pickup_facility": { "data": null }, "pod_terminal": { "data": { "id": "eaa2580c-5f5b-4198-85e4-821145d62098", "type": "terminal" } }, "transport_events": { "data": [ { "id": "1bb3a814-edab-403f-8ef2-a6d0966df423", "type": "transport_event" }, { "id": "19f197bf-444c-40ee-8478-6f02abe715a9", "type": "transport_event" }, { "id": "4c9223bb-0218-4175-8a2e-7bb99c40642a", "type": "transport_event" }, { "id": "432da964-6e99-45e9-b4b1-00b7be858591", "type": "transport_event" }, { "id": "b462b4d1-1e02-4037-af7f-6c8fa981f268", "type": "transport_event" }, { "id": "e3ca4a25-692f-474a-aa71-48fb9840aef1", "type": "transport_event" }, { "id": "014b9d1f-f033-4a3e-89f9-c57569883436", "type": "transport_event" }, { "id": "2cec71c9-721a-4060-993f-0ffcf01151cd", "type": "transport_event" }, { "id": "24941515-1b5e-4fca-87eb-092e56ed156a", "type": "transport_event" }, { "id": "0fd06bc0-1fda-467c-ab67-90a30c6d62ab", "type": "transport_event" }, { "id": "0bce915e-b9ba-42a0-a484-136266fe8b9a", "type": "transport_event" }, { "id": "582006aa-6547-4712-b964-5637aad839b4", "type": "transport_event" }, { "id": "11458420-b354-4288-a275-7572d3c60e33", "type": "transport_event" }, { "id": "5c900fa1-11bf-4f96-89e7-b12f6a98edc4", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "999d7de7-eaed-4313-85df-772a6d24a85e", "type": "raw_event" }, { "id": "ac9c2780-240d-443f-87f4-95465fa5447b", "type": "raw_event" }, { "id": "a0ee3724-91c3-4b78-af32-2f16e8c2d600", "type": "raw_event" }, { "id": "79725b1f-19f7-4fc3-8c69-586e237c1719", "type": "raw_event" }, { "id": "4f07f257-ea4f-4e61-94ed-a01598899020", "type": "raw_event" }, { "id": "41612acb-b3d4-495f-9138-f34105851d21", "type": "raw_event" }, { "id": "84ffdd37-ec39-404a-9b68-d72d8fb96d48", "type": "raw_event" }, { "id": "7e9d8a6d-5339-4266-a6fb-22c28f41149f", "type": "raw_event" }, { "id": "2359b787-b218-42dc-b9a5-84b608aee671", "type": "raw_event" }, { "id": "ea33303e-0e48-4442-9886-0dfe38b726b5", "type": "raw_event" }, { "id": "3689d013-8525-418b-92ed-95ec684130b4", "type": "raw_event" }, { "id": "a64f7f7e-a6fa-4913-aba0-b28ba189d68b", "type": "raw_event" }, { "id": "c264a859-4fcb-4fab-95c0-29be99ec54a4", "type": "raw_event" }, { "id": "2aabf25c-9a3e-44bc-b6c8-ed7b1e3c3630", "type": "raw_event" }, { "id": "6ae70038-02d7-425a-99c1-8761c69a9033", "type": "raw_event" }, { "id": "c30021d8-93e9-4bfd-a978-e9e24de148c8", "type": "raw_event" } ] } } }, { "id": "853f1794-9b94-4118-9970-4e28e549440d", "type": "container", "attributes": { "number": "TGHU6578122", "seal_number": null, "created_at": "2024-06-26T15:08:30Z", "ref_numbers": [], "pod_arrived_at": "2024-06-23T21:58:00Z", "pod_discharged_at": "2024-06-24T02:28:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": false, "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 8898, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T18:47:47Z", "fees_at_pod_terminal": [], "pickup_lfd": "2024-06-27T07:00:00Z", "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Wheeled", "pod_last_tracking_request_at": "2024-06-26T18:47:46Z", "shipment_last_tracking_request_at": "2024-06-26T15:08:30Z", "availability_known": true, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": "America/New_York", "empty_terminated_timezone": "America/New_York", "pod_rail_carrier_scac": "BNSF", "ind_rail_carrier_scac": "CSXT", "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": "2024-07-07T08:00:00Z", "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": "2024-06-27T07:00:00Z", "pickup_lfd_rail": null, "pickup_lfd_line": "2024-06-27T07:00:00Z" }, "current_status": "awaiting_inland_transfer" }, "relationships": { "shipment": { "data": { "id": "f3cfe624-706e-4a0c-89d5-140980d986fd", "type": "shipment" } }, "pickup_facility": { "data": { "id": "7e4557b9-cc5a-4298-aaec-1a32e90202c9", "type": "terminal" } }, "pod_terminal": { "data": { "id": "eaa2580c-5f5b-4198-85e4-821145d62098", "type": "terminal" } }, "transport_events": { "data": [ { "id": "94f687d0-dc6b-4342-8710-cb98bc98716e", "type": "transport_event" }, { "id": "a8d0a842-95fe-4c12-a80e-bd12e87a1421", "type": "transport_event" }, { "id": "c1f1a186-3737-41ca-ae2b-f79a17519991", "type": "transport_event" }, { "id": "7fcc5496-d402-4b1c-a6c5-8514e6433070", "type": "transport_event" }, { "id": "ab7cd84a-edc5-476d-a1c4-190011582314", "type": "transport_event" }, { "id": "68d91384-3eb3-4d21-ac7a-c1f688f649c2", "type": "transport_event" }, { "id": "5a702f46-4356-4570-bd2e-2b8adab5ba3e", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "a4b7e4b6-5227-4f34-9e91-9e75223798ae", "type": "raw_event" }, { "id": "4f3e3c7b-d1e6-4fde-b95e-ce9a8835445c", "type": "raw_event" }, { "id": "39e8570d-1a8f-4e10-8d2e-ac930abc5971", "type": "raw_event" }, { "id": "b8015a72-9741-4fbf-8adc-d30b87de6aa3", "type": "raw_event" }, { "id": "61512b1a-a94e-4cac-8bab-763588dbbddf", "type": "raw_event" }, { "id": "c0bf87f2-37c3-4895-90b0-9f97ac4b5c13", "type": "raw_event" }, { "id": "3856c7e7-f832-42ca-873b-096952599e29", "type": "raw_event" }, { "id": "485be998-0861-4d10-8a60-f66d27eb46a7", "type": "raw_event" }, { "id": "29cde194-bbd9-40c2-adba-5dcb1514f5fc", "type": "raw_event" } ] } } }, { "id": "681d713d-bcd6-4303-b082-b9f893e7d1d9", "type": "container", "attributes": { "number": "CSNU8439129", "seal_number": null, "created_at": "2024-06-26T15:02:32Z", "ref_numbers": [], "pod_arrived_at": "2024-06-23T21:58:00Z", "pod_discharged_at": "2024-06-26T04:30:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": true, "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 40488, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T18:47:47Z", "fees_at_pod_terminal": [], "pickup_lfd": "2024-07-01T07:00:00Z", "pickup_appointment_at": "2024-06-28T15:00:00Z", "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Grounded", "pod_last_tracking_request_at": "2024-06-26T18:47:46Z", "shipment_last_tracking_request_at": "2024-06-26T15:02:32Z", "availability_known": true, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": "America/Chicago", "empty_terminated_timezone": "America/Chicago", "pod_rail_carrier_scac": "BNSF", "ind_rail_carrier_scac": "BNSF", "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": "2024-07-04T22:00:00Z", "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": "2024-07-01T07:00:00Z", "pickup_lfd_rail": null, "pickup_lfd_line": "2024-07-01T07:00:00Z" }, "current_status": "available" }, "relationships": { "shipment": { "data": { "id": "edd626cf-b0b5-4679-8a6c-80c8e9fe7698", "type": "shipment" } }, "pickup_facility": { "data": { "id": "572b372f-21c7-4403-8fb0-948377c74642", "type": "terminal" } }, "pod_terminal": { "data": { "id": "eaa2580c-5f5b-4198-85e4-821145d62098", "type": "terminal" } }, "transport_events": { "data": [ { "id": "9d19125a-2944-442c-8132-bf0d83670e5c", "type": "transport_event" }, { "id": "b2ff0b47-3151-41e2-8c46-7f95cdbe4167", "type": "transport_event" }, { "id": "e52feaa3-7a50-4570-a2ea-bf06f955ce23", "type": "transport_event" }, { "id": "c56d95e5-774f-432c-b6f4-c53967f07292", "type": "transport_event" }, { "id": "9b1d8b48-e870-46fa-bc46-10f9b30c64d4", "type": "transport_event" }, { "id": "3e1d3571-6b24-4ad2-a071-4e70d59af521", "type": "transport_event" }, { "id": "60f5eefe-13d5-4f85-9b65-d13b4c67115a", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "2af51127-0971-4741-9b97-ea1b338e3a7c", "type": "raw_event" }, { "id": "4472ded6-eb69-4f21-8666-9a4f2342dfeb", "type": "raw_event" }, { "id": "ce238754-d5fd-4dc8-9f55-2ac6efdfbb5e", "type": "raw_event" }, { "id": "5cd3b5ef-843f-4f60-87ce-5beaeea86f7b", "type": "raw_event" }, { "id": "55291737-98b6-403c-9424-1605e6e01007", "type": "raw_event" }, { "id": "cdc55ea8-a075-45b3-9570-ade6fb2f0d94", "type": "raw_event" }, { "id": "c0ab5406-4e10-4fdc-85a4-e17ce8d956f5", "type": "raw_event" }, { "id": "965f0172-1c20-4342-a44a-7be0e594ff76", "type": "raw_event" }, { "id": "db178011-c795-42a4-9537-b4e77ffb4f98", "type": "raw_event" } ] } } } ], "meta": { "size": 5, "total": 59229 }, "links": { "self": "https://api.terminal49.com/v2/containers?page[size]=5", "current": "https://api.terminal49.com/v2/containers?page[number]=1&page[size]=5", "next": "https://api.terminal49.com/v2/containers?page[number]=2&page[size]=5", "last": "https://api.terminal49.com/v2/containers?page[number]=11846&page[size]=5" } } } } } } } }, "operationId": "get-containers", "description": "Returns a list of container. The containers are returned sorted by creation date, with the most recently refreshed containers appearing first.\n\nThis API will return all containers associated with the account.", "parameters": [ { "schema": { "type": "integer", "default": 1 }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer", "default": 30 }, "in": "query", "name": "page[size]", "description": "" }, { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include" } ] }, "patch": { "summary": "Edit a container", "operationId": "patch-containers-id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/container" } } } } } } }, "description": "Update a container", "tags": [ "Containers" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes", "type" ], "properties": { "attributes": { "type": "object", "properties": { "ref_numbers": { "type": "array", "items": { "type": "string", "example": "REF-12345" } } } } } } } } } } } } }, "/containers/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a container", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/container" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/terminal" }, { "$ref": "#/components/schemas/transport_event" } ] } } } }, "examples": { "Example Container": { "value": { "data": { "id": "55a700e4-7005-45a9-92fd-1ff38641dbd9", "type": "container", "attributes": { "number": "CAIU7432986", "seal_number": null, "created_at": "2024-06-26T15:05:21Z", "ref_numbers": [], "pod_arrived_at": null, "pod_discharged_at": "2024-06-22T04:00:00Z", "final_destination_full_out_at": null, "holds_at_pod_terminal": [], "available_for_pickup": true, "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "pod_full_out_at": null, "empty_terminated_at": null, "terminal_checked_at": "2024-06-26T17:51:12Z", "fees_at_pod_terminal": [], "pickup_lfd": "2024-07-07T04:00:00Z", "pickup_appointment_at": null, "pod_full_out_chassis_number": null, "location_at_pod_terminal": "Yard - Y0709A", "pod_last_tracking_request_at": "2024-06-26T17:51:12Z", "shipment_last_tracking_request_at": "2024-06-26T15:05:20Z", "availability_known": true, "pod_timezone": "America/New_York", "final_destination_timezone": "US/Eastern", "empty_terminated_timezone": "US/Eastern", "pod_rail_carrier_scac": "CSXT", "ind_rail_carrier_scac": "CSXT", "pod_rail_loaded_at": null, "pod_rail_departed_at": null, "ind_eta_at": null, "ind_ata_at": null, "ind_rail_unloaded_at": null, "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": "2024-07-07T04:00:00Z", "pickup_lfd_rail": null, "pickup_lfd_line": "2024-07-07T04:00:00Z" }, "current_status": "available" }, "relationships": { "shipment": { "data": { "id": "02b1bd6f-407c-45bb-8645-06e7ee34e7e3", "type": "shipment" } }, "pickup_facility": { "data": null }, "pod_terminal": { "data": { "id": "b859f5c3-8515-41da-bf20-39c0a5ada887", "type": "terminal" } }, "transport_events": { "data": [ { "id": "45b542cb-332b-4684-b915-42e3a0759823", "type": "transport_event" }, { "id": "174ed528-a1a9-4002-aef0-f2c9369199da", "type": "transport_event" }, { "id": "7a2f30a6-a756-4c14-9477-fbfc1c7fe2f8", "type": "transport_event" }, { "id": "e7365004-175a-46e8-96cd-dbed0f3daf21", "type": "transport_event" }, { "id": "7c567bf3-7f01-4a3d-a176-eaa1f7165585", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "2956f71c-bfb9-4e49-b9e2-1b4d53c74cac", "type": "raw_event" }, { "id": "391e0eda-65b5-4fc3-a53d-25ecd9570259", "type": "raw_event" }, { "id": "74810c04-6c8a-4194-8cff-52936584a965", "type": "raw_event" }, { "id": "4b1500e2-b23b-4896-87bd-c38b1d16f385", "type": "raw_event" }, { "id": "8b9a7d88-720a-4304-8c1e-a3336e39f481", "type": "raw_event" }, { "id": "bf1f59c5-5dd8-4013-87f9-d7056bc87114", "type": "raw_event" } ] } } }, "links": { "self": "https://api.terminal49.com/v2/containers/55a700e4-7005-45a9-92fd-1ff38641dbd9" } } } } } } } }, "operationId": "get-containers-id", "description": "Retrieves the details of a container.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include" } ] } }, "/containers/{id}/raw_events": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a container's raw events", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/raw_event" } } } }, "examples": { "Example Raw Events": { "value": { "data": [ { "id": "ca6b760f-13e9-4bf6-ab49-3cf2e40757fb", "type": "raw_event", "attributes": { "timestamp": "2020-03-03T00:00:00Z", "estimated": false, "actual_on": "2020-03-03", "estimated_at": null, "actual_at": null, "event": "empty_out", "index": 0, "original_event": "Truck Gate out empty", "created_at": "2020-04-18T00:18:27Z", "voyage_number": null, "location_name": "Oakland", "location_locode": null, "vessel_name": null, "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": null } } }, { "id": "bcdfc796-0570-4c85-9336-d6c7d0da02d2", "type": "raw_event", "attributes": { "timestamp": "2020-03-09T00:00:00Z", "estimated": false, "actual_on": "2020-03-09", "estimated_at": null, "actual_at": null, "event": "full_in", "index": 1, "original_event": "Truck Arrival in", "created_at": "2020-04-18T00:18:27Z", "voyage_number": null, "location_name": null, "location_locode": null, "vessel_name": null, "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": null } } }, { "id": "a4ff01b0-b374-4123-ae65-3dc0c7ea41ea", "type": "raw_event", "attributes": { "timestamp": "2020-03-14T00:00:00Z", "estimated": false, "actual_on": "2020-03-14", "estimated_at": null, "actual_at": null, "event": "vessel_loaded", "index": 2, "original_event": "Vessel Loaded", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "FA009R", "location_name": null, "location_locode": null, "vessel_name": "MSC FAITH", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "4b473d0e-7073-4171-8b5b-15e71e9e13cc", "type": "vessel" } } } }, { "id": "ca5862ef-6e27-4245-a281-0cec6bbe1fb7", "type": "raw_event", "attributes": { "timestamp": "2020-03-15T00:00:00Z", "estimated": false, "actual_on": "2020-03-15", "estimated_at": null, "actual_at": null, "event": "vessel_departed", "index": 3, "original_event": "Vessel departed", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "FA009R", "location_name": null, "location_locode": null, "vessel_name": "MSC FAITH", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "4b473d0e-7073-4171-8b5b-15e71e9e13cc", "type": "vessel" } } } }, { "id": "f47a903e-e6d1-41c5-aec6-8401b2abf297", "type": "raw_event", "attributes": { "timestamp": "2020-03-25T00:00:00Z", "estimated": false, "actual_on": "2020-03-25", "estimated_at": null, "actual_at": null, "event": "transshipment_arrived", "index": 4, "original_event": "Vessel arrived", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "FA009R", "location_name": null, "location_locode": null, "vessel_name": "MSC FAITH", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "4b473d0e-7073-4171-8b5b-15e71e9e13cc", "type": "vessel" } } } }, { "id": "72a1a13b-a2e0-4ac0-851d-eec41e9e9087", "type": "raw_event", "attributes": { "timestamp": "2020-03-25T00:00:00Z", "estimated": false, "actual_on": "2020-03-25", "estimated_at": null, "actual_at": null, "event": "transshipment_discharged", "index": 5, "original_event": "Vessel Discharged", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "FA009R", "location_name": null, "location_locode": null, "vessel_name": "MSC FAITH", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "4b473d0e-7073-4171-8b5b-15e71e9e13cc", "type": "vessel" } } } }, { "id": "cd91f0cf-ee73-4c47-b99f-63245cb5bc96", "type": "raw_event", "attributes": { "timestamp": "2020-04-07T00:00:00Z", "estimated": false, "actual_on": "2020-04-07", "estimated_at": null, "actual_at": null, "event": "transshipment_loaded", "index": 6, "original_event": "Vessel Loaded", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "15W10", "location_name": null, "location_locode": null, "vessel_name": "SINGAPORE EXPRESS", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } } } }, { "id": "561dbb7e-c3ab-4e63-b09b-957878b1425f", "type": "raw_event", "attributes": { "timestamp": "2020-04-07T00:00:00Z", "estimated": false, "actual_on": "2020-04-07", "estimated_at": null, "actual_at": null, "event": "transshipment_departed", "index": 7, "original_event": "Vessel departed", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "15W10", "location_name": null, "location_locode": null, "vessel_name": "SINGAPORE EXPRESS", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } } } }, { "id": "551711a6-62ad-4205-8da2-00e0c0cbd2db", "type": "raw_event", "attributes": { "timestamp": "2020-04-12T00:00:00Z", "estimated": false, "actual_on": "2020-04-12", "estimated_at": null, "actual_at": null, "event": "vessel_arrived", "index": 8, "original_event": "Vessel arrived", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "15W10", "location_name": null, "location_locode": null, "vessel_name": "SINGAPORE EXPRESS", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } } } }, { "id": "f4027470-75ca-4e2a-b4f0-47654a25ac48", "type": "raw_event", "attributes": { "timestamp": "2020-04-13T00:00:00Z", "estimated": false, "actual_on": "2020-04-13", "estimated_at": null, "actual_at": null, "event": "vessel_discharged", "index": 9, "original_event": "Vessel Discharged", "created_at": "2020-04-18T00:18:27Z", "voyage_number": "15W10", "location_name": null, "location_locode": null, "vessel_name": "SINGAPORE EXPRESS", "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } } } }, { "id": "50f11e4f-411e-48e2-8141-64226500df9c", "type": "raw_event", "attributes": { "timestamp": "2020-04-14T00:00:00Z", "estimated": false, "actual_on": "2020-04-14", "estimated_at": null, "actual_at": null, "event": "full_out", "index": 10, "original_event": "Truck Departure from", "created_at": "2020-04-18T00:18:27Z", "voyage_number": null, "location_name": null, "location_locode": null, "vessel_name": null, "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": null } } }, { "id": "49aea23c-b8c5-4a97-b133-f7a9723fa1b4", "type": "raw_event", "attributes": { "timestamp": "2020-04-15T00:00:00Z", "estimated": false, "actual_on": "2020-04-15", "estimated_at": null, "actual_at": null, "event": "empty_in", "index": 11, "original_event": "Truck Gate in empty", "created_at": "2020-04-18T00:18:27Z", "voyage_number": null, "location_name": null, "location_locode": null, "vessel_name": null, "vessel_imo": null, "timezone": null }, "relationships": { "location": { "data": null }, "vessel": { "data": null } } } ], "included": [ { "id": "4b473d0e-7073-4171-8b5b-15e71e9e13cc", "type": "vessel", "attributes": { "name": "MSC FAITH", "imo": null, "mmsi": "636019213", "latitude": 70.22625823437389, "longitude": 45.06279126658865, "nautical_speed_knots": 100, "navigational_heading_degrees": 1, "position_timestamp": "2023-06-05T19:46:18Z" } }, { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel", "attributes": { "name": "SINGAPORE EXPRESS", "imo": null, "mmsi": "477300500", "latitude": 70.22625823437389, "longitude": 45.06279126658865, "nautical_speed_knots": 100, "navigational_heading_degrees": 1, "position_timestamp": "2023-06-05T19:46:18Z" } } ] } } } } } } }, "operationId": "get-containers-id-raw_events", "description": "#### Deprecation warning\nThe `raw_events` endpoint is provided as-is.\n\n For past events we recommend consuming `transport_events`.\n\n---\nGet a list of past and future (estimated) milestones for a container as reported by the carrier. Some of the data is normalized even though the API is called raw_events. \n\nNormalized attributes: `event` and `timestamp` timestamp. Not all of the `event` values have been normalized. You can expect the the events related to container movements to be normalized but there are cases where events are not normalized. \n\nFor past historical events we recommend consuming `transport_events`. Although there are fewer events here those events go through additional vetting and normalization to avoid false positives and get you correct data.", "deprecated": true } }, "/containers/{id}/transport_events": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a container's transport events", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/transport_event" } }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/port" }, { "$ref": "#/components/schemas/metro_area" }, { "$ref": "#/components/schemas/terminal" }, { "$ref": "#/components/schemas/rail_terminal" }, { "$ref": "#/components/schemas/vessel" } ] } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } }, "examples": { "Example transport events": { "value": { "data": [ { "id": "efc3f3c1-cdc2-4a7d-a176-762ddec107b8", "type": "transport_event", "attributes": { "event": "container.transport.vessel_loaded", "created_at": "2021-01-05T08:41:12Z", "voyage_number": "15W10", "timestamp": null, "location_locode": "CLSAI", "timezone": "America/Santiago" }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } }, "location": { "data": { "id": "0ad2cf2b-e694-4ccc-9cd2-40af0d1fa1b5", "type": "port" } }, "terminal": { "data": null } } }, { "id": "951058bd-2c3b-4bcc-94e1-9be2526b9687", "type": "transport_event", "attributes": { "event": "container.transport.vessel_departed", "created_at": "2021-01-05T08:41:11Z", "voyage_number": "15W10", "timestamp": null, "location_locode": "CLSAI", "timezone": "America/Santiago" }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } }, "location": { "data": { "id": "0ad2cf2b-e694-4ccc-9cd2-40af0d1fa1b5", "type": "port" } }, "terminal": { "data": null } } }, { "id": "69af6795-56c2-4157-9a87-afd761cc85a0", "type": "transport_event", "attributes": { "event": "container.transport.full_out", "created_at": "2020-05-14T00:05:41Z", "voyage_number": null, "timestamp": "2020-04-14T00:00:00Z", "location_locode": "USOAK", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": null }, "location": { "data": { "id": "42d1ba3a-f4b8-431d-a6fe-49fd748a59e7", "type": "port" } }, "terminal": { "data": null } } }, { "id": "68c3c29a-504a-4dbb-ad27-7194ef42d484", "type": "transport_event", "attributes": { "event": "container.transport.vessel_discharged", "created_at": "2020-05-14T00:05:41Z", "voyage_number": "15W10", "timestamp": "2020-04-13T00:00:00Z", "location_locode": "USOAK", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } }, "location": { "data": { "id": "42d1ba3a-f4b8-431d-a6fe-49fd748a59e7", "type": "port" } }, "terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } } } }, { "id": "03349405-a9be-4f3e-abde-28f2cb3922bd", "type": "transport_event", "attributes": { "event": "container.transport.vessel_arrived", "created_at": "2020-05-14T00:05:41Z", "voyage_number": "15W10", "timestamp": "2020-04-13T01:24:00Z", "location_locode": "USOAK", "timezone": "America/Los_Angeles" }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": { "id": "345c05ab-4217-4ffe-a1a4-6c03b9ad2b36", "type": "vessel" } }, "location": { "data": { "id": "42d1ba3a-f4b8-431d-a6fe-49fd748a59e7", "type": "port" } }, "terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } } } }, { "id": "ba9f85b4-658d-4f23-9308-635964df8037", "type": "transport_event", "attributes": { "event": "container.transport.empty_in", "created_at": "2020-05-14T00:05:42Z", "voyage_number": null, "timestamp": "2020-04-15T00:00:00Z", "location_locode": null, "timezone": null }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "container": { "data": { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container" } }, "vessel": { "data": null }, "location": { "data": null }, "terminal": { "data": null } } } ], "links": { "self": "https://api.terminal49.com/v2/containers/eeafd337-72b5-4e5c-87cb-9ef83fa99cf4/transport_events", "current": "https://api.terminal49.com/v2/containers/eeafd337-72b5-4e5c-87cb-9ef83fa99cf4/transport_events?page[number]=1" } } } } } } } }, "operationId": "get-containers-id-transport_events", "description": "Get a list of past transport events (canonical) for a container. All data has been normalized across all carriers. These are a verified subset of the raw events may also be sent as Webhook Notifications to a webhook endpoint.\n\nThis does not provide any estimated future events. See `container/:id/raw_events` endpoint for that. ", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "include", "description": "Comma delimited list of relations to include" } ] } }, "/containers/{id}/map_geojson": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get container map GeoJSON", "tags": [ "Containers", "Routing (Paid)" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "FeatureCollection" ] }, "features": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "Feature" ] }, "geometry": { "oneOf": [ { "title": "Point", "type": "object", "properties": { "type": { "type": "string", "enum": [ "Point" ] }, "coordinates": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2, "example": [ 100.896831042, 13.065302386 ] } }, "required": [ "type", "coordinates" ] }, { "title": "LineString", "type": "object", "properties": { "type": { "type": "string", "enum": [ "LineString" ] }, "coordinates": { "type": "array", "items": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 }, "minItems": 2, "example": [ [ 100.868768333, 13.07306 ], [ 100.839155, 13.079318333 ] ] } }, "required": [ "type", "coordinates" ] } ] }, "properties": { "discriminator": { "propertyName": "feature_type", "mapping": { "port": "#/components/schemas/portFeatureProperties", "current_vessel": "#/components/schemas/currentVesselFeatureProperties", "past_vessel_locations": "#/components/schemas/pastVesselLocationsFeatureProperties", "estimated_full_legs": "#/components/schemas/estimatedFullLegFeatureProperties", "estimated_partial_leg": "#/components/schemas/estimatedPartialLegFeatureProperties" } }, "oneOf": [ { "$ref": "#/components/schemas/portFeatureProperties" }, { "$ref": "#/components/schemas/currentVesselFeatureProperties" }, { "$ref": "#/components/schemas/pastVesselLocationsFeatureProperties" }, { "$ref": "#/components/schemas/estimatedFullLegFeatureProperties" }, { "$ref": "#/components/schemas/estimatedPartialLegFeatureProperties" } ] } }, "required": [ "type", "geometry", "properties" ] } } }, "required": [ "type", "features" ] }, "examples": { "Example Response": { "value": { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 100.896831042, 13.065302386 ] }, "properties": { "feature_type": "port", "ports_sequence": 1, "ports_total": 3, "location_id": "c5adae24-6fd4-4720-8813-976cf206feb1", "location_type": "Port", "name": "Laem Chabang", "state_abbr": "20", "state": null, "country_code": "TH", "country": "Thailand", "time_zone": "Asia/Bangkok", "inbound_eta_at": null, "inbound_ata_at": null, "outbound_etd_at": null, "outbound_atd_at": "2025-11-08T00:44:52Z", "label": "POL", "updated_at": "2025-12-11T09:01:08Z" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [ 100.868768333, 13.07306 ], [ 100.839155, 13.079318333 ], [ 118.038213333, 24.43842 ], [ 118.03862, 24.440998333 ] ] }, "properties": { "feature_type": "past_vessel_locations", "ports_sequence": 1, "vessel_id": "87a12f43-766c-4078-89bc-ac6595082f7b", "start_time": "2025-11-08T00:44:52Z", "end_time": "2025-11-15T16:00:00Z", "point_count": 546, "outbound_atd_at": "2025-11-08T00:44:52Z", "inbound_ata_at": "2025-11-15T16:00:00Z", "inbound_eta_at": null } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 118.0293, 24.50318 ] }, "properties": { "feature_type": "port", "ports_sequence": 2, "ports_total": 3, "location_id": "ed64d446-9098-420c-ab08-c127e62509fe", "location_type": "Port", "name": "Xiamen", "state_abbr": "FJ", "state": null, "country_code": "CN", "country": "China", "time_zone": "Asia/Shanghai", "inbound_eta_at": null, "inbound_ata_at": "2025-11-15T16:00:00Z", "outbound_etd_at": null, "outbound_atd_at": "2025-11-19T16:00:00Z", "label": "TS1", "updated_at": "2025-12-11T09:01:08Z" } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ -131.128473333, 31.023033333 ] }, "properties": { "feature_type": "current_vessel", "ports_sequence": 2, "vessel_id": "93fc5dce-4c7f-4089-bd28-f20cd9202ab0", "vessel_name": "ZIM BANGKOK", "vessel_imo": "9936525", "voyage_number": "13E", "vessel_location_timestamp": "2025-12-11T11:46:03Z", "vessel_location_heading": 108, "vessel_location_speed": 21, "departure_port_id": "ed64d446-9098-420c-ab08-c127e62509fe", "departure_port_name": "Xiamen", "departure_port_state_abbr": "FJ", "departure_port_state": null, "departure_port_country_code": "CN", "departure_port_country": "China", "departure_port_label": "TS1", "departure_port_atd": "2025-11-19T16:00:00Z", "departure_port_time_zone": "Asia/Shanghai", "arrival_port_id": "6129528d-846e-4571-ae16-b5328a4285ab", "arrival_port_name": "Savannah", "arrival_port_state_abbr": "GA", "arrival_port_state": "Georgia", "arrival_port_country_code": "US", "arrival_port_country": "United States", "arrival_port_label": "POD", "arrival_port_eta": "2025-12-31T05:00:00Z", "arrival_port_time_zone": "America/New_York" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [ 118.045325, 23.518831667 ], [ 118.076886667, 23.556158333 ], [ -131.583741667, 31.153668333 ], [ -131.128473333, 31.023033333 ] ] }, "properties": { "feature_type": "past_vessel_locations", "ports_sequence": 2, "vessel_id": "93fc5dce-4c7f-4089-bd28-f20cd9202ab0", "start_time": "2025-11-19T16:00:00Z", "end_time": "2026-01-07T05:00:00Z", "point_count": 1402, "outbound_atd_at": "2025-11-19T16:00:00Z", "inbound_ata_at": null, "inbound_eta_at": "2025-12-31T05:00:00Z" } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [ -131.128473333, 31.023033333 ], [ -130.9177, 30.67224 ], [ -80.70766, 31.96363 ], [ -80.91232, 32.03728 ] ] }, "properties": { "feature_type": "estimated_partial_leg", "ports_sequence": 2, "current_port_id": "ed64d446-9098-420c-ab08-c127e62509fe", "next_port_id": "6129528d-846e-4571-ae16-b5328a4285ab", "point_count": 364 } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ -81.140998396, 32.128923976 ] }, "properties": { "feature_type": "port", "ports_sequence": 3, "ports_total": 3, "location_id": "6129528d-846e-4571-ae16-b5328a4285ab", "location_type": "Port", "name": "Savannah", "state_abbr": "GA", "state": "Georgia", "country_code": "US", "country": "United States", "time_zone": "America/New_York", "inbound_eta_at": "2025-12-31T05:00:00Z", "inbound_ata_at": null, "outbound_etd_at": null, "outbound_atd_at": null, "label": "POD", "updated_at": "2025-12-11T09:01:08Z" } } ] } } } } } }, "403": { "description": "Forbidden - Routing data feature is not enabled for this account", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "title": { "type": "string", "example": "Forbidden" }, "detail": { "type": "string", "example": "Routing data feature is not enabled for this account" } } } } } } } } } }, "operationId": "get-containers-id-map-geojson", "description": "Returns a GeoJSON FeatureCollection containing all map-related data for a container, including port locations, current vessel position (if at sea), past vessel paths, and estimated future routes. The response can be directly used with most mapping libraries (Leaflet, Mapbox GL, Google Maps, etc.). This is a paid feature. Please contact sales@terminal49.com." } }, "/containers/{id}/refresh": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "patch": { "summary": "Refresh container", "operationId": "patch-containers-id-refresh", "tags": [ "Containers" ], "description": "Schedules the container to be refreshed immediately from all relevant sources.

To be alerted of updates you should subscribe to the [relevant webhooks](/api-docs/in-depth-guides/webhooks). This endpoint is limited to 10 requests per minute.This is a paid feature. Please contact sales@terminal49.com.", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Started refresh for Shipping line, Terminal, Rail" } } }, "examples": { "Refresh response": { "value": { "message": "Started refresh for Shipping line, Terminal, Rail" } } } } } }, "403": { "description": "Forbidden - This API endpoint is not enabled for your account. Please contact support@terminal49.com", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "title": { "type": "string", "example": "API access not enabled" }, "detail": { "type": "string", "example": "This API endpoint is not enabled for your account. Please contact support@terminal49.com" } } } } } } } } }, "429": { "description": "Too Many Requests - You've hit the refresh limit. Please try again in a minute.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "429" }, "title": { "type": "string", "example": "Too Many Requests" }, "detail": { "type": "string", "example": "You've hit the refresh limit. Please try again in a minute." } } } } } } } }, "headers": { "Retry-After": { "description": "Number of seconds to wait before making another request", "schema": { "type": "integer", "example": 60 } } } } } } }, "/shipping_lines": { "get": { "summary": "Shipping Lines", "tags": [ "Shipping Lines" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/shipping_line" } }, "links": { "$ref": "#/components/schemas/links" } } } } } } }, "operationId": "get-shipping_lines", "description": "Return a list of shipping lines supported by Terminal49. \nN.B. There is no pagination for this endpoint." } }, "/shipping_lines/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a single shipping line", "tags": [ "Shipping Lines" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/shipping_line" } } } } } } }, "operationId": "get-shipping_lines-id", "description": "Return the details of a single shipping line." } }, "/metro_areas/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a metro area using the un/locode or the id", "tags": [ "Metro Areas" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/metro_area" } } } } } } }, "operationId": "get-metro-area-id", "description": "Return the details of a single metro area." } }, "/ports/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a port using the locode or the id", "tags": [ "Ports" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/port" } } } } } } }, "operationId": "get-port-id", "description": "Return the details of a single port." } }, "/vessels/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true }, { "schema": { "type": "string", "format": "date-time", "example": "2025-05-20T00:00:00Z" }, "name": "show_positions[from_timestamp]", "in": "query", "description": "ISO 8601 timestamp to filter positions from. 7 days by default.", "required": false }, { "schema": { "type": "string", "format": "date-time", "example": "2025-05-24T00:00:00Z" }, "name": "show_positions[to_timestamp]", "in": "query", "description": "ISO 8601 timestamp to filter positions up to. Current time by default.", "required": false } ], "get": { "summary": "Get a vessel using the id", "tags": [ "Vessels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/vessel" } } } } } }, "403": { "description": "Forbidden - Feature not enabled", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "source": { "type": "object", "nullable": true }, "title": { "type": "string", "example": "Forbidden" }, "detail": { "type": "string", "example": "Routing data feature is not enabled for this account" } } } } } } } } } }, "operationId": "get-vessels-id", "description": "Returns a vessel by id. `show_positions` is a paid feature. Please contact sales@terminal49.com." } }, "/vessels/{imo}": { "parameters": [ { "schema": { "type": "string" }, "name": "imo", "in": "path", "required": true }, { "schema": { "type": "string", "format": "date-time", "example": "2025-05-20T00:00:00Z" }, "name": "show_positions[from_timestamp]", "in": "query", "description": "ISO 8601 timestamp to filter positions from. 7 days by default.", "required": false }, { "schema": { "type": "string", "format": "date-time", "example": "2025-05-24T00:00:00Z" }, "name": "show_positions[to_timestamp]", "in": "query", "description": "ISO 8601 timestamp to filter positions up to. Current time by default.", "required": false } ], "get": { "summary": "Get a vessel using the imo", "tags": [ "Vessels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/vessel" } } } } } }, "403": { "description": "Forbidden - Feature not enabled", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "source": { "type": "object", "nullable": true }, "title": { "type": "string", "example": "Forbidden" }, "detail": { "type": "string", "example": "Routing data feature is not enabled for this account" } } } } } } } } } }, "operationId": "get-vessels-imo", "description": "Returns a vessel by the given IMO number. `show_positions` is a paid feature. Please contact sales@terminal49.com.", "x-internal": true } }, "/vessels/{id}/future_positions": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get vessel future positions", "tags": [ "Routing (Paid)", "Vessels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/vessel_with_positions" }, "links": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } } } } } } } }, "403": { "description": "Forbidden - Routing data feature is not enabled for this account", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "title": { "type": "string", "example": "Forbidden" }, "detail": { "type": "string", "example": "Routing data feature is not enabled for this account" } } } } } } } } } }, "operationId": "get-vessels-id-future-positions", "description": "Returns the estimated route between two ports for a given vessel. The timestamp of the positions has fixed spacing of one minute. This is a paid feature. Please contact sales@terminal49.com.", "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "port_id", "description": "The destination port id", "required": true }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "previous_port_id", "description": "The previous port id", "required": true } ] } }, "/vessels/{id}/future_positions_with_coordinates": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get vessel future positions from coordinates", "tags": [ "Routing (Paid)", "Vessels" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/vessel_with_positions" }, "links": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } } } } } } } }, "403": { "description": "Forbidden - Routing data feature is not enabled for this account", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "403" }, "title": { "type": "string", "example": "Forbidden" }, "detail": { "type": "string", "example": "Routing data feature is not enabled for this account" } } } } } } } } } }, "operationId": "get-vessels-id-future-positions-with-coordinates", "description": "Returns the estimated route between two ports for a given vessel from a set of coordinates. The timestamp of the positions has fixed spacing of one minute. This is a paid feature. Please contact sales@terminal49.com.", "parameters": [ { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "port_id", "description": "The destination port id", "required": true }, { "schema": { "type": "string", "format": "uuid" }, "in": "query", "name": "previous_port_id", "description": "The previous port id", "required": true }, { "schema": { "type": "number" }, "in": "query", "name": "latitude", "description": "Starting latitude coordinate", "required": true }, { "schema": { "type": "number" }, "in": "query", "name": "longitude", "description": "Starting longitude coordinate", "required": true } ] } }, "/terminals/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get a terminal using the id", "tags": [ "Terminals" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/terminal" } } } } } } }, "operationId": "get-terminal-id", "description": "Return the details of a single terminal." } }, "/parties": { "get": { "description": "Get a list of parties", "operationId": "list-parties", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/party" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } }, "parameters": [ { "schema": { "type": "integer", "default": 1 }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer", "default": 25 }, "in": "query", "name": "page[size]", "description": "" } ], "tags": [ "Parties" ] }, "post": { "description": "Creates a new party", "operationId": "post-party", "responses": { "201": { "description": "Party Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/party" }, "links": { "$ref": "#/components/schemas/link-self" } } }, "examples": { "New Party": { "value": { "data": { "id": "ba4cb904-827f-4038-8e31-1e92b3356218", "type": "party", "attributes": { "company_name": "COMPANY NAME" } }, "links": { "self": "/v2/parties/ba4cb904-827f-4038-8e31-1e92b3356218" } } } } } }, "headers": {} }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Error Examples": { "value": { "errors": [ { "status": "422", "source": { "pointer": "/data/attributes/company_name" }, "title": "Unprocessable Entity", "detail": "Company name can't be blank" }, { "status": "422", "source": { "pointer": "/data/attributes/customer" }, "title": "Unprocessable Entity", "detail": "'XXXX' already exists in Account" } ] } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes" ], "properties": { "attributes": { "type": "object", "properties": { "company_name": { "type": "string", "example": "COMPANY NAME", "description": "The name of the company" } } } } } } } } } }, "tags": [ "Parties" ] } }, "/custom_field_definitions": { "get": { "summary": "List custom field definitions", "operationId": "get-custom-field-definitions", "tags": [ "Custom Field Definitions" ], "parameters": [ { "schema": { "type": "integer", "default": 1 }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer", "default": 25 }, "in": "query", "name": "page[size]" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[entity_type]", "description": "Filter by entity type (Shipment or Container)" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[data_type]", "description": "Filter by data type" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[display_name]", "description": "Filter by display name (prefix match)" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field_definition" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a custom field definition", "operationId": "post-custom-field-definitions", "tags": [ "Custom Field Definitions" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_definition" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field_definition" ] }, "attributes": { "type": "object", "required": [ "entity_type", "api_slug", "display_name", "data_type" ], "properties": { "entity_type": { "type": "string", "enum": [ "Shipment", "Container" ] }, "api_slug": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "data_type": { "type": "string", "enum": [ "short_text", "number", "date", "datetime", "boolean", "enum", "enum_multi", "reference" ] }, "reference_type": { "type": "string", "nullable": true }, "validation": { "type": "object", "nullable": true, "additionalProperties": true }, "default_format": { "type": "string", "nullable": true }, "default_value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } } }, "/custom_field_definitions/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Custom field definition ID" } ], "get": { "summary": "Get a custom field definition", "operationId": "get-custom-field-definitions-id", "tags": [ "Custom Field Definitions" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_definition" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } } }, "patch": { "summary": "Update a custom field definition", "operationId": "patch-custom-field-definitions-id", "tags": [ "Custom Field Definitions" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_definition" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field_definition" ] }, "attributes": { "type": "object", "properties": { "display_name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "validation": { "type": "object", "nullable": true, "additionalProperties": true }, "default_format": { "type": "string", "nullable": true }, "default_value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } }, "delete": { "summary": "Delete a custom field definition", "operationId": "delete-custom-field-definitions-id", "tags": [ "Custom Field Definitions" ], "responses": { "200": { "description": "OK" } } } }, "/custom_field_definitions/{definition_id}/options": { "parameters": [ { "schema": { "type": "string" }, "name": "definition_id", "in": "path", "required": true, "description": "Custom field definition ID" } ], "get": { "summary": "List custom field options", "operationId": "get-custom-field-options", "tags": [ "Custom Field Options" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field_option" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a custom field option", "operationId": "post-custom-field-options", "tags": [ "Custom Field Options" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_option" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field_option" ] }, "attributes": { "type": "object", "required": [ "label", "value" ], "properties": { "label": { "type": "string" }, "value": { "type": "string" }, "position": { "type": "integer", "nullable": true } } } } } } } } } } } }, "/custom_field_definitions/{definition_id}/options/{option_id}": { "parameters": [ { "schema": { "type": "string" }, "name": "definition_id", "in": "path", "required": true, "description": "Custom field definition ID" }, { "schema": { "type": "string" }, "name": "option_id", "in": "path", "required": true, "description": "Custom field option ID" } ], "get": { "summary": "Get a custom field option", "operationId": "get-custom-field-options-id", "tags": [ "Custom Field Options" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_option" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } } }, "patch": { "summary": "Update a custom field option", "operationId": "patch-custom-field-options-id", "tags": [ "Custom Field Options" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field_option" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field_option" ] }, "attributes": { "type": "object", "properties": { "label": { "type": "string" }, "position": { "type": "integer", "nullable": true } } } } } } } } } } }, "delete": { "summary": "Delete a custom field option", "operationId": "delete-custom-field-options-id", "tags": [ "Custom Field Options" ], "responses": { "200": { "description": "OK" } } } }, "/custom_fields": { "get": { "summary": "List custom fields", "operationId": "get-custom-fields", "tags": [ "Custom Fields" ], "parameters": [ { "schema": { "type": "integer", "default": 1 }, "in": "query", "name": "page[number]" }, { "schema": { "type": "integer", "default": 25 }, "in": "query", "name": "page[size]" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[entity_type]", "description": "Filter by entity type (Shipment or Container)" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[entity_id]", "description": "Filter by entity ID" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[definition_id]", "description": "Filter by custom field definition ID" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a custom field", "operationId": "post-custom-fields", "tags": [ "Custom Fields" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes", "relationships" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "api_slug", "value" ], "properties": { "api_slug": { "type": "string" }, "value": { "$ref": "#/components/schemas/custom_field_value" } } }, "relationships": { "type": "object", "properties": { "entity": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "id" ], "properties": { "type": { "type": "string", "enum": [ "shipment", "container" ] }, "id": { "type": "string", "format": "uuid" } } } } } } } } } } }, "example": { "data": { "type": "custom_field", "attributes": { "api_slug": "customer_reference_number", "value": "ABC124" }, "relationships": { "entity": { "data": { "type": "shipment", "id": "YOUR_SHIPMENT_ID" } } } } } } } } } }, "/custom_fields/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true, "description": "Custom field ID" } ], "get": { "summary": "Get a custom field", "operationId": "get-custom-fields-id", "tags": [ "Custom Fields" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } } }, "patch": { "summary": "Update a custom field", "operationId": "patch-custom-fields-id", "tags": [ "Custom Fields" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "value" ], "properties": { "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } }, "delete": { "summary": "Delete a custom field", "operationId": "delete-custom-fields-id", "tags": [ "Custom Fields" ], "responses": { "200": { "description": "OK" } } } }, "/shipments/{shipment_id}/custom_fields": { "parameters": [ { "schema": { "type": "string" }, "name": "shipment_id", "in": "path", "required": true, "description": "Shipment ID" } ], "get": { "summary": "List shipment custom fields", "operationId": "get-shipments-custom-fields", "tags": [ "Shipments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a shipment custom field", "operationId": "post-shipments-custom-fields", "tags": [ "Shipments" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "api_slug", "value" ], "properties": { "api_slug": { "type": "string" }, "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } }, "example": { "data": { "type": "custom_field", "attributes": { "api_slug": "customer_reference_number", "value": "ABC124" } } } } } } } }, "/shipments/{shipment_id}/custom_fields/{api_slug}": { "parameters": [ { "schema": { "type": "string" }, "name": "shipment_id", "in": "path", "required": true, "description": "Shipment ID" }, { "schema": { "type": "string" }, "name": "api_slug", "in": "path", "required": true, "description": "Custom field api_slug" } ], "patch": { "summary": "Update a shipment custom field", "operationId": "patch-shipments-custom-fields-api-slug", "tags": [ "Shipments" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "value" ], "properties": { "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } }, "delete": { "summary": "Delete a shipment custom field", "operationId": "delete-shipments-custom-fields-api-slug", "tags": [ "Shipments" ], "responses": { "204": { "description": "No Content" } } } }, "/containers/{container_id}/custom_fields": { "parameters": [ { "schema": { "type": "string" }, "name": "container_id", "in": "path", "required": true, "description": "Container ID" } ], "get": { "summary": "List container custom fields", "operationId": "get-containers-custom-fields", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/custom_field" } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } } } }, "post": { "summary": "Create a container custom field", "operationId": "post-containers-custom-fields", "tags": [ "Containers" ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "api_slug", "value" ], "properties": { "api_slug": { "type": "string" }, "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } }, "example": { "data": { "type": "custom_field", "attributes": { "api_slug": "customer_reference_number", "value": "ABC124" } } } } } } } }, "/containers/{container_id}/custom_fields/{api_slug}": { "parameters": [ { "schema": { "type": "string" }, "name": "container_id", "in": "path", "required": true, "description": "Container ID" }, { "schema": { "type": "string" }, "name": "api_slug", "in": "path", "required": true, "description": "Custom field api_slug" } ], "patch": { "summary": "Update a container custom field", "operationId": "patch-containers-custom-fields-api-slug", "tags": [ "Containers" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/custom_field" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "required": [ "value" ], "properties": { "value": { "$ref": "#/components/schemas/custom_field_value" } } } } } } } } } } }, "delete": { "summary": "Delete a container custom field", "operationId": "delete-containers-custom-fields-api-slug", "tags": [ "Containers" ], "responses": { "204": { "description": "No Content" } } } }, "/parties/{id}": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/party" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } } }, "operationId": "get-parties-id", "description": "Returns a party by it's given identifier", "tags": [ "Parties" ] }, "patch": { "description": "Updates a party", "operationId": "edit-party", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/party" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "Error Examples": { "value": { "errors": [ { "status": "422", "source": { "pointer": "/data/attributes/company_name" }, "title": "Unprocessable Entity", "detail": "Company name can't be blank" }, { "status": "422", "source": { "pointer": "/data/attributes/customer" }, "title": "Unprocessable Entity", "detail": "'XXXX' already exists in Account" } ] } } } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "attributes" ], "properties": { "attributes": { "type": "object", "properties": { "company_name": { "type": "string", "example": "COMPANY NAME", "description": "The name of the company" } } } } } } } } } }, "tags": [ "Parties" ] } }, "/documents": { "get": { "summary": "List documents", "description": "Returns documents for the authenticated account. Supports filters, sorting, includes, and pagination.", "tags": [ "Documents" ], "parameters": [ { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "Comma-separated includes. Allowed: shipments, cargos, account, user, last_document_representation, email_submission, current_extraction (alias for last_document_representation)." }, { "in": "query", "name": "sort", "schema": { "type": "string" }, "description": "Sortable fields: document_type, added_by, created_at. Prefix with - for descending." }, { "in": "query", "name": "filter[filename]", "schema": { "type": "string" }, "description": "Filter by filename (full-text match)." }, { "in": "query", "name": "filter[reference]", "schema": { "type": "string" }, "description": "Filter by reference token." }, { "in": "query", "name": "filter[document_types]", "schema": { "type": "string" }, "description": "Comma-separated document types." }, { "in": "query", "name": "page[number]", "schema": { "type": "integer", "minimum": 1 } }, { "in": "query", "name": "page[size]", "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/document" } }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/document" }, { "$ref": "#/components/schemas/document_email_submission" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "invalid_include": { "summary": "Invalid include parameter", "value": { "errors": [ { "status": "400", "title": "Bad Request", "detail": "invalid_relation is not specified as a relationship on V2::DocumentSerializer", "source": { "parameter": "include" } } ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "unauthorized": { "summary": "Missing or invalid API token", "value": { "errors": [ { "status": "401", "title": "Unauthorized", "detail": "Invalid or missing API token." } ] } } } } } } }, "operationId": "get-documents" }, "post": { "summary": "Upload a document", "description": "Creates a document record. Provide an ActiveStorage signed blob id in `attached_document`.", "tags": [ "Documents" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "document" ] }, "attributes": { "type": "object", "required": [ "name", "attached_document" ], "properties": { "name": { "type": "string" }, "attached_document": { "type": "string", "description": "ActiveStorage signed blob id from direct upload." } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/document" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/document" }, { "$ref": "#/components/schemas/document_email_submission" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "409": { "description": "Duplicate document", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "string", "example": "409" }, "code": { "type": "string", "example": "duplicate_document" }, "title": { "type": "string", "example": "Duplicate document" }, "detail": { "type": "string" }, "meta": { "type": "object", "properties": { "existing_document_id": { "type": "string", "format": "uuid" }, "existing_document_name": { "type": "string" } } } } } } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } } }, "operationId": "post-documents" } }, "/documents/types": { "get": { "summary": "List document types", "description": "Returns account-scoped allowed document types and labels.", "tags": [ "Documents" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "document_types": { "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string" }, "label": { "type": "string" } }, "required": [ "code", "label" ] } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } } }, "operationId": "get-documents-types" } }, "/documents/{id}": { "get": { "summary": "Get a document", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "Comma-separated includes. Allowed: shipments, cargos, account, user, last_document_representation, email_submission, current_extraction (alias for last_document_representation)." } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/document" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/document" }, { "$ref": "#/components/schemas/document_email_submission" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "get-documents-id" }, "patch": { "summary": "Edit a document", "description": "Updates manual extraction and classification fields.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "required": [ "type", "attributes" ], "properties": { "type": { "type": "string", "enum": [ "document" ] }, "attributes": { "type": "object", "properties": { "document_type_manual": { "type": "string", "description": "Manually override the document type." }, "extracted_data_manual": { "type": "object", "nullable": true, "description": "Manually provide extracted key/value data. Set to null to clear manual values.", "additionalProperties": true } } } } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/document" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/shipment" }, { "$ref": "#/components/schemas/container" }, { "$ref": "#/components/schemas/document" }, { "$ref": "#/components/schemas/document_email_submission" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "patch-documents-id" }, "delete": { "summary": "Delete a document", "description": "Soft-deletes (discards) the document.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "delete-documents-id" } }, "/documents/{id}/download_url": { "get": { "summary": "Get a document download URL", "description": "Returns a presigned URL for downloading/viewing the current document file.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "download_url": { "type": "string", "format": "uri" } }, "required": [ "download_url" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } } }, "operationId": "get-documents-id-download_url" } }, "/documents/{id}/reextract": { "post": { "summary": "Re-extract a document", "description": "Triggers asynchronous extraction for the document.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "accepted" ] } }, "required": [ "status" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "post-documents-id-reextract" } }, "/documents/{id}/reclassify": { "post": { "summary": "Re-classify a document", "description": "Triggers asynchronous classification for the document.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "accepted" ] } }, "required": [ "status" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "post-documents-id-reclassify" } }, "/documents/{id}/relink": { "post": { "summary": "Re-link a document", "description": "Re-runs reference linking for the document.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "accepted" ] } }, "required": [ "status" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } } }, "operationId": "post-documents-id-relink" } }, "/documents/{id}/rotate": { "post": { "summary": "Rotate a document", "description": "Queues a rotation update for image document types only. Non-image documents are not rotatable.", "tags": [ "Documents" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "degrees": { "type": "integer", "enum": [ 90, 180, 270 ] } }, "required": [ "degrees" ] } } } }, "responses": { "202": { "description": "Accepted", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "accepted" ] } }, "required": [ "status" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "document_not_found": { "summary": "Document not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find Document" } ] } } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "invalid_rotation": { "summary": "Invalid rotation degrees", "value": { "errors": [ { "status": "422", "title": "Invalid rotation", "detail": "degrees must be one of: 90, 180, 270" } ] } }, "no_document_attached": { "summary": "No file attached", "value": { "errors": [ { "status": "422", "title": "No document attached" } ] } } } } } } }, "operationId": "post-documents-id-rotate" } }, "/email_submissions": { "get": { "summary": "List email submissions", "description": "Returns email submissions for the authenticated account.", "tags": [ "Email Submissions" ], "parameters": [ { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "Allowed: account, user, documents, documents.last_document_representation. Defaults to documents + documents.last_document_representation." }, { "in": "query", "name": "page[number]", "schema": { "type": "integer", "minimum": 1 } }, { "in": "query", "name": "page[size]", "schema": { "type": "integer", "minimum": 1 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/email_submission" } }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/email_submission_document" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/links" }, "meta": { "$ref": "#/components/schemas/meta" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } } }, "operationId": "get-email_submissions" } }, "/email_submissions/{id}": { "get": { "summary": "Get an email submission", "tags": [ "Email Submissions" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "in": "query", "name": "include", "schema": { "type": "string" }, "description": "Allowed: account, user, documents, documents.last_document_representation. Defaults to documents + documents.last_document_representation." } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/email_submission" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/account" }, { "$ref": "#/components/schemas/user" }, { "$ref": "#/components/schemas/email_submission_document" }, { "$ref": "#/components/schemas/document_representation" } ] } }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "email_submission_not_found": { "summary": "Email submission not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find EmailSubmission" } ] } } } } } } }, "operationId": "get-email_submissions-id" } }, "/document_schemas/{id}": { "get": { "summary": "Get a document schema", "tags": [ "Document Schemas" ], "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" }, "description": "Schema id in full-version format, e.g. commercial_invoice@2026-03-23." } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/document_schema" }, "links": { "$ref": "#/components/schemas/link-self" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "schema_not_found": { "summary": "Document schema not found", "value": { "errors": [ { "status": "404", "title": "Not Found", "detail": "Couldn't find DocumentSchema with 'id'=unknown@2026-03-23" } ] } } } } } } }, "operationId": "get-document_schemas-id" } }, "/search": { "get": { "summary": "Search shipments, containers, and tracking requests", "tags": [ "Search" ], "operationId": "searchAll", "description": "Full-text search across shipments, containers (cargos), and tracking requests within your account. Results are ranked by type (shipments first, then containers, then tracking requests) and recency. Returns up to 25 results. Duplicate tracking requests (where a shipment exists with the same BL number) are automatically filtered out.", "parameters": [ { "schema": { "type": "string" }, "in": "query", "name": "query", "required": true, "description": "Search term to match against BL numbers, container numbers, reference numbers, and other indexed fields. Supports full-text search and partial (ILIKE) matching." } ], "responses": { "200": { "description": "Successful search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the matched resource" }, "type": { "type": "string", "description": "Resource type", "enum": [ "shipment", "cargo", "tracking_request" ] }, "attributes": { "type": "object", "properties": { "entity_type": { "type": "string", "description": "Type of the matched entity: `shipment`, `cargo`, or `tracking_request`" }, "number": { "type": "string", "description": "BL number (shipments), container number (cargos), or request number (tracking requests)" }, "shipment_id": { "type": "string", "nullable": true, "description": "Associated shipment ID (for cargos and tracking requests only)" }, "scac": { "type": "string", "nullable": true, "description": "Standard Carrier Alpha Code of the shipping line" }, "port_of_lading_name": { "type": "string", "nullable": true, "description": "Port of lading name (shipments only)" }, "port_of_discharge_name": { "type": "string", "nullable": true, "description": "Port of discharge name (shipments only)" }, "containers_count": { "type": "integer", "nullable": true, "description": "Number of containers on the shipment (shipments only)" }, "tracking_stopped": { "type": "boolean", "nullable": true, "description": "Whether tracking has been stopped (shipments only)" }, "tracking_stopped_reason": { "type": "string", "nullable": true, "description": "Reason tracking was stopped (shipments only)" }, "status": { "type": "string", "nullable": true, "description": "Tracking request status (tracking requests only)" }, "failed_reason": { "type": "string", "nullable": true, "description": "Reason the tracking request failed (tracking requests only)" }, "ref_numbers": { "type": "array", "items": { "type": "string" }, "description": "Customer reference numbers" }, "created_at": { "type": "string", "format": "date-time", "description": "When the resource was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "When the resource was last updated" } } } } } } } }, "example": { "data": [ { "id": "abc12345-6789-40ef-9012-3456789abcde", "type": "shipment", "attributes": { "entity_type": "shipment", "number": "MEDUA1234567", "shipment_id": null, "scac": "MSCU", "port_of_lading_name": "Shanghai", "port_of_discharge_name": "Los Angeles", "containers_count": 3, "tracking_stopped": false, "tracking_stopped_reason": null, "status": null, "failed_reason": null, "ref_numbers": [ "PO-2026-001" ], "created_at": "2026-01-15T10:30:00.000Z", "updated_at": "2026-03-01T14:22:00.000Z" } }, { "id": "def45678-9012-43ab-9cde-f0123456789a", "type": "cargo", "attributes": { "entity_type": "cargo", "number": "MSCU1234567", "shipment_id": "abc12345-6789-40ef-9012-3456789abcde", "scac": "MSCU", "port_of_lading_name": null, "port_of_discharge_name": null, "containers_count": null, "tracking_stopped": null, "tracking_stopped_reason": null, "status": null, "failed_reason": null, "ref_numbers": [], "created_at": "2026-01-15T10:30:00.000Z", "updated_at": "2026-03-01T14:22:00.000Z" } } ] } } } }, "400": { "description": "Bad request \u2014 missing required `query` parameter", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "detail": { "type": "string" } } } } } }, "example": { "errors": [ { "detail": "Query parameter is required" } ] } } } }, "401": { "description": "Unauthorized \u2014 missing or invalid API token", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "$ref": "#/components/schemas/error" } } } }, "examples": { "unauthorized": { "summary": "Missing or invalid API token", "value": { "errors": [ { "status": "401", "title": "Unauthorized", "detail": "Invalid or missing API token." } ] } } } } } } } } } }, "x-tagGroups": [ { "name": "End Points", "tags": [ "Shipments", "Containers", "Custom Field Definitions", "Custom Field Options", "Custom Fields", "Tracking Requests", "Webhooks", "Webhook Notifications", "Metro Areas", "Documents", "Email Submissions", "Document Schemas", "Search" ] }, { "name": "Routing (Paid)", "tags": [ "Routing (Paid)" ] } ], "components": { "schemas": { "shipment": { "title": "Shipment model", "type": "object", "x-examples": {}, "description": "", "properties": { "id": { "type": "string", "format": "uuid" }, "relationships": { "type": "object", "properties": { "destination": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "type": { "type": "string", "enum": [ "port", "metro_area" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "port_of_lading": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "type": { "type": "string", "enum": [ "port" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "containers": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "container" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } } }, "port_of_discharge": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "type": { "type": "string", "enum": [ "port" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "pod_terminal": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "terminal" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "destination_terminal": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "terminal", "rail_terminal" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "line_tracking_stopped_by_user": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "user" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } } } }, "attributes": { "type": "object", "properties": { "bill_of_lading_number": { "type": "string" }, "normalized_number": { "type": "string", "description": "The normalized version of the shipment number used for querying the carrier" }, "ref_numbers": { "type": "array", "items": { "type": "string" }, "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "tags": { "type": "array", "items": { "type": "string" } }, "port_of_lading_locode": { "type": "string", "description": "UN/LOCODE", "nullable": true }, "port_of_lading_name": { "type": "string", "nullable": true }, "port_of_discharge_locode": { "type": "string", "description": "UN/LOCODE", "nullable": true }, "port_of_discharge_name": { "type": "string", "nullable": true }, "destination_locode": { "type": "string", "description": "UN/LOCODE", "nullable": true }, "destination_name": { "type": "string", "nullable": true }, "shipping_line_scac": { "type": "string" }, "shipping_line_name": { "type": "string" }, "shipping_line_short_name": { "type": "string" }, "customer_name": { "type": "string", "nullable": true }, "pod_vessel_name": { "type": "string", "nullable": true }, "pod_vessel_imo": { "type": "string", "nullable": true }, "pod_voyage_number": { "type": "string", "nullable": true }, "pol_etd_at": { "type": "string", "format": "date-time", "description": "Estimated Time of Departure from the Port of Lading, as reported by the shipping line. Carrier dependent; may be null.", "nullable": true }, "pol_atd_at": { "type": "string", "format": "date-time", "description": "Actual Time of Departure from the Port of Lading. Populated after the vessel has departed the origin port.", "nullable": true }, "pod_eta_at": { "type": "string", "format": "date-time", "description": "Estimated Time of Arrival at the Port of Discharge.", "nullable": true }, "pod_original_eta_at": { "type": "string", "format": "date-time", "description": "Initial Estimated Time of Arrival at the Port of Discharge, as first reported by the shipping line.", "nullable": true }, "pod_ata_at": { "type": "string", "format": "date-time", "description": "Actual Time of Arrival at the Port of Discharge.", "nullable": true }, "destination_eta_at": { "type": "string", "format": "date-time", "description": "Estimated Time of Arrival at the shipment's destination, as reported by the shipping line. For inland (rail) moves, see also the container-level `ind_eta_at`, which is reported by the rail carrier. Corresponding timezone is `destination_timezone`.", "nullable": true }, "destination_ata_at": { "type": "string", "format": "date-time", "description": "Actual Time of Arrival at the shipment's destination, as reported by the shipping line. For inland (rail) moves, see also the container-level `ind_ata_at`, which is reported by the rail carrier. Corresponding timezone is `destination_timezone`.", "nullable": true }, "pol_timezone": { "type": "string", "description": "IANA tz", "nullable": true }, "pod_timezone": { "type": "string", "description": "IANA tz", "nullable": true }, "destination_timezone": { "type": "string", "description": "IANA tz", "nullable": true }, "line_tracking_last_attempted_at": { "type": "string", "format": "date-time", "description": "When Terminal49 last tried to update the shipment status from the shipping line", "nullable": true }, "line_tracking_last_succeeded_at": { "type": "string", "format": "date-time", "description": "When Terminal49 last successfully updated the shipment status from the shipping line", "nullable": true }, "line_tracking_stopped_at": { "type": "string", "format": "date-time", "description": "When Terminal49 stopped checking at the shipping line", "nullable": true }, "line_tracking_stopped_reason": { "type": "string", "enum": [ "all_containers_terminated", "past_arrival_window", "past_full_out_window", "no_updates_at_line", "cancelled_by_user", "booking_cancelled", null ], "description": "The reason Terminal49 stopped checking", "nullable": true } }, "required": [ "bill_of_lading_number" ] }, "type": { "type": "string", "enum": [ "shipment" ] }, "links": { "type": "object", "properties": { "self": { "type": "string", "format": "uri" } }, "required": [ "self" ] } }, "required": [ "id", "type", "attributes", "relationships", "links" ] }, "meta": { "title": "meta", "type": "object", "properties": { "size": { "type": "integer" }, "total": { "type": "integer" } } }, "link-self": { "title": "link", "type": "object", "properties": { "self": { "type": "string", "format": "uri" } } }, "links": { "title": "links", "type": "object", "properties": { "last": { "type": "string", "format": "uri" }, "next": { "type": "string", "format": "uri" }, "prev": { "type": "string", "format": "uri" }, "first": { "type": "string", "format": "uri" }, "self": { "type": "string", "format": "uri" } } }, "container": { "title": "Container model", "type": "object", "x-examples": { "Example Container": { "id": "ff77a822-23a7-4ccd-95ca-g534c071baaf3", "type": "container", "attributes": { "number": "KOCU4959010", "ref_numbers": [ "REF-1", "REF-2" ], "seal_number": "210084213", "created_at": "2021-10-18T09:52:33Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 20210, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2022-01-21T08:00:00Z", "pickup_appointment_at": null, "pod_full_out_chassis_number": "APMZ418805", "location_at_pod_terminal": "Delivered 02/11/2022 14:18", "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2022-01-03T10:30:00Z", "pod_discharged_at": "2022-01-08T09:15:00Z", "final_destination_full_out_at": null, "pod_full_out_at": "2022-02-11T22:18:00Z", "empty_terminated_at": null, "terminal_checked_at": "2022-02-11T22:45:32Z", "pod_rail_carrier_scac": "UPRR", "ind_rail_carrier_scac": "CSXT", "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null, "pod_last_tracking_request_at": "2022-02-11T22:40:00Z", "shipment_last_tracking_request_at": "2022-02-11T22:40:00Z", "pod_rail_loaded_at": "2022-02-11T22:18:00Z", "pod_rail_departed_at": "2022-02-11T23:30:00Z", "ind_eta_at": null, "ind_ata_at": "2022-02-15T01:12:00Z", "ind_rail_unloaded_at": "2022-02-15T07:54:00Z", "ind_facility_lfd_on": null, "import_deadlines": { "pickup_lfd_terminal": null, "pickup_lfd_rail": "2022-02-20T08:00:00Z", "pickup_lfd_line": "2022-02-25T08:00:00Z" }, "current_status": "delivered" }, "relationships": { "shipment": { "data": { "id": "x92acf88-c263-43ddf-b005-aca2a32d47f1", "type": "shipment" } }, "pod_terminal": { "data": { "id": "x551cac7-aff5-40a6-9c63-49facf19cc3df", "type": "terminal" } }, "pickup_facility": { "data": { "id": "d7d8d314-b02b-4caa-b04f-d3d4726f4107", "type": "terminal" } }, "transport_events": { "data": [ { "id": "xecfe2d1-c498-4022-a9f8-ec56722e1215", "type": "transport_event" }, { "id": "2900a9b8-d9e2-4696-abd86-4a767b885d23", "type": "transport_event" }, { "id": "5ad0dce1-x78e4-464d-af5f-a36190428a2c", "type": "transport_event" }, { "id": "876575d5-5ede-40d6-a093-c3a4cfcxaa1c7", "type": "transport_event" }, { "id": "dc2a9d8f-75e6-43xa5-a04e-58458495f08c", "type": "transport_event" }, { "id": "50xd2ea1-01ac-473d-8a08-3b5d77d2b793", "type": "transport_event" }, { "id": "9d1f55xe3-6758-4be7-872a-30451ddd957e", "type": "transport_event" } ] }, "raw_events": { "data": [ { "id": "38084a1d-a2eb-434e-81ac3-606c89a61c4b", "type": "raw_event" }, { "id": "53680df3-93d5-4385-86c5-a33ee41b4c1f", "type": "raw_event" }, { "id": "7d9cdf70-51e8-4b75-a8229-f5d691495ab6", "type": "raw_event" }, { "id": "e62d41ac-8738-42e8-b582-35ef28ae88e2", "type": "raw_event" }, { "id": "1209172b-acd8-4ce0-8821-dbc4934208b3", "type": "raw_event" }, { "id": "4265ea5f-2b9a-436f-98fa-803d8ed49acb2", "type": "raw_event" }, { "id": "c3cb2eb7-6c0a-4db8-8742-517b97b175d5", "type": "raw_event" }, { "id": "b1959f36-a218-4b6e-863a9-2e0b4ad5159c", "type": "raw_event" } ] } } } }, "description": "Represents the equipment during a specific journey.", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "account" ] }, "attributes": { "type": "object", "properties": { "number": { "type": "string" }, "ref_numbers": { "type": "array", "items": { "type": "string" } }, "equipment_type": { "type": "string", "enum": [ "dry", "reefer", "open top", "flat rack", "bulk", "tank", null ], "nullable": true }, "equipment_length": { "type": "integer", "enum": [ null, 10, 20, 40, 45 ], "nullable": true }, "equipment_height": { "type": "string", "enum": [ "standard", "high_cube", null ], "nullable": true }, "weight_in_lbs": { "type": "number", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "seal_number": { "type": "string", "nullable": true }, "pickup_lfd": { "type": "string", "format": "date-time", "description": "Coalesces `import_deadlines` values giving preference to `pickup_lfd_line`", "nullable": true }, "pickup_appointment_at": { "type": "string", "format": "date-time", "description": "When available the pickup appointment time at the terminal is returned.", "nullable": true }, "availability_known": { "type": "boolean", "description": "Whether Terminal 49 is receiving availability status from the terminal." }, "available_for_pickup": { "type": "boolean", "description": "If availability_known is true, then whether container is available to be picked up at terminal.", "nullable": true }, "pod_arrived_at": { "type": "string", "format": "date-time", "description": "Time the vessel arrived at the POD", "nullable": true }, "pod_discharged_at": { "type": "string", "format": "date-time", "description": "Discharge time at the port of discharge", "nullable": true }, "pod_full_out_at": { "type": "string", "format": "date-time", "description": "Full Out time at port of discharge. Null for inland moves.", "nullable": true }, "terminal_checked_at": { "type": "string", "format": "date-time", "description": "When the terminal was last checked.", "nullable": true }, "pod_full_out_chassis_number": { "type": "string", "description": "The chassis number used when container was picked up at POD (if available)", "nullable": true }, "location_at_pod_terminal": { "type": "string", "description": "Location at port of discharge terminal", "nullable": true }, "final_destination_full_out_at": { "type": "string", "format": "date-time", "description": "Pickup time at final destination for inland moves.", "nullable": true }, "empty_terminated_at": { "type": "string", "format": "date-time", "description": "Time empty container was returned.", "nullable": true }, "holds_at_pod_terminal": { "type": "array", "items": { "$ref": "#/components/schemas/terminal_hold" } }, "fees_at_pod_terminal": { "type": "array", "items": { "$ref": "#/components/schemas/terminal_fee" } }, "pod_timezone": { "type": "string", "description": "IANA tz. Applies to attributes pod_arrived_at, pod_discharged_at, pickup_appointment_at, pod_full_out_at.", "nullable": true }, "final_destination_timezone": { "type": "string", "description": "IANA tz. Applies to attribute final_destination_full_out_at.", "nullable": true }, "empty_terminated_timezone": { "type": "string", "description": "IANA tz. Applies to attribute empty_terminated_at.", "nullable": true }, "pod_rail_carrier_scac": { "type": "string", "description": "The SCAC of the rail carrier for the pickup leg of the container's journey.(BETA)", "nullable": true }, "ind_rail_carrier_scac": { "type": "string", "description": "The SCAC of the rail carrier for the delivery leg of the container's journey.(BETA)", "nullable": true }, "pod_last_tracking_request_at": { "type": "string", "format": "date-time", "nullable": true }, "shipment_last_tracking_request_at": { "type": "string", "format": "date-time", "nullable": true }, "pod_rail_loaded_at": { "type": "string", "format": "date-time", "nullable": true }, "pod_rail_departed_at": { "type": "string", "format": "date-time", "nullable": true }, "ind_eta_at": { "type": "string", "format": "date-time", "description": "Estimated Time of Arrival at the inland destination, as reported by the rail carrier. For the shipping-line view at the shipment's destination, see `destination_eta_at` on the shipment. Corresponding timezone is `final_destination_timezone`.", "nullable": true }, "ind_ata_at": { "type": "string", "format": "date-time", "description": "Actual Time of Arrival at the inland destination, as reported by the rail carrier. For the shipping-line view at the shipment's destination, see `destination_ata_at` on the shipment. Corresponding timezone is `final_destination_timezone`.", "nullable": true }, "ind_rail_unloaded_at": { "type": "string", "format": "date-time", "description": "Time when the container is unloaded from rail at the inland destination.", "nullable": true }, "ind_facility_lfd_on": { "type": "string", "format": "date-time", "description": "Please use `import_deadlines.pickup_lfd_rail`", "nullable": true, "deprecated": true }, "import_deadlines": { "type": "object", "description": "Import pickup deadlines for the container", "properties": { "pickup_lfd_terminal": { "type": "string", "format": "date-time", "description": "The last free day for pickup before demmurage accrues. Corresponding timezone is pod_timezone.", "nullable": true }, "pickup_lfd_rail": { "type": "string", "format": "date-time", "description": "The last free day for pickup at the inland destination, as reported by the rail carrier. Corresponding timezone is final_destination_timezone. Subscribe to `container.pickup_lfd_rail.changed` to be notified of updates.", "nullable": true }, "pickup_lfd_line": { "type": "string", "format": "date-time", "description": "The last free day as reported by the shipping line (carrier dependent). Corresponding timezone is final_destination_timezone or pod_timezone. Preferred source for the coalesced top-level `pickup_lfd` field.", "nullable": true } }, "nullable": true }, "current_status": { "type": "string", "description": "The current status of the container in its journey. [Read guide to learn more.](/api-docs/in-depth-guides/container-statuses)", "enum": [ "new", "on_ship", "available", "not_available", "grounded", "on_rail", "picked_up", "off_dock", "delivered", "dropped", "loaded", "empty_returned", "awaiting_inland_transfer" ] } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "shipment" ] } } } } }, "pickup_facility": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "terminal" ] } } } } }, "pod_terminal": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "terminal" ] } } } } }, "transport_events": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "transport_event" ] } } } } } }, "raw_events": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "raw_event" ] } } } } } } } } }, "required": [ "id", "type", "attributes" ] }, "port": { "title": "Port model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "code": { "type": "string", "description": "UN/LOCODE" }, "state_abbr": { "type": "string", "x-stoplight": { "id": "jixah1a0q3exs" }, "nullable": true }, "city": { "type": "string", "x-stoplight": { "id": "657ij4boc7kyv" }, "nullable": true }, "country_code": { "type": "string", "description": "2 digit country code" }, "time_zone": { "type": "string", "description": "IANA tz" }, "latitude": { "type": "number", "x-stoplight": { "id": "480os7a90z6kk" }, "nullable": true }, "longitude": { "type": "number", "x-stoplight": { "id": "nfdetqgx5p1yv" }, "nullable": true } } }, "type": { "type": "string", "enum": [ "port" ] } }, "required": [ "id", "type" ] }, "shipping_line": { "title": "Shipping line model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "required": [ "scac", "name", "alternative_scacs", "short_name", "bill_of_lading_tracking_support", "booking_number_tracking_support", "container_number_tracking_support" ], "properties": { "scac": { "type": "string", "minLength": 4, "maxLength": 4 }, "name": { "type": "string" }, "alternative_scacs": { "type": "array", "x-stoplight": { "id": "jwf70hnip0xwb" }, "description": "Additional SCACs which will be accepted in tracking requests", "items": { "x-stoplight": { "id": "nrqnwg5y2u0ni" }, "type": "string", "minLength": 4, "maxLength": 4 } }, "short_name": { "type": "string" }, "bill_of_lading_tracking_support": { "type": "boolean" }, "booking_number_tracking_support": { "type": "boolean" }, "container_number_tracking_support": { "type": "boolean" } } }, "type": { "type": "string", "enum": [ "shipping_line" ] } }, "required": [ "id", "attributes", "type" ] }, "account": { "title": "Account model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "account" ] }, "attributes": { "type": "object", "required": [ "company_name" ], "properties": { "company_name": { "type": "string" } } } }, "required": [ "id", "type", "attributes" ], "x-examples": {} }, "error": { "title": "Error model", "type": "object", "properties": { "detail": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "source": { "type": "object", "nullable": true, "properties": { "pointer": { "type": "string", "nullable": true }, "parameter": { "type": "string", "nullable": true } } }, "code": { "type": "string", "nullable": true }, "status": { "type": "string", "nullable": true }, "meta": { "type": "object", "nullable": true, "additionalProperties": true } }, "required": [ "title" ] }, "metro_area": { "title": "Metro area model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "code": { "type": "string", "description": "UN/LOCODE" }, "state_abbr": { "type": "string", "x-stoplight": { "id": "j9yuwej2ym7yq" }, "nullable": true }, "country_code": { "type": "string", "x-stoplight": { "id": "hfupdk750wcrj" } }, "time_zone": { "type": "string", "description": "IANA tz", "x-stoplight": { "id": "izvtty345nfsz" } }, "latitude": { "type": "number", "x-stoplight": { "id": "9l62t4cwsp53w" }, "nullable": true }, "longitude": { "type": "number", "x-stoplight": { "id": "3tzibc0li8xvg" }, "nullable": true } } }, "type": { "type": "string", "enum": [ "metro_area" ] }, "": { "type": "string", "x-stoplight": { "id": "kwcjunrtu3r5o" } } }, "required": [ "id", "type" ] }, "terminal": { "title": "Terminal model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "relationships": { "type": "object", "required": [ "port" ], "properties": { "port": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port" ] } } } } } } }, "attributes": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "nickname": { "type": "string" }, "firms_code": { "type": "string", "description": "CBP FIRMS Code or CBS Sublocation Code" }, "smdg_code": { "type": "string", "description": "SMDG Code" }, "bic_facility_code": { "type": "string", "description": "BIC Facility Code" }, "street": { "type": "string", "description": "Street part of the address" }, "city": { "type": "string", "description": "City part of the address" }, "state": { "type": "string", "description": "State part of the address" }, "state_abbr": { "type": "string", "description": "State abbreviation for the state" }, "zip": { "type": "string", "description": "ZIP code part of the address" }, "country": { "type": "string", "description": "Country part of the address" } } }, "type": { "type": "string", "enum": [ "terminal" ] } }, "required": [ "attributes", "relationships" ] }, "rail_terminal": { "title": "Rail Terminal model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "relationships": { "type": "object", "properties": { "port": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port" ] } } } } }, "metro_area": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "metro_area" ] } } } } } } }, "attributes": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "nickname": { "type": "string" }, "firms_code": { "type": "string", "description": "CBP FIRMS Code or CBS Sublocation Code" } } }, "type": { "type": "string", "enum": [ "rail_terminal" ] } }, "required": [ "attributes" ] }, "tracking_request": { "title": "Tracking Request", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "tracking_request" ] }, "attributes": { "type": "object", "properties": { "request_number": { "type": "string", "example": "ONEYSH9AME650500" }, "ref_numbers": { "type": "array", "nullable": true, "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string", "enum": [ "pending", "awaiting_manifest", "created", "failed", "tracking_stopped" ] }, "failed_reason": { "type": "string", "enum": [ "booking_cancelled", "duplicate", "expired", "internal_processing_error", "invalid_number", "not_found", "retries_exhausted", "shipping_line_unreachable", "unrecognized_response", "data_unavailable", "scac_auto_detect_failed", null ], "description": "If the tracking request has failed, or is currently failing, the last reason we were unable to complete the request. `scac_auto_detect_failed` means `auto_detect_vocc_scac` was set but no supported carrier SCAC could be inferred from the request number.", "nullable": true }, "request_type": { "type": "string", "enum": [ "bill_of_lading", "booking_number", "container" ], "example": "bill_of_lading" }, "scac": { "type": "string", "example": "ONEY", "minLength": 4, "maxLength": 4 }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "is_retrying": { "type": "boolean" }, "retry_count": { "type": "integer", "description": "How many times T49 has attempted to get the shipment from the shipping line", "nullable": true } }, "required": [ "request_number", "status", "request_type", "scac", "created_at" ] }, "relationships": { "type": "object", "properties": { "tracked_object": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } } } } }, "customer": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "party" ] } } } } } } } }, "required": [ "id", "type" ] }, "webhook": { "title": "webhook", "type": "object", "x-examples": {}, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "webhook" ] }, "attributes": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "https end point" }, "active": { "type": "boolean", "default": true, "description": "Whether the webhook will be delivered when events are triggered" }, "events": { "type": "array", "description": "The list of events to enabled for this endpoint", "uniqueItems": true, "minItems": 1, "items": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ] } }, "secret": { "type": "string", "description": "A random token that will sign all delivered webhooks" }, "headers": { "type": "array", "nullable": true, "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } }, "required": [ "url", "active", "events", "secret" ] } }, "required": [ "id", "type" ], "description": "" }, "vessel": { "title": "vessel", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the ship or vessel", "example": "Ever Given" }, "imo": { "type": "string", "description": "International Maritime Organization (IMO) number", "nullable": true, "example": "9811000" }, "mmsi": { "type": "string", "description": "Maritime Mobile Service Identity (MMSI)", "nullable": true, "example": "353136000" }, "latitude": { "type": "number", "description": "The current latitude position of the vessel", "nullable": true, "example": 25.29845 }, "longitude": { "type": "number", "description": "The current longitude position of the vessel", "nullable": true, "example": 121.217 }, "nautical_speed_knots": { "type": "number", "description": "The current speed of the ship in knots (nautical miles per hour)", "nullable": true, "example": 90 }, "navigational_heading_degrees": { "type": "number", "description": "The current heading of the ship in degrees, where 0 is North, 90 is East, 180 is South, and 270 is West", "nullable": true, "example": 194 }, "position_timestamp": { "type": "string", "description": "The timestamp of when the ship's position was last recorded, in ISO 8601 date and time format", "nullable": true, "example": "2023-07-28T14:01:37Z" }, "positions": { "type": "array", "description": "An array of historical position data for the vessel. Only included if `show_positions` is true.", "nullable": true, "items": { "type": "object", "properties": { "latitude": { "type": "number", "example": 1.477285 }, "longitude": { "type": "number", "example": 104.535533333 }, "heading": { "type": "number", "nullable": true, "example": 51 }, "timestamp": { "type": "string", "format": "date-time", "example": "2025-05-23T19:14:22Z" }, "estimated": { "type": "boolean", "example": false } } } } } } } }, "transport_event": { "title": "Transport Event Model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "transport_event" ] }, "attributes": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ] }, "voyage_number": { "type": "string", "nullable": true }, "timestamp": { "type": "string", "format": "date-time", "nullable": true }, "timezone": { "type": "string", "description": "IANA tz", "nullable": true }, "location_locode": { "type": "string", "description": "UNLOCODE of the event location", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "data_source": { "type": "string", "enum": [ "shipping_line", "terminal", "ais" ], "example": "shipping_line", "description": "The original source of the event data" } } }, "relationships": { "type": "object", "properties": { "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } } } } }, "location": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port", "metro_area" ] } } } } }, "vessel": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string", "enum": [ "vessel" ] } } } } }, "terminal": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "terminal", "rail_terminal" ] } } } } }, "container": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "container" ] } } } } } } } }, "required": [ "id", "type" ] }, "estimated_event": { "title": "Estimated Event Model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "estimated_event" ] }, "attributes": { "type": "object", "required": [ "created_at", "estimated_timestamp", "event" ], "properties": { "created_at": { "type": "string", "description": "When the estimated event was created", "format": "date-time" }, "estimated_timestamp": { "type": "string", "format": "date-time" }, "event": { "type": "string", "enum": [ "shipment.estimated.arrival", "document.extracted", "document.extraction_failed" ] }, "location_locode": { "type": "string", "description": "UNLOCODE of the event location", "nullable": true }, "timezone": { "type": "string", "description": "IANA tz", "nullable": true }, "voyage_number": { "type": "string", "nullable": true }, "data_source": { "type": "string", "enum": [ "shipping_line", "terminal" ], "description": "The original source of the event data" } } }, "relationships": { "type": "object", "required": [ "shipment" ], "properties": { "shipment": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } } } } }, "port": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port" ] } } } } }, "vessel": { "type": "object", "description": "\n", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] } } } } } } } }, "required": [ "id", "type", "attributes", "relationships" ] }, "webhook_notification": { "title": "webhook_notification", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "webhook_notification" ] }, "attributes": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "container.transport.vessel_arrived", "container.transport.estimated.vessel_arrived", "container.transport.vessel_discharged", "container.transport.vessel_loaded", "container.transport.vessel_departed", "container.transport.estimated.vessel_departed", "container.transport.rail_departed", "container.transport.rail_arrived", "container.transport.rail_loaded", "container.transport.rail_unloaded", "container.transport.transshipment_arrived", "container.transport.transshipment_discharged", "container.transport.transshipment_loaded", "container.transport.transshipment_departed", "container.transport.feeder_arrived", "container.transport.feeder_discharged", "container.transport.feeder_loaded", "container.transport.feeder_departed", "container.transport.empty_out", "container.transport.full_in", "container.transport.full_out", "container.transport.empty_in", "container.transport.vessel_berthed", "shipment.estimated.arrival", "tracking_request.succeeded", "tracking_request.failed", "tracking_request.awaiting_manifest", "tracking_request.tracking_stopped", "container.created", "container.updated", "container.pod_terminal_changed", "container.transport.arrived_at_inland_destination", "container.transport.estimated.arrived_at_inland_destination", "container.pickup_lfd.changed", "container.pickup_lfd_line.changed", "container.pickup_lfd_terminal.changed", "container.pickup_lfd_rail.changed", "container.pickup_appointment.changed", "container.transport.available", "container.transport.not_available", "container.transport.delivered", "document.extracted", "document.extraction_failed" ] }, "delivery_status": { "type": "string", "default": "pending", "enum": [ "pending", "succeeded", "failed" ], "description": "Whether the notification has been delivered to the webhook endpoint" }, "created_at": { "type": "string" } }, "required": [ "event", "delivery_status", "created_at" ] }, "relationships": { "type": "object", "properties": { "webhook": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "webhook" ] } } } } }, "reference_object": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "tracking_request", "estimated_event", "transport_event", "container_updated_event" ] } } } } } }, "required": [ "webhook" ] } } }, "terminal_hold": { "title": "terminal_hold", "type": "object", "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "hold" ] }, "description": { "type": "string", "description": "Text description from the terminal (if any)", "nullable": true } }, "required": [ "name", "status" ] }, "terminal_fee": { "title": "terminal_fee", "type": "object", "properties": { "type": { "type": "string", "enum": [ "demurrage", "exam", "extended_dwell_time", "other", "total" ] }, "amount": { "type": "number", "description": "The fee amount in local currency" }, "currency_code": { "type": "string", "description": "The ISO 4217 currency code of the fee is charged in. E.g. USD", "example": "USD" } }, "required": [ "type", "amount" ] }, "container_updated_event": { "title": "container_updated_event", "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "changeset": { "type": "object", "description": "A hash of all the changed attributes with the values being an array of the before and after. E.g. \n`{\"pickup_lfd\": [null, \"2020-05-20\"]}`\n\nThe current attributes that can be alerted on are:\n- `available_for_pickup`\n- `pickup_lfd`\n- `fees_at_pod_terminal`\n- `holds_at_pod_terminal`\n- `pickup_appointment_at`\n- `pod_terminal`" }, "timestamp": { "type": "string", "format": "date-time", "description": "" }, "timezone": { "type": "string", "description": "IANA tz " }, "data_source": { "type": "string", "enum": [ "terminal" ], "example": "terminal" } }, "required": [ "changeset", "timestamp" ] }, "relationships": { "type": "object", "required": [ "container", "terminal" ], "properties": { "container": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "container" ] } } } } }, "terminal": { "type": "object", "description": "", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "id", "type" ], "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "terminal" ] } } } } } } } }, "required": [ "relationships" ] }, "raw_event": { "title": "Raw Event Model", "type": "object", "description": "Raw Events represent the milestones from the shipping line for a given container.\n\n### About raw_event datetimes\n\nThe events may include estimated future events. The event is a future event if an `estimated_` timestamp is not null. \n\nThe datetime properties `timestamp` and `estimated`. \n\nWhen the `time_zone` property is present the datetimes are UTC timestamps, which can be converted to the local time by parsing the provided `time_zone`.\n\nWhen the `time_zone` property is absent, the datetimes represent local times which serialized as UTC timestamps for consistency. ", "properties": { "id": { "type": "string" }, "type": { "type": "string", "description": "", "enum": [ "raw_event" ] }, "attributes": { "type": "object", "properties": { "event": { "type": "string", "enum": [ "empty_out", "full_in", "positioned_in", "positioned_out", "vessel_loaded", "vessel_departed", "transshipment_arrived", "transshipment_discharged", "transshipment_loaded", "transshipment_departed", "feeder_arrived", "feeder_discharged", "feeder_loaded", "feeder_departed", "rail_loaded", "rail_departed", "rail_arrived", "rail_unloaded", "vessel_arrived", "vessel_discharged", "arrived_at_destination", "delivered", "full_out", "empty_in", "vgm_received", "carrier_release", "customs_release", "available" ], "description": "Normalized string representing the event", "nullable": true }, "original_event": { "type": "string", "description": "The event name as returned by the carrier" }, "timestamp": { "type": "string", "format": "date-time", "description": "The datetime the event either transpired or will occur in UTC" }, "estimated": { "type": "boolean", "description": "True if the timestamp is estimated, false otherwise" }, "actual_on": { "type": "string", "format": "date", "description": "Deprecated: The date of the event at the event location when no time information is available. ", "nullable": true }, "estimated_on": { "type": "string", "format": "date", "description": "Deprecated: The estimated date of the event at the event location when no time information is available. ", "nullable": true }, "actual_at": { "type": "string", "format": "date-time", "description": "Deprecated: The datetime the event transpired in UTC", "nullable": true }, "estimated_at": { "type": "string", "format": "date-time", "description": "Deprecated: The estimated datetime the event will occur in UTC", "nullable": true }, "timezone": { "type": "string", "description": "IANA tz where the event occured", "nullable": true }, "created_at": { "type": "string", "format": "date-time", "description": "When the raw_event was created in UTC" }, "location_name": { "type": "string", "description": "The city or facility name of the event location" }, "location_locode": { "type": "string", "description": "UNLOCODE of the event location", "nullable": true }, "vessel_name": { "type": "string", "description": "The name of the vessel where applicable", "nullable": true }, "vessel_imo": { "type": "string", "description": "The IMO of the vessel where applicable", "nullable": true }, "index": { "type": "integer", "description": "The order of the event. This may be helpful when only dates (i.e. actual_on) are available." }, "voyage_number": { "type": "string", "nullable": true } } }, "relationships": { "type": "object", "properties": { "location": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port", "metro_area" ] } } } } }, "vessel": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] } } } } } } } } }, "container_pod_terminal_changed_event": { "title": "Container Pod Terminal Changed Event", "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "attributes": { "type": "object", "properties": { "data_source": { "type": "string", "enum": [ "shipping_line", "terminal", "pierpass" ], "example": "shipping_line", "description": "Where the information about the terminal change came from" }, "timestamp": { "type": "string", "format": "date-time", "description": "When the terminal change was recorded" } } }, "relationships": { "type": "object", "properties": { "container": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "container" ] } } }, "shipment": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } } }, "terminal": { "type": "object", "description": "The terminal the container has changed to. If this container is still on the vessel this represents an advisory. If it was previously at the terminal this represents an off-dock move.", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "terminal" ] } } } } } }, "description": "" }, "party": { "title": "Party model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "attributes": { "type": "object", "required": [ "company_name" ], "properties": { "company_name": { "type": "string", "description": "Company name" } } }, "type": { "type": "string", "enum": [ "party" ] } }, "required": [ "attributes" ] }, "vessel_with_positions": { "title": "Vessel with positions model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] }, "attributes": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the ship or vessel" }, "imo": { "type": "string", "description": "International Maritime Organization (IMO) number", "nullable": true }, "mmsi": { "type": "string", "description": "Maritime Mobile Service Identity (MMSI)", "nullable": true }, "latitude": { "type": "number", "description": "The current latitude position of the vessel", "nullable": true }, "longitude": { "type": "number", "description": "The current longitude position of the vessel", "nullable": true }, "nautical_speed_knots": { "type": "number", "description": "The current speed of the ship in knots (nautical miles per hour)", "nullable": true }, "navigational_heading_degrees": { "type": "number", "description": "The current heading of the ship in degrees, where 0 is North, 90 is East, 180 is South, and 270 is West", "nullable": true }, "position_timestamp": { "type": "string", "format": "date-time", "description": "The timestamp of when the ship's position was last recorded, in ISO 8601 date and time format", "nullable": true }, "positions": { "type": "array", "description": "Array of estimated future positions", "items": { "type": "object", "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" }, "heading": { "type": "number", "nullable": true }, "timestamp": { "type": "string", "format": "date-time" }, "estimated": { "type": "boolean" } }, "required": [ "latitude", "longitude", "timestamp", "estimated" ] } } } } }, "required": [ "id", "type", "attributes" ] }, "portFeatureProperties": { "title": "Port", "type": "object", "properties": { "feature_type": { "type": "string", "enum": [ "port" ] }, "ports_sequence": { "type": "integer", "description": "The sequence number of this port in the route (1 = POL, last = POD)" }, "ports_total": { "type": "integer", "description": "Total number of ports in the route" }, "location_id": { "type": "string", "description": "Unique identifier for the port location" }, "location_type": { "type": "string", "enum": [ "Port" ] }, "name": { "type": "string", "description": "Name of the port" }, "state_abbr": { "type": "string", "nullable": true, "description": "State abbreviation (if applicable)" }, "state": { "type": "string", "nullable": true, "description": "State name (if applicable)" }, "country_code": { "type": "string", "description": "ISO country code" }, "country": { "type": "string", "description": "Country name" }, "time_zone": { "type": "string", "description": "IANA timezone identifier" }, "label": { "type": "string", "description": "Port label: POL, POD, or TS1, TS2, etc." }, "inbound_eta_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Estimated time of arrival (ISO 8601)" }, "inbound_ata_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Actual time of arrival (ISO 8601)" }, "outbound_etd_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Estimated time of departure (ISO 8601)" }, "outbound_atd_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Actual time of departure (ISO 8601)" }, "updated_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Last update timestamp from the shipment (ISO 8601)" } }, "required": [ "feature_type" ] }, "currentVesselFeatureProperties": { "title": "Current Vessel", "type": "object", "properties": { "feature_type": { "type": "string", "enum": [ "current_vessel" ] }, "ports_sequence": { "type": "integer", "description": "Sequence number of the departure port for this leg" }, "vessel_id": { "type": "string", "description": "Unique identifier for the vessel" }, "vessel_name": { "type": "string", "description": "Name of the vessel" }, "vessel_imo": { "type": "string", "description": "IMO number of the vessel" }, "voyage_number": { "type": "string", "nullable": true, "description": "Voyage number for this leg" }, "vessel_location_timestamp": { "type": "string", "format": "date-time", "description": "Timestamp of the vessel position (ISO 8601)" }, "vessel_location_heading": { "type": "number", "nullable": true, "description": "Vessel heading in degrees (0-360)" }, "vessel_location_speed": { "type": "number", "nullable": true, "description": "Vessel speed in knots" }, "departure_port_id": { "type": "string", "description": "ID of the port the vessel departed from" }, "departure_port_name": { "type": "string", "description": "Name of the departure port" }, "departure_port_state_abbr": { "type": "string", "nullable": true, "description": "State abbreviation of departure port" }, "departure_port_state": { "type": "string", "nullable": true, "description": "State name of departure port" }, "departure_port_country_code": { "type": "string", "description": "Country code of departure port" }, "departure_port_country": { "type": "string", "description": "Country name of departure port" }, "departure_port_label": { "type": "string", "description": "Label of departure port (POL, POD, TS1, etc.)" }, "departure_port_atd": { "type": "string", "format": "date-time", "nullable": true, "description": "Actual time of departure from the port (ISO 8601)" }, "departure_port_time_zone": { "type": "string", "description": "Timezone of departure port" }, "arrival_port_id": { "type": "string", "nullable": true, "description": "ID of the next port the vessel is heading to" }, "arrival_port_name": { "type": "string", "nullable": true, "description": "Name of the arrival port" }, "arrival_port_state_abbr": { "type": "string", "nullable": true, "description": "State abbreviation of arrival port" }, "arrival_port_state": { "type": "string", "nullable": true, "description": "State name of arrival port" }, "arrival_port_country_code": { "type": "string", "nullable": true, "description": "Country code of arrival port" }, "arrival_port_country": { "type": "string", "nullable": true, "description": "Country name of arrival port" }, "arrival_port_label": { "type": "string", "nullable": true, "description": "Label of arrival port (POL, POD, TS1, etc.)" }, "arrival_port_eta": { "type": "string", "format": "date-time", "nullable": true, "description": "Estimated time of arrival at the next port (ISO 8601)" }, "arrival_port_time_zone": { "type": "string", "nullable": true, "description": "Timezone of arrival port" } }, "required": [ "feature_type" ] }, "pastVesselLocationsFeatureProperties": { "title": "Past Vessel Locations", "type": "object", "properties": { "feature_type": { "type": "string", "enum": [ "past_vessel_locations" ] }, "ports_sequence": { "type": "integer", "description": "Sequence number of the departure port for this leg" }, "vessel_id": { "type": "string", "description": "Unique identifier for the vessel that traveled this path" }, "start_time": { "type": "string", "format": "date-time", "description": "Start timestamp of the path (ISO 8601)" }, "end_time": { "type": "string", "format": "date-time", "description": "End timestamp of the path (ISO 8601)" }, "point_count": { "type": "integer", "description": "Number of coordinate points in the LineString" }, "outbound_atd_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Actual time of departure from the origin port (ISO 8601)" }, "inbound_ata_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Actual time of arrival at the destination port (ISO 8601)" }, "inbound_eta_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Estimated time of arrival at the destination port (ISO 8601)" } }, "required": [ "feature_type" ] }, "estimatedFullLegFeatureProperties": { "title": "Estimated Full Leg", "type": "object", "properties": { "feature_type": { "type": "string", "enum": [ "estimated_full_legs" ] }, "ports_sequence": { "type": "integer", "description": "Sequence number of the departure port for this leg" }, "previous_port_id": { "type": "string", "description": "ID of the origin port" }, "next_port_id": { "type": "string", "description": "ID of the destination port" }, "point_count": { "type": "integer", "description": "Number of coordinate points in the LineString" } }, "required": [ "feature_type" ] }, "estimatedPartialLegFeatureProperties": { "title": "Estimated Partial Leg", "type": "object", "properties": { "feature_type": { "type": "string", "enum": [ "estimated_partial_leg" ] }, "ports_sequence": { "type": "integer", "description": "Sequence number of the departure port for this leg" }, "current_port_id": { "type": "string", "description": "ID of the port the vessel departed from" }, "next_port_id": { "type": "string", "description": "ID of the next port the vessel is heading to" }, "point_count": { "type": "integer", "description": "Number of coordinate points in the LineString" } }, "required": [ "feature_type" ] }, "pointGeometry": { "title": "Point", "type": "object", "properties": { "type": { "type": "string", "enum": [ "Point" ] }, "coordinates": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2, "example": [ 100.896831042, 13.065302386 ] } }, "required": [ "type", "coordinates" ] }, "custom_field_value": { "description": "Raw custom field value (type depends on definition)", "nullable": true, "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "array", "items": { "type": "string" } }, { "type": "object" } ] }, "custom_field": { "title": "Custom field", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "custom_field" ] }, "attributes": { "type": "object", "properties": { "api_slug": { "type": "string" }, "value": { "$ref": "#/components/schemas/custom_field_value" }, "display_value": { "type": "string", "nullable": true, "description": "Formatted value for display" } }, "required": [ "api_slug" ] }, "relationships": { "type": "object", "properties": { "entity": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "shipment", "container", "tracking_request" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } }, "definition": { "type": "object", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "custom_field_definition" ] }, "id": { "type": "string", "format": "uuid" } }, "required": [ "type", "id" ] } } } } } }, "required": [ "id", "type" ] }, "custom_field_definition": { "title": "Custom field definition", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "custom_field_definition" ] }, "attributes": { "type": "object", "properties": { "entity_type": { "type": "string", "enum": [ "Shipment", "Container", "TrackingRequest" ] }, "api_slug": { "type": "string" }, "display_name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "data_type": { "type": "string", "enum": [ "short_text", "number", "date", "datetime", "boolean", "enum", "enum_multi", "reference" ] }, "reference_type": { "type": "string", "nullable": true }, "validation": { "type": "object", "nullable": true, "additionalProperties": true }, "default_format": { "type": "string", "nullable": true }, "default_value": { "$ref": "#/components/schemas/custom_field_value" } }, "required": [ "entity_type", "api_slug", "display_name", "data_type" ] } }, "required": [ "id", "type" ] }, "custom_field_option": { "title": "Custom field option", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "custom_field_option" ] }, "attributes": { "type": "object", "properties": { "label": { "type": "string" }, "value": { "type": "string" }, "position": { "type": "integer", "nullable": true } }, "required": [ "label", "value" ] } }, "required": [ "id", "type" ] }, "lineStringGeometry": { "title": "LineString", "type": "object", "properties": { "type": { "type": "string", "enum": [ "LineString" ] }, "coordinates": { "type": "array", "items": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 }, "minItems": 2, "example": [ [ 100.868768333, 13.07306 ], [ 100.839155, 13.079318333 ] ] } }, "required": [ "type", "coordinates" ] }, "document_representation": { "title": "Document Representation", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document_representation" ] }, "attributes": { "type": "object", "properties": { "schema_version": { "type": "string" }, "payload": { "type": "object", "additionalProperties": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "required": [ "id", "type" ] }, "email_submission": { "title": "Email Submission", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "email_submission" ] }, "attributes": { "type": "object", "properties": { "subject": { "type": "string", "description": "Email subject line." }, "body": { "type": "string", "nullable": true, "description": "Email body content captured from the inbound message." }, "from": { "type": "array", "items": { "type": "string" }, "description": "Sender email addresses." }, "to": { "type": "array", "items": { "type": "string" }, "description": "Primary recipient email addresses." }, "cc": { "type": "array", "items": { "type": "string" }, "description": "CC recipient email addresses." }, "sent_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp from the inbound email header." }, "message_id": { "type": "string", "nullable": true, "description": "Message-ID header value." }, "in_reply_to": { "type": "string", "nullable": true, "description": "In-Reply-To header value." }, "references": { "type": "array", "items": { "type": "string" }, "description": "References header values." }, "content_type": { "type": "string", "nullable": true, "description": "Top-level MIME content type of the inbound email." }, "documents_count": { "type": "integer", "description": "Number of non-discarded documents created from this email." }, "created_at": { "type": "string", "format": "date-time", "description": "When the email submission record was created." }, "updated_at": { "type": "string", "format": "date-time", "description": "When the email submission record was last updated." } } }, "relationships": { "type": "object", "properties": { "account": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "account" ] } } } } }, "user": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "user" ] } } } } }, "documents": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document" ] } } } } } } } }, "links": { "type": "object", "properties": { "self": { "type": "string" } } } }, "required": [ "id", "type" ] }, "document_schema": { "title": "Document Schema", "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "document_schema" ] }, "attributes": { "type": "object", "properties": { "document_type": { "type": "string", "description": "Document type this schema applies to (for example, commercial_invoice)." }, "label": { "type": "string", "description": "Human-readable label for the document type." }, "schema_version": { "type": "string", "description": "Public schema version identifier." }, "full_version": { "type": "string", "description": "Fully-qualified schema version id (for example, commercial_invoice@2026-03-23)." }, "current": { "type": "boolean", "description": "Whether this schema version is currently active." }, "draft": { "type": "boolean", "description": "Whether this schema version is marked as draft." }, "active_at": { "type": "string", "format": "date-time", "nullable": true, "description": "Timestamp when this schema version became active." }, "schema_format": { "type": "string", "enum": [ "json_schema" ], "description": "Schema payload format." }, "description": { "type": "string", "nullable": true, "description": "Optional notes describing this schema." }, "schema_payload": { "type": "object", "additionalProperties": true, "description": "JSON Schema payload used to validate and describe extracted fields." }, "created_at": { "type": "string", "format": "date-time", "description": "When this schema record was created." }, "updated_at": { "type": "string", "format": "date-time", "description": "When this schema record was last updated." } } }, "links": { "type": "object", "properties": { "self": { "type": "string" } } } }, "required": [ "id", "type" ] }, "document": { "title": "Document", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document" ] }, "attributes": { "type": "object", "properties": { "id": { "description": "Unique identifier for the document.", "type": "string", "format": "uuid" }, "name": { "description": "Display name of the document.", "type": "string" }, "document_type": { "description": "System-classified document type.", "type": "string" }, "document_type_manual": { "description": "Document type set manually by a user, when available.", "type": "string", "nullable": true }, "classification_notes": { "description": "Additional notes captured during document classification.", "type": "string", "nullable": true }, "source": { "description": "How the document was created in Terminal49.", "type": "string", "enum": [ "upload", "api", "email", "split_document" ] }, "file_name": { "description": "Original file name of the uploaded or generated document.", "type": "string" }, "file_content_type": { "description": "MIME type of the document file.", "type": "string", "nullable": true }, "file_size_bytes": { "description": "File size in bytes.", "type": "integer", "nullable": true }, "created_at": { "description": "Timestamp when the document was created.", "type": "string", "format": "date-time" }, "updated_at": { "description": "Timestamp when the document was last updated.", "type": "string", "format": "date-time" } } }, "relationships": { "type": "object", "properties": { "account": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "account" ] } } } } }, "user": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "user" ] } } } } }, "email_submission": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "email_submission" ] } } } } }, "last_document_representation": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document_representation" ] } } } } }, "shipments": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } } } } } }, "cargos": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "container" ] } } } } } } } }, "links": { "type": "object", "properties": { "self": { "type": "string" }, "download": { "type": "string" } } } }, "required": [ "id", "type" ] }, "document_email_submission": { "title": "Document Email Submission", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "email_submission" ] }, "attributes": { "type": "object", "properties": { "subject": { "type": "string", "nullable": true }, "body_preview": { "type": "string", "nullable": true }, "from": { "type": "array", "items": { "type": "string" } }, "to": { "type": "array", "items": { "type": "string" } }, "cc": { "type": "array", "items": { "type": "string" } }, "message_id": { "type": "string", "nullable": true }, "sent_at": { "type": "string", "format": "date-time", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "required": [ "id", "type" ] }, "email_submission_document": { "title": "Email Submission Document", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document" ] }, "attributes": { "type": "object", "properties": { "name": { "type": "string" }, "source": { "type": "string", "enum": [ "upload", "api", "email", "split_document" ] }, "document_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } }, "relationships": { "type": "object", "properties": { "last_document_representation": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "document_representation" ] } } } } } } } }, "required": [ "id", "type" ] } }, "securitySchemes": { "authorization": { "name": "Authorization", "type": "apiKey", "in": "header", "description": "Use a Terminal49 API key in the `Authorization` header with the `Token` prefix.\n\n`Authorization: Token YOUR_API_KEY`" } } }, "tags": [ { "name": "Containers" }, { "name": "Custom Field Definitions" }, { "name": "Custom Field Options" }, { "name": "Custom Fields" }, { "name": "Shipments" }, { "name": "Locations" }, { "name": "Events" }, { "name": "Tracking Requests" }, { "name": "Webhooks" }, { "name": "Webhook Notifications" }, { "name": "Ports" }, { "name": "Metro Areas" }, { "name": "Terminals" }, { "name": "Routing (Paid)" }, { "name": "Documents" }, { "name": "Email Submissions" }, { "name": "Document Schemas" }, { "name": "Search" } ], "security": [ { "authorization": [] } ] }