{ "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.", "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": "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_vessel_imo": "9450648", "pod_voyage_number": "0108", "pol_etd_at": null, "pol_atd_at": "2020-02-15T21:53:00Z", "pol_timezone": "Asia/Calcutta", "pod_eta_at": "2020-03-18T08:00:00Z", "pod_ata_at": null, "pod_timezone": "America/New_York", "destination_eta_at": "2020-03-26T17:00: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": "America/Detroit", "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" } } ] } } } } } }, "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`" } ] } }, "/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": "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_vessel_imo": "9450648", "pod_voyage_number": "0108", "pol_etd_at": null, "pol_atd_at": "2020-02-15T21:53:00Z", "pol_timezone": "Asia/Calcutta", "pod_eta_at": "2020-03-18T08:00:00Z", "pod_ata_at": null, "pod_timezone": "America/New_York", "destination_eta_at": "2020-03-26T17:00: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" } } ] } } } } } }, "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", "status": "pending", "failed_reason": null }, "relationships": { "tracked_object": { "data": null } }, "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" ] }, "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" }, "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", "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", "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" ] } }, "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" ], "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" ], "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", "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" ], "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": "99e13c35-4bfa-47d7-863e-789f8be38ffc", "type": "container", "attributes": { "number": "TCLU6738746", "ref_numbers": [ "REF-1", "REF-2" ], "seal_number": null, "created_at": "2019-05-16T18:58:29Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 38618, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-24T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-19T12:30:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-22T18:57:17Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "2c13b381-5a21-487d-9b77-e1480216de54", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "f3747336-4f6b-4090-85c3-4550110fa403", "type": "transport_event" }, { "id": "ca3b871f-84e3-4f50-854c-6c8233ab1765", "type": "transport_event" } ] } } }, { "id": "b40c182d-31c8-474f-9c44-91764a6ca7f2", "type": "container", "attributes": { "number": "BMOU5497252", "ref_numbers": [ "REF-A", "REF-B" ], "seal_number": null, "created_at": "2019-05-09T23:35:35Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-21T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-14T02:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-17T16:37:28Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "497db4cd-89cc-44c1-a1ba-7b8adeaa109c", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "d05c6bf9-2963-4dfe-8960-c82fd3adff54", "type": "transport_event" }, { "id": "8f8eb94a-8f57-4e1d-9479-4a3f0727db03", "type": "transport_event" } ] } } }, { "id": "0c2fb0e9-7a42-4b8f-863b-6e4315d854c3", "type": "container", "attributes": { "number": "BMOU4973652", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-02T17:14:57Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-14T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-07T00:30:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-10T20:27:32Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "30017ce8-9146-4adb-aece-61063f582682", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "fc5ddc55-ce76-4d66-847f-52df957f066b", "type": "transport_event" }, { "id": "16f8c3c7-c546-473a-a319-6922b630df7a", "type": "transport_event" } ] } } }, { "id": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container", "attributes": { "number": "HLXU8143951", "ref_numbers": [], "seal_number": null, "created_at": "2020-04-09T21:28:21Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2020-04-20T07:00:00Z", "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": "2020-04-14T21:07:54Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "efc3f3c1-cdc2-4a7d-a176-762ddec107b8", "type": "transport_event" }, { "id": "951058bd-2c3b-4bcc-94e1-9be2526b9687", "type": "transport_event" }, { "id": "69af6795-56c2-4157-9a87-afd761cc85a0", "type": "transport_event" }, { "id": "68c3c29a-504a-4dbb-ad27-7194ef42d484", "type": "transport_event" }, { "id": "03349405-a9be-4f3e-abde-28f2cb3922bd", "type": "transport_event" }, { "id": "ba9f85b4-658d-4f23-9308-635964df8037", "type": "transport_event" } ] } } }, { "id": "6b291a97-858a-4706-82b1-52d54a334fca", "type": "container", "attributes": { "number": "TCLU9195719", "ref_numbers": [], "seal_number": null, "created_at": "2020-01-23T18:38:56Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2020-02-03T08:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2020-01-27T02:16:55Z", "pod_discharged_at": "2020-01-26T00:00:00Z", "final_destination_full_out_at": "2020-01-28T18:47:21Z", "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": "6e1933b4-5bea-4631-a7d2-fda49f48ded2", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "48f7ccd9-1de8-401f-ab82-3ee3cca928cb", "type": "transport_event" }, { "id": "31d6f5a4-4357-41fe-abd0-e9836c931474", "type": "transport_event" }, { "id": "6c1119dc-e56f-4829-9d68-bd0c893f497a", "type": "transport_event" }, { "id": "71dd3cf3-d4bd-403f-baa6-3c373a9f1cfd", "type": "transport_event" }, { "id": "028e5599-278f-46a6-b6ca-e5a659c7bf18", "type": "transport_event" } ] } } }, { "id": "157d61a9-9c88-4e9e-b2c9-5bfb9a83a2cc", "type": "container", "attributes": { "number": "UACU8516536", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-01T17:07:24Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-10T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-05T14:06:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-09T17:27:03Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "6de97a1b-c98f-4fce-a8fb-94cd768465c6", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "7b737e07-2f82-4053-9a5c-8bb948879ce0", "type": "transport_event" }, { "id": "70046aab-9f82-4ea5-ac3a-66178d2ed963", "type": "transport_event" } ] } } }, { "id": "8ab02150-421c-4f12-aa0f-47db07669314", "type": "container", "attributes": { "number": "SEGU5107747", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-08T21:45:51Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-21T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-14T02:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-17T16:08:09Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "20cc2981-82f5-40b8-a902-b8b23ac09333", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "600c0649-2a98-4da1-a3b5-1feb2e1e0596", "type": "transport_event" }, { "id": "fdfe058a-e767-4509-9bf0-7de6e4be9f83", "type": "transport_event" } ] } } }, { "id": "6bd7146e-db95-46fa-a4b7-ffc3c9b78a17", "type": "container", "attributes": { "number": "UACU5471567", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-08T21:35:38Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-21T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-14T02:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-16T22:18:25Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "1cd49507-67fc-4921-87a0-c364ea7f4983", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "33f908de-b7ae-4657-b915-1e3075506933", "type": "transport_event" }, { "id": "341d2a94-bdbc-4dd7-845e-916fcaebf245", "type": "transport_event" } ] } } }, { "id": "d640c4ea-5807-4988-b56b-65e7b6de29d0", "type": "container", "attributes": { "number": "UACU5524137", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-08T17:12:41Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-21T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-05-14T02:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-16T19:08:23Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "b01c16c3-0587-458a-8dd7-098849a0c5cd", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "af73b15e-e4e7-46e7-b062-5e65b4b90b41", "type": "transport_event" }, { "id": "4f2fe79f-1711-48e8-b567-db606a0dd056", "type": "transport_event" } ] } } }, { "id": "0f339ef2-a61e-4e7f-aa80-f11da3b34632", "type": "container", "attributes": { "number": "HLXU5075494", "ref_numbers": [], "seal_number": "026376", "created_at": "2019-04-25T21:36:28Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-07T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-04-28T07:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-02T19:28:06Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "e05d8614-3975-49be-bedd-405df9c1b93e", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "45cd2c09-741d-4274-af06-40e47c811aee", "type": "transport_event" }, { "id": "1a5df459-dfc1-4213-b75e-b3e26ec6dc24", "type": "transport_event" } ] } } }, { "id": "6dcf7287-9902-4773-8aa4-282039fa8bc1", "type": "container", "attributes": { "number": "TGHU1471867", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-25T21:17:31Z", "equipment_type": "dry", "equipment_length": 20, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-07T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-04-28T07:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-06T21:47:04Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "bb157764-43d6-49b4-ad8e-9e502005b4df", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "a72106e2-c417-4a61-ba84-eab052641acc", "type": "transport_event" }, { "id": "52fc252e-5396-4291-b9fb-903117501ab7", "type": "transport_event" } ] } } }, { "id": "4465c3b5-d2fa-4d43-b188-7e7607ec6dcc", "type": "container", "attributes": { "number": "HLXU5101016", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-25T20:45:40Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-07T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-04-29T00:12:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-03T22:58:38Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "a20645d1-a719-48c6-b69f-f82c4c721f90", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "8b37f3fa-6306-46d1-b139-100af4c995c8", "type": "transport_event" }, { "id": "b2455095-5820-4ad6-9b28-abf66af1642b", "type": "transport_event" } ] } } }, { "id": "b8a3a0a9-ea77-4707-aace-c23812e9b6d7", "type": "container", "attributes": { "number": "UACU8574527", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-25T20:58:36Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-07T07:00:00Z", "pickup_appointment_at": null, "availability_known": true, "available_for_pickup": false, "pod_arrived_at": "2019-04-28T07:00:00Z", "pod_discharged_at": null, "final_destination_full_out_at": null, "pod_full_out_at": "2019-05-03T23:08:29Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "d9f7749c-eab3-48bd-a082-2db475669e1b", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "66343ca1-97a4-4bb9-abfa-708443ebc206", "type": "transport_event" }, { "id": "6476546a-2ff0-49af-8664-0c3017bf68b2", "type": "transport_event" } ] } } }, { "id": "cd238a58-a7c9-451c-92c7-97d66f6d1706", "type": "container", "attributes": { "number": "MRKU4151565", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-15T18:15:45Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": 39522, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-26T07:00:00Z", "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": "2019-05-20T23:07:06Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "61ea98fe-9c02-45b6-b231-226ac10c78f5", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [] } } }, { "id": "7f1ae474-085a-4bb2-a23c-bf37f2ed7f67", "type": "container", "attributes": { "number": "TLLU5827929", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-30T16:24:17Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-12T07:00:00Z", "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": "2019-05-09T18:18:40Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "ccb853d3-9263-40c5-a79b-78d55364c380", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [] } } }, { "id": "d5c91950-68c6-4106-93da-b73dfb08b4aa", "type": "container", "attributes": { "number": "TCKU6404546", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-29T19:27:04Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-12T07:00:00Z", "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": "2019-05-08T20:40:06Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "9fa62c77-6091-4652-b70d-a8c5060c8638", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [] } } }, { "id": "6f36e54b-4bdd-451c-af83-1db946f215fe", "type": "container", "attributes": { "number": "MOFU6829869", "ref_numbers": [], "seal_number": null, "created_at": "2019-05-02T15:31:07Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "standard", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-13T07:00:00Z", "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": "2019-05-10T14:27:42Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "8831b8ab-155c-4569-9946-5fe245571cfb", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [] } } }, { "id": "0c1362dd-00f2-4de8-85c8-d6187ba3bea6", "type": "container", "attributes": { "number": "TCNU1126827", "ref_numbers": [], "seal_number": null, "created_at": "2019-04-29T19:33:59Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2019-05-12T07:00:00Z", "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": "2019-05-08T23:29:59Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "03845d0d-d54b-494c-97ef-ffa3e80c74b1", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [] } } } ], "meta": { "size": 18, "total": 18 }, "links": { "self": "https://api.terminal49.com/v2/containers", "current": "https://api.terminal49.com/v2/containers?page[number]=1" } } } } } } } }, "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": "eeafd337-72b5-4e5c-87cb-9ef83fa99cf4", "type": "container", "attributes": { "number": "HLXU8143951", "ref_numbers": [ "REF-1", "REF-2" ], "seal_number": null, "created_at": "2020-04-09T21:28:21Z", "equipment_type": "dry", "equipment_length": 40, "equipment_height": "high_cube", "weight_in_lbs": null, "fees_at_pod_terminal": [], "holds_at_pod_terminal": [], "pickup_lfd": "2020-04-20T07:00:00Z", "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": "2020-04-14T21:07:54Z", "empty_terminated_at": null, "pod_timezone": "America/Los_Angeles", "final_destination_timezone": null, "empty_terminated_timezone": null }, "relationships": { "shipment": { "data": { "id": "06264731-503e-498e-bc76-f90b87b31562", "type": "shipment" } }, "pod_terminal": { "data": { "id": "3e550f0e-ac2a-48fb-b242-5be45ecf2c78", "type": "terminal" } }, "transport_events": { "data": [ { "id": "efc3f3c1-cdc2-4a7d-a176-762ddec107b8", "type": "transport_event" }, { "id": "951058bd-2c3b-4bcc-94e1-9be2526b9687", "type": "transport_event" }, { "id": "69af6795-56c2-4157-9a87-afd761cc85a0", "type": "transport_event" }, { "id": "68c3c29a-504a-4dbb-ad27-7194ef42d484", "type": "transport_event" }, { "id": "03349405-a9be-4f3e-abde-28f2cb3922bd", "type": "transport_event" }, { "id": "ba9f85b4-658d-4f23-9308-635964df8037", "type": "transport_event" } ] } } }, "links": { "self": "https://api.terminal49.com/v2/containers/eeafd337-72b5-4e5c-87cb-9ef83fa99cf4" } } } } } } } }, "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": "\n> #### Deprecation warning\n>\n> The `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" } ] } }, "/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", "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } } }, "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 } ], "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" } } } } } } }, "operationId": "get-vessels-id", "description": "Returns a vessel by it's given identifier" } }, "/vessels/{imo}": { "parameters": [ { "schema": { "type": "string" }, "name": "imo", "in": "path", "required": true } ], "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" } } } } } } }, "operationId": "get-vessels-imo", "description": "Returns a vessel by the given IMO number.", "x-internal": 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." } } }, "x-tagGroups": [ { "name": "End Points", "tags": [ "Shipments", "Containers", "Tracking Requests", "Webhooks", "Webhook Notifications", "Metro Areas" ] } ], "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" ] } } }, "customer": { "type": "object", "description": "`unreleased`", "properties": { "data": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "account" ] }, "id": { "type": "string", "format": "uuid" } } } } }, "pod_terminal": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "terminal" ] }, "id": { "type": "string", "format": "uuid" } } }, "destination_terminal": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "terminal", "rail_terminal" ] }, "id": { "type": "string", "format": "uuid" } } } } }, "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", "description": "`unreleased`", "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" }, "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_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" ] } }, "required": [ "id", "type" ] }, "meta": { "title": "meta", "type": "object", "properties": { "size": { "type": "integer" }, "total": { "type": "integer" } } }, "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", "pickup_rail_carrier_scac": "UPRR" }, "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" }, "attributes": { "type": "object", "properties": { "number": { "type": "string" }, "ref_numbers": { "type": "array", "nullable": false, "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 deummurage 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 }, "last_status_refresh_at": { "type": "string", "format": "date-time", "description": "The last time the container status was retrieved from the pod terminal. (UTC)", "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 }, "pickup_rail_carrier_scac": { "type": "string", "description": "The SCAC of the rail carrier for the pickup leg of the container's journey.(BETA)", "nullable": true } } } }, "required": [ "id" ] }, "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" }, "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" ] } } } } } } } }, "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" ] } }, "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" } } } } }, "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" ] }, "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" ] }, "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" ], "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": "" } }, "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" } ], "security": [ { "authorization": [] } ] }