{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Tracking API, Terminal49 Shipments, ETAs and Events",
    "description": "Track ocean containers and shipments in your Terminal49 account: bill of lading status, carrier ETA and arrival, vessel, terminal holds, fees and last free day, transport and estimated events, route map, tracking requests, shipping lines, ports and vessels. Read only. Bring your own key.",
    "version": "0.1",
    "x-build-id": "vBCGj8IEHHjRhQ1IX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~ocean-container-shipment-tracking-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-ocean-container-shipment-tracking-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~ocean-container-shipment-tracking-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-ocean-container-shipment-tracking-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~ocean-container-shipment-tracking-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-ocean-container-shipment-tracking-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "shipments",
              "containers",
              "transportEvents",
              "rawEvents",
              "containerRoute",
              "trackingRequests",
              "shippingLines",
              "ports",
              "terminals",
              "vessels"
            ],
            "type": "string",
            "description": "Shipments: one row per tracked shipment with bill of lading, carrier, ports, ETA, ATA and vessel. Containers: one row per container with status, holds, fees, last free day and terminal. Container transport events (normalized past milestones), Container raw and estimated events (carrier wording, including future ETAs) and Container route map (ports, vessel position and paths; needs the Routing Data feature). Tracking requests lists what you asked Terminal49 to track. Shipping lines, Ports, Terminals and Vessels are reference lookups. Every call is a read only GET; this actor never creates tracking requests.",
            "default": "shipments"
          },
          "shipmentNumbers": {
            "title": "Shipment numbers",
            "type": "array",
            "description": "Shipments only, optional. One bill of lading or booking number per line, matched exactly. Leave empty to list every shipment that matches the filters below.",
            "items": {
              "type": "string"
            }
          },
          "shipmentIds": {
            "title": "Shipment IDs",
            "type": "array",
            "description": "Shipments only, optional. One Terminal49 shipment UUID per line, read directly.",
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Search text",
            "type": "string",
            "description": "Shipments and Tracking requests, optional. Prefix search across shipment numbers, reference numbers and container numbers (shipments), or request and reference numbers (tracking requests)."
          },
          "trackingState": {
            "title": "Tracking state",
            "enum": [
              "any",
              "active",
              "stopped"
            ],
            "type": "string",
            "description": "Shipments and Containers. Keeps shipments still being tracked, or those whose tracking was stopped.",
            "default": "any"
          },
          "voyageStatus": {
            "title": "Voyage status",
            "enum": [
              "arrived",
              "on_ship"
            ],
            "type": "string",
            "description": "Shipments only, optional. Arrived means the actual arrival at the port of discharge is known; on ship means it is not yet."
          },
          "tags": {
            "title": "Shipment tags",
            "type": "array",
            "description": "Shipments only, optional. Your Terminal49 shipment tags; a shipment with any of them matches.",
            "items": {
              "type": "string"
            }
          },
          "shipmentSort": {
            "title": "Shipment order",
            "enum": [
              "-created_at",
              "pod_arrival",
              "-pod_arrival"
            ],
            "type": "string",
            "description": "Shipments only, optional. Terminal49 lists newest first by default."
          },
          "polCodes": {
            "title": "Ports of lading",
            "type": "array",
            "description": "Shipments and Containers, optional. Port of lading UN/LOCODEs; any of them matches.",
            "items": {
              "type": "string"
            }
          },
          "podCodes": {
            "title": "Ports of discharge",
            "type": "array",
            "description": "Shipments and Containers, optional. Port of discharge UN/LOCODEs; any of them matches.",
            "items": {
              "type": "string"
            }
          },
          "arrivalFrom": {
            "title": "Arrival from",
            "type": "string",
            "description": "Shipments and Containers, optional. YYYY-MM-DD; port of discharge arrival (actual, else estimated) on or after it."
          },
          "arrivalTo": {
            "title": "Arrival to",
            "type": "string",
            "description": "Shipments and Containers, optional. YYYY-MM-DD; port of discharge arrival (actual, else estimated) on or before it."
          },
          "createdFrom": {
            "title": "Created from",
            "type": "string",
            "description": "Shipments, Containers and Tracking requests, optional. YYYY-MM-DD; records created on or after it."
          },
          "createdTo": {
            "title": "Created to",
            "type": "string",
            "description": "Shipments, Containers and Tracking requests, optional. YYYY-MM-DD; records created on or before it."
          },
          "containerNumbers": {
            "title": "Container numbers",
            "type": "array",
            "description": "Containers, events and route modes. One ISO 6346 container number per line. It must already be tracked in your Terminal49 account; this actor never starts tracking.",
            "items": {
              "type": "string"
            }
          },
          "containerIds": {
            "title": "Container IDs",
            "type": "array",
            "description": "Containers, events and route modes, optional. One Terminal49 container UUID per line.",
            "items": {
              "type": "string"
            }
          },
          "currentStatuses": {
            "title": "Container statuses",
            "type": "array",
            "description": "Containers only, optional. Keeps containers in any of these statuses.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "on_ship",
                "available",
                "not_available",
                "grounded",
                "on_rail",
                "picked_up",
                "off_dock",
                "delivered",
                "dropped",
                "loaded",
                "empty_returned",
                "awaiting_inland_transfer"
              ],
              "enumTitles": [
                "New",
                "On ship",
                "Available for pickup",
                "Not available",
                "Grounded",
                "On rail",
                "Picked up",
                "Off dock",
                "Delivered",
                "Dropped",
                "Loaded",
                "Empty returned",
                "Awaiting inland transfer"
              ]
            }
          },
          "carrierScacs": {
            "title": "Carrier SCACs",
            "type": "array",
            "description": "Containers and Tracking requests, optional. Shipping line SCACs such as MSCU or MAEU (Tracking requests takes one).",
            "items": {
              "type": "string"
            }
          },
          "onlyHoldsOrFees": {
            "title": "Only containers with holds or fees",
            "type": "boolean",
            "description": "Containers only. Keeps containers with terminal holds or fees reported.",
            "default": false
          },
          "lfdFrom": {
            "title": "Last free day from",
            "type": "string",
            "description": "Containers only, optional. YYYY-MM-DD; pickup last free day on or after it."
          },
          "lfdTo": {
            "title": "Last free day to",
            "type": "string",
            "description": "Containers only, optional. YYYY-MM-DD; pickup last free day on or before it."
          },
          "requestStatus": {
            "title": "Tracking request status",
            "enum": [
              "created",
              "pending",
              "failed",
              "cancelled"
            ],
            "type": "string",
            "description": "Tracking requests only, optional. Failed requests carry the failed reason."
          },
          "portCodes": {
            "title": "Port codes",
            "type": "array",
            "description": "Ports only. One UN/LOCODE (or Terminal49 port ID) per line.",
            "items": {
              "type": "string"
            }
          },
          "terminalIds": {
            "title": "Terminal IDs",
            "type": "array",
            "description": "Terminals only. One Terminal49 terminal UUID per line, as the pod_terminal relationship of a shipment or container gives it.",
            "items": {
              "type": "string"
            }
          },
          "vesselImos": {
            "title": "Vessel IMO numbers",
            "type": "array",
            "description": "Vessels only. One 7 digit IMO number per line. Needs the Routing Data feature; only vessels on your actively tracked shipments are returned.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pacing for calls to the Terminal49 API, which allows 100 requests per minute per key.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Terminal49 API key from app.terminal49.com/developers/api-keys. Stored as a secret and sent only to api.terminal49.com in the Authorization header; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}