{ "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 request tracking `request_number`" }, { "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 }, "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": { "En-route to NY with inland move": { "value": { "data": { "id": "512ae32c-a604-44f8-9c15-2ca9cd3d2ae8", "type": "shipment", "attributes": { "bill_of_lading_number": "6140575020", "ref_numbers": [ "my-ref-49", "PO#18412" ], "created_at": "2020-02-20T13:37:12Z", "tags": [], "port_of_lading_locode": "INVTZ", "port_of_lading_name": "Visakhapatnam, IN", "port_of_discharge_locode": "USNYC", "port_of_discharge_name": "New York / New Jersey, NY", "destination_locode": "USDET", "destination_name": "Detroit, MI", "shipping_line_scac": "HLCU", "pod_vessel_name": "CMA CGM ALMAVIVA", "pod_voyage_number": "0108", "pol_etd_at": null, "pol_atd_at": "2020-02-15T21:53Z", "pol_timezone": "Asia/Calcutta", "pod_eta_at": "2020-03-18T08:00Z", "pod_ata_at": null, "pod_timezone": "America/New_York", "destination_eta_at": "2020-03-26T17:00Z", "destination_ata_at": null, "destination_timezone": "America/Detroit" }, "relationships": { "containers": { "data": [ { "id": "c99a81c0-ff69-4bdf-aa5f-8e33a787f5fa", "type": "container" } ] }, "port_of_lading": { "data": { "id": "bde5465a-1160-4fde-a026-74df9c362f65", "type": "port" } }, "port_of_discharge": { "data": { "id": "f7cb530a-9e60-412c-a5bc-205a2f34ba54", "type": "port" } }, "destination": { "data": { "id": "c9ae2b6b-5088-4e07-ba09-2872121e4fa2", "type": "metro_area" } }, "customer": { "data": { "id": "ff76b51a-371e-45ec-86d1-9d03ccae566a", "type": "account" } } } }, "included": [ { "id": "c99a81c0-ff69-4bdf-aa5f-8e33a787f5fa", "type": "container", "attributes": { "number": "UACU4743531", "equipment_type": "reefer", "length": 40, "height": "high_cube", "weight_in_lbs": 35075, "created_at": "2020-02-20T08:19:52Z", "seal_number": null, "pickup_lfd": null, "availability_known": false, "available_for_pickup": null, "current_transportation_mode": "vessel", "pod_discharged_at": null, "pod_picked_up_at": null, "destination_unloaded_at": null, "destination_picked_up_at": null, "empty_returned_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "most_recent_location": { "data": { "id": "dd179094-a1d4-4129-842d-b952e43df4b7", "type": "port" } }, "shipment": { "data": { "id": "512ae32c-a604-44f8-9c15-2ca9cd3d2ae8", "type": "shipment" } } } }, { "id": "bde5465a-1160-4fde-a026-74df9c362f65", "type": "port", "attributes": { "name": "Visakhapatnam", "code": "INVTZ", "country_code": "IN", "timezone": "Asia/Calcutta" } }, { "id": "dd179094-a1d4-4129-842d-b952e43df4b7", "type": "port", "attributes": { "name": "Damietta", "code": "EGDAM", "country_code": "EG", "time_zone": "Africa/Cairo" } }, { "id": "f7cb530a-9e60-412c-a5bc-205a2f34ba54", "type": "port", "attributes": { "name": "New York / New Jersey", "code": "USNYC", "country_code": "US", "timezone": "America/New_York" } }, { "id": "c9ae2b6b-5088-4e07-ba09-2872121e4fa2", "type": "metro_area", "attributes": { "name": "Detroit", "code": "USDET", "country_code": "US", "state_abbr": "MI", "timezone": "America/Detroit" } }, { "id": "ff76b51a-371e-45ec-86d1-9d03ccae566a", "type": "account", "attributes": { "name": "A-Z Imports" } }, { "id": "252a5450-2893-4207-b5c4-81ce3152ce84", "type": "vessel", "attributes": { "name": "CMA CGM ALMAVIVA", "imo": "9450648", "mmsi": "228339600", "latitude": 70.22625823437389, "longitude": 45.06279126658865, "nautical_speed_knots": 100, "navigational_heading_degrees": 1, "position_timestamp": "2023-06-05T19:46:18Z" } } ] } } } } } } }, "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" } }, "shipment_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" } ] } } } } } } }, "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", "example": "MSCU", "minLength": 4, "maxLength": 4 }, "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", "scac" ] }, "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" } } } } } }, "description": "Create a shipment tracking request" }, "security": [ { "authorization": [] } ], "description": "To track an ocean shipment, you create a new tracking request. \nTwo attributes are required to track a shipment. A `bill of lading/booking number` and a shipping line `SCAC`. \n\nOnce a tracking request is created we will attempt to fetch the shipment details and it's related containers from the shipping line. If the attempt is successful we will create in 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 notificaiton will only be sent if you have atleast one active webhook. ", "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" } } } } } } } }, "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", "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" }, "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]" }, { "schema": { "type": "string" }, "in": "query", "name": "filter[request_number]", "description": "filter by `request_number`" } ] } }, "/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": {} } } } }, "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." } } } } } } } } } } } }, "/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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ] } }, "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": "672bd7b58b54645934a830d8fa", "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ], "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ], "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": "C193J3QOXMFH", "created_at": "2020-06-05T19:06:13Z" } } } } } }, "application/xml": { "schema": { "$ref": "#/components/schemas/webhook" } } } } } }, "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 }, "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 }, "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ], "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": [] } }, "/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 }, "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 }, "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 }, "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 }, "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 }, "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" }, { "schema": { "type": "integer" }, "in": "query", "name": "terminal_checked_before", "description": "Number of seconds in which containers were refreshed" } ] }, "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 }, "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}/route": { "parameters": [ { "schema": { "type": "string" }, "name": "id", "in": "path", "required": true } ], "get": { "summary": "Get container route", "tags": [ "Containers", "Routing (Paid)" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/route" }, "included": { "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/port" }, { "$ref": "#/components/schemas/vessel" }, { "$ref": "#/components/schemas/route_location" }, { "$ref": "#/components/schemas/shipment" } ] } } } } } } }, "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-route", "description": "Retrieves the route details from the port of lading to the port of discharge, including transshipments. 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" ] } }, "/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" ] } } }, "x-tagGroups": [ { "name": "End Points", "tags": [ "Shipments", "Containers", "Tracking Requests", "Webhooks", "Webhook Notifications", "Metro Areas" ] }, { "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", "nullable": true }, "pol_atd_at": { "type": "string", "format": "date-time", "nullable": true }, "pod_eta_at": { "type": "string", "format": "date-time", "nullable": true }, "pod_original_eta_at": { "type": "string", "format": "date-time", "nullable": true }, "pod_ata_at": { "type": "string", "format": "date-time", "nullable": true }, "destination_eta_at": { "type": "string", "format": "date-time", "nullable": true }, "destination_ata_at": { "type": "string", "format": "date-time", "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", "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 }, "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": [ "container" ] }, "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": "The last free day for pickup before demmurage accrues. Corresponding timezone is pod_timezone.", "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", "nullable": true }, "ind_ata_at": { "type": "string", "format": "date-time", "nullable": true }, "ind_rail_unloaded_at": { "type": "string", "format": "date-time", "nullable": true }, "ind_facility_lfd_on": { "type": "string", "format": "date-time", "nullable": true } } }, "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": [ "container" ] }, "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, "properties": { "tracking_request_id": { "type": "string", "format": "uuid", "nullable": 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", null ], "description": "If the tracking request has failed, or is currently failing, the last reason we were unable to complete the request", "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ] } }, "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ] }, "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" ] }, "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.vessel_discharged", "container.transport.vessel_loaded", "container.transport.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.transport.available" ] }, "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" ] }, "route": { "title": "Route model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "route" ] }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "created_at", "updated_at" ] }, "relationships": { "type": "object", "properties": { "cargo": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "container" ] } }, "required": [ "id", "type" ] } } }, "shipment": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "shipment" ] } }, "required": [ "id", "type" ] } } }, "route_locations": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "route_location" ] } }, "required": [ "id", "type" ] } } } } } } }, "required": [ "id", "type", "attributes", "relationships" ] }, "route_location": { "title": "Route Location model", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "route_location" ] }, "attributes": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "inbound_scac": { "type": "string", "nullable": true, "minLength": 4, "maxLength": 4 }, "inbound_mode": { "type": "string", "nullable": true, "enum": [ "vessel", "rail", null ] }, "inbound_eta_at": { "type": "string", "format": "date-time", "nullable": true }, "inbound_ata_at": { "type": "string", "format": "date-time", "nullable": true }, "inbound_voyage_number": { "type": "string", "nullable": true }, "outbound_scac": { "type": "string", "nullable": true, "minLength": 4, "maxLength": 4 }, "outbound_mode": { "type": "string", "nullable": true, "enum": [ "vessel", "rail", null ] }, "outbound_etd_at": { "type": "string", "format": "date-time", "nullable": true }, "outbound_atd_at": { "type": "string", "format": "date-time", "nullable": true }, "outbound_voyage_number": { "type": "string", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "created_at", "updated_at" ] }, "relationships": { "type": "object", "properties": { "route": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "route" ] } }, "required": [ "id", "type" ] } } }, "inbound_vessel": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] } } } } }, "outbound_vessel": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "vessel" ] } } } } }, "location": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "port", "terminal" ] } } } } }, "facility": { "type": "object", "properties": { "data": { "type": "object", "nullable": true, "properties": { "id": { "type": "string", "format": "uuid" }, "type": { "type": "string", "enum": [ "terminal", "port" ] } } } } } } } }, "required": [ "id", "type", "attributes", "relationships" ] }, "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" ] } }, "securitySchemes": { "authorization": { "name": "Authorization", "type": "apiKey", "in": "header", "description": "`Token YOUR_API_TOKEN`\n\nThe APIs require authentication to be done using header-based API Key and Secret Authentication. \n\nAPI key and secret are sent va the `Authorization` request header.\n\nYou send your API key and secret in the following way:\n\n`Authorization: Token YOUR_API_KEY`" } } }, "tags": [ { "name": "Containers" }, { "name": "Shipments" }, { "name": "Locations" }, { "name": "Events" }, { "name": "Tracking Requests" }, { "name": "Webhooks" }, { "name": "Webhook Notifications" }, { "name": "Ports" }, { "name": "Metro Areas" }, { "name": "Terminals" }, { "name": "Routing (Paid)" } ], "security": [ { "authorization": [] } ] }