{
  "openapi": "3.0.1",
  "info": {
    "title": "Container Delay & Free-Time Evidence Monitor",
    "description": "Turn buyer-authorized container event snapshots into deterministic ETA, milestone, free-time, cost-exposure, confidence, limitation, and human-review evidence. No carrier scraping, reference fetching, legal verdict, automatic claim, or provider key.",
    "version": "1.2",
    "x-build-id": "MXOcrPPpHh3pox9aH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~container-exception-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-container-exception-evidence",
        "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/zinin~container-exception-evidence/runs": {
      "post": {
        "operationId": "runs-sync-zinin-container-exception-evidence",
        "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/zinin~container-exception-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-container-exception-evidence",
        "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",
        "required": [
          "watchId",
          "mode",
          "sourceStatus",
          "rightsAttestation",
          "containers",
          "events",
          "tariffAssumptions"
        ],
        "properties": {
          "watchId": {
            "title": "Watch ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
            "minLength": 1,
            "maxLength": 128,
            "type": "string",
            "description": "Stable identifier for one customer-owned monitoring series."
          },
          "mode": {
            "title": "Run mode",
            "enum": [
              "snapshot",
              "synthetic_demo"
            ],
            "type": "string",
            "description": "Use snapshot for customer events or synthetic_demo for the one exact canonical zero-provider public example. The demo accepts only the published fixture values; runtime rejects any changed field, extra row, customer row, or secret before effects."
          },
          "sourceStatus": {
            "title": "Source completeness",
            "enum": [
              "complete",
              "partial",
              "unavailable"
            ],
            "type": "string",
            "description": "Declare whether this customer-supplied snapshot is complete, partial, or unavailable."
          },
          "rightsAttestation": {
            "title": "Rights attestation",
            "required": [
              "customerControlsOrIsAuthorizedToUseData",
              "noCredentialsOrSecretsSubmitted",
              "unfetchedReferencePolicyAccepted",
              "attestedAt",
              "attestorId"
            ],
            "type": "object",
            "description": "Required customer declaration. Apify Input Schema v1 can serialize false here; the Actor runtime requires all three declarations to be exactly true and rejects otherwise before provider, Dataset, billing, state, lock, intent, or delivery effects. Do not submit credentials, secrets, or data you are not authorized to use.",
            "properties": {
              "customerControlsOrIsAuthorizedToUseData": {
                "title": "Authorized data",
                "description": "Must be true. Input Schema v1 cannot enforce true; runtime rejects false before later effects.",
                "type": "boolean"
              },
              "noCredentialsOrSecretsSubmitted": {
                "title": "No credentials or secrets",
                "description": "Must be true. Input Schema v1 cannot enforce true; runtime rejects false before later effects.",
                "type": "boolean"
              },
              "unfetchedReferencePolicyAccepted": {
                "title": "Unfetched reference policy",
                "description": "Must be true. Input Schema v1 cannot enforce true; runtime rejects false before later effects.",
                "type": "boolean"
              },
              "attestedAt": {
                "title": "Attested at",
                "description": "RFC 3339 timestamp with an explicit offset, not later than the Actor run.",
                "type": "string",
                "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
              },
              "attestorId": {
                "title": "Attestor ID",
                "description": "Customer-controlled opaque operator identifier; never returned raw.",
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              }
            },
            "additionalProperties": false
          },
          "containers": {
            "title": "Containers",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "At least one and at most 1,000 closed records. Snapshot accepts customer containers; synthetic_demo accepts exactly one fixed Actor-owned Synthetic Ocean record and rejects substitutions before effects. BOL and booking values are never returned raw.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "containerNumber"
              ],
              "properties": {
                "containerNumber": {
                  "title": "Container number",
                  "description": "Uppercase ISO 6346 number with a valid check digit.",
                  "type": "string",
                  "pattern": "^[A-Z]{4}[0-9]{7}$"
                },
                "carrier": {
                  "title": "Carrier",
                  "description": "Optional customer-declared carrier label.",
                  "type": "string",
                  "nullable": true,
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/ -]{0,127}$"
                },
                "billOfLading": {
                  "title": "Bill of lading",
                  "description": "Optional private customer value; only a domain-separated digest may appear in output.",
                  "type": "string",
                  "nullable": true,
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/ -]{0,127}$"
                },
                "bookingNumber": {
                  "title": "Booking number",
                  "description": "Optional private customer value; only a domain-separated digest may appear in output.",
                  "type": "string",
                  "nullable": true,
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/ -]{0,127}$"
                },
                "promisedEta": {
                  "title": "Promised ETA",
                  "description": "Optional RFC 3339 ETA with an explicit offset; runtime validates the timestamp.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
                },
                "freeTimeEnd": {
                  "title": "Free-time end",
                  "description": "Optional RFC 3339 free-time deadline with an explicit offset; runtime validates the timestamp.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
                },
                "originUnlocode": {
                  "title": "Origin UN/LOCODE",
                  "description": "Optional five-character UN/LOCODE syntax.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[A-Z]{2}[A-Z0-9]{3}$"
                },
                "destinationUnlocode": {
                  "title": "Destination UN/LOCODE",
                  "description": "Optional five-character UN/LOCODE syntax.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[A-Z]{2}[A-Z0-9]{3}$"
                }
              }
            }
          },
          "events": {
            "title": "Container events",
            "minItems": 1,
            "maxItems": 50000,
            "type": "array",
            "description": "At least one and at most 50,000 events. Snapshot accepts customer events; synthetic_demo accepts exactly the two fixed Actor-owned events in the public fixture and rejects substitutions or extra rows before effects. Safe references are validated but never fetched.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "eventId",
                "containerNumber",
                "eventType",
                "eventTime",
                "receivedAt",
                "source"
              ],
              "properties": {
                "eventId": {
                  "title": "Event ID",
                  "description": "Customer event identifier unique within the container timeline.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
                },
                "containerNumber": {
                  "title": "Container number",
                  "description": "Must match one container record in this input.",
                  "type": "string",
                  "pattern": "^[A-Z]{4}[0-9]{7}$"
                },
                "eventType": {
                  "title": "Event type",
                  "description": "Closed container milestone or customer event type.",
                  "type": "string",
                  "enum": [
                    "booked",
                    "received_at_terminal",
                    "gate_in",
                    "loaded",
                    "transshipment",
                    "discharged",
                    "available_for_pickup",
                    "gate_out",
                    "picked_up",
                    "empty_returned",
                    "delivered",
                    "eta_update",
                    "customer_milestone"
                  ]
                },
                "eventTime": {
                  "title": "Event time",
                  "description": "RFC 3339 event timestamp with an explicit offset; runtime validates the timestamp.",
                  "type": "string",
                  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
                },
                "receivedAt": {
                  "title": "Received at",
                  "description": "RFC 3339 receipt timestamp, not earlier than eventTime; runtime validates the timestamp.",
                  "type": "string",
                  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
                },
                "locationUnlocode": {
                  "title": "Location UN/LOCODE",
                  "description": "Optional observed location syntax.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[A-Z]{2}[A-Z0-9]{3}$"
                },
                "plannedLocationUnlocode": {
                  "title": "Planned location UN/LOCODE",
                  "description": "Optional planned location syntax.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^[A-Z]{2}[A-Z0-9]{3}$"
                },
                "plannedTime": {
                  "title": "Planned time",
                  "description": "Optional RFC 3339 planned time; only eta_update may use a non-null value and runtime validates it.",
                  "type": "string",
                  "nullable": true,
                  "pattern": "^(?:\\d{4}-\\d{2}-\\d{2})T(?:\\d{2}:\\d{2}:\\d{2})(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$"
                },
                "source": {
                  "title": "Source label",
                  "description": "Customer-declared provenance label, not a provider URL or credential.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._: -]{0,127}$"
                },
                "reference": {
                  "title": "Safe reference",
                  "description": "Optional ref: identifier or restricted HTTPS reference. It is never fetched.",
                  "type": "string",
                  "nullable": true,
                  "minLength": 1,
                  "maxLength": 256
                }
              }
            }
          },
          "tariffAssumptions": {
            "title": "Tariff assumptions",
            "required": [
              "currency",
              "demurragePerDay",
              "detentionPerDay"
            ],
            "type": "object",
            "description": "Customer-supplied USD/day assumptions. No terminal calendar or carrier tariff is fetched.",
            "properties": {
              "currency": {
                "title": "Currency",
                "description": "V1 accepts USD only.",
                "type": "string",
                "enum": [
                  "USD"
                ]
              },
              "demurragePerDay": {
                "title": "Demurrage per day",
                "description": "Customer assumption in USD/day, up to four decimal places at runtime.",
                "type": "number",
                "minimum": 0,
                "maximum": 1000000
              },
              "detentionPerDay": {
                "title": "Detention per day",
                "description": "Customer assumption in USD/day, up to four decimal places at runtime.",
                "type": "number",
                "minimum": 0,
                "maximum": 1000000
              }
            },
            "additionalProperties": false
          },
          "continuationState": {
            "title": "Caller-carried continuation state",
            "type": "object",
            "description": "Optional exact nextContinuationState from a previous successful complete run. The Actor does not store this state in a named KVS; pass it back to compare the next customer snapshot."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}