{
  "consumes": [
    "application/json"
  ],
  "definitions": {
    "DocumentMediaType": {
      "type": "string",
      "enum": [
        "MEDIA_TYPE_UNSPECIFIED",
        "MEDIA_TYPE_PDF",
        "MEDIA_TYPE_DOCX",
        "MEDIA_TYPE_XLSX",
        "MEDIA_TYPE_TXT",
        "MEDIA_TYPE_PNG",
        "MEDIA_TYPE_JPG",
        "MEDIA_TYPE_GIF"
      ],
      "default": "MEDIA_TYPE_UNSPECIFIED",
      "description": "MediaType is the IANA media type of a document's file.\n\n - MEDIA_TYPE_UNSPECIFIED: application/octet-stream\n - MEDIA_TYPE_PDF: application/pdf\n - MEDIA_TYPE_DOCX: application/vnd.openxmlformats-officedocument.wordprocessingml.document\n - MEDIA_TYPE_XLSX: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\n - MEDIA_TYPE_TXT: text/plain\n - MEDIA_TYPE_PNG: image/png\n - MEDIA_TYPE_JPG: image/jpeg\n - MEDIA_TYPE_GIF: image/gif"
    },
    "VatTypeCategory": {
      "type": "string",
      "enum": [
        "CATEGORY_UNSPECIFIED",
        "CATEGORY_ZERO",
        "CATEGORY_REDUCED",
        "CATEGORY_STANDARD",
        "CATEGORY_REVERSE_CHARGED"
      ],
      "default": "CATEGORY_UNSPECIFIED"
    },
    "apiHttpBody": {
      "type": "object",
      "properties": {
        "content_type": {
          "type": "string",
          "description": "The HTTP Content-Type header value specifying the content type of the body."
        },
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The HTTP request/response body as raw binary."
        },
        "extensions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          },
          "description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs."
        }
      },
      "description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n    message GetResourceRequest {\n      // A unique request id.\n      string request_id = 1;\n\n      // The raw HTTP body is bound to this field.\n      google.api.HttpBody http_body = 2;\n\n    }\n\n    service ResourceService {\n      rpc GetResource(GetResourceRequest)\n        returns (google.api.HttpBody);\n      rpc UpdateResource(google.api.HttpBody)\n        returns (google.protobuf.Empty);\n\n    }\n\nExample with streaming methods:\n\n    service CaldavService {\n      rpc GetCalendar(stream google.api.HttpBody)\n        returns (stream google.api.HttpBody);\n      rpc UpdateCalendar(stream google.api.HttpBody)\n        returns (stream google.api.HttpBody);\n\n    }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
    },
    "apiV1Money": {
      "type": "object",
      "example": {
        "currency": "EUR",
        "amount_cents": 150000
      },
      "properties": {
        "currency": {
          "type": "string",
          "example": "EUR",
          "description": "ISO 4217 alphabetic currency code."
        },
        "amount_cents": {
          "type": "integer",
          "format": "int32",
          "example": 150000,
          "description": "The amount in the currency's minor unit. Negative for credits."
        }
      },
      "description": "An amount in a currency's minor units, e.g. 150000 EUR cents is €1,500.00.",
      "title": "Money"
    },
    "cargoplotCargoType": {
      "type": "string",
      "enum": [
        "CARGO_TYPE_UNSPECIFIED",
        "CARGO_TYPE_PACKAGES",
        "CARGO_TYPE_PALLETS",
        "CARGO_TYPE_CONTAINERS"
      ],
      "default": "CARGO_TYPE_UNSPECIFIED"
    },
    "cargoplotContainerType": {
      "type": "string",
      "enum": [
        "CONTAINER_TYPE_UNSPECIFIED",
        "CONTAINER_TYPE_20_STANDARD_DRY",
        "CONTAINER_TYPE_40_STANDARD_DRY",
        "CONTAINER_TYPE_40_HIGH_CUBE",
        "CONTAINER_TYPE_45_HIGH_CUBE",
        "CONTAINER_TYPE_20_REEFER",
        "CONTAINER_TYPE_40_REEFER",
        "CONTAINER_TYPE_20_OPEN_TOP",
        "CONTAINER_TYPE_40_OPEN_TOP",
        "CONTAINER_TYPE_20_FLAT_RACK",
        "CONTAINER_TYPE_40_FLAT_RACK",
        "CONTAINER_TYPE_40_OPEN_TOP_HIGH_CUBE"
      ],
      "default": "CONTAINER_TYPE_UNSPECIFIED"
    },
    "cargoplotDocumentSlotStatus": {
      "type": "string",
      "enum": [
        "STATUS_UNSPECIFIED",
        "STATUS_TO_BE_RECEIVED",
        "STATUS_RECEIVED",
        "STATUS_REJECTED",
        "STATUS_DELETED"
      ],
      "default": "STATUS_UNSPECIFIED"
    },
    "cargoplotDocumentType": {
      "type": "string",
      "enum": [
        "TYPE_UNSPECIFIED",
        "TYPE_COMMERCIAL_INVOICE",
        "TYPE_PACKING_LIST",
        "TYPE_MASTER_BILL_OF_LADING",
        "TYPE_COC_EXCERPT",
        "TYPE_DIRECT_REPRESENTATION",
        "TYPE_OTHER",
        "TYPE_UTB",
        "TYPE_TTW",
        "TYPE_HOUSE_BILL_OF_LADING",
        "TYPE_HOUSE_AIRWAY_BILL",
        "TYPE_FISCAL_REPRESENTATION",
        "TYPE_INSURANCE_CERTIFICATE",
        "TYPE_DELIVERY_ORDER",
        "TYPE_DIRECT_FISCAL_COMBO_REPRESENTATION",
        "TYPE_MSDS",
        "TYPE_TEST_CERTIFICATE",
        "TYPE_CMR",
        "TYPE_ATB",
        "TYPE_MASTER_AIRWAY_BILL"
      ],
      "default": "TYPE_UNSPECIFIED"
    },
    "cargoplotIncoterm": {
      "type": "string",
      "enum": [
        "INCOTERM_UNSPECIFIED",
        "INCOTERM_EXW",
        "INCOTERM_FCA",
        "INCOTERM_CPT",
        "INCOTERM_CIP",
        "INCOTERM_DPU",
        "INCOTERM_DAP",
        "INCOTERM_DDP",
        "INCOTERM_FAS",
        "INCOTERM_FOB",
        "INCOTERM_CFR",
        "INCOTERM_CIF"
      ],
      "default": "INCOTERM_UNSPECIFIED"
    },
    "cargoplotSpecialContents": {
      "type": "string",
      "enum": [
        "SPECIAL_CONTENTS_UNSPECIFIED",
        "SPECIAL_CONTENTS_BATTERIES",
        "SPECIAL_CONTENTS_LIQUIDS",
        "SPECIAL_CONTENTS_TEXTILES",
        "SPECIAL_CONTENTS_GASES"
      ],
      "default": "SPECIAL_CONTENTS_UNSPECIFIED"
    },
    "cargoplotTransportMode": {
      "type": "string",
      "enum": [
        "TRANSPORT_MODE_UNSPECIFIED",
        "TRANSPORT_MODE_SEA",
        "TRANSPORT_MODE_AIR",
        "TRANSPORT_MODE_RAIL",
        "TRANSPORT_MODE_ROAD",
        "TRANSPORT_MODE_EXPRESS",
        "TRANSPORT_MODE_BARGE"
      ],
      "default": "TRANSPORT_MODE_UNSPECIFIED"
    },
    "googleRpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string",
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
        }
      },
      "additionalProperties": {},
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(\u0026foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n    // or ...\n    if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n      foo = any.unpack(Foo.getDefaultInstance());\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := \u0026pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := \u0026pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    },
    "typePostalAddress": {
      "type": "object",
      "properties": {
        "revision": {
          "type": "integer",
          "format": "int32",
          "description": "The schema revision of the `PostalAddress`. This must be set to 0, which is\nthe latest revision.\n\nAll new revisions **must** be backward compatible with old revisions."
        },
        "region_code": {
          "type": "string",
          "description": "Required. CLDR region code of the country/region of the address. This\nis never inferred and it is up to the user to ensure the value is\ncorrect. See https://cldr.unicode.org/ and\nhttps://www.unicode.org/cldr/charts/30/supplemental/territory_information.html\nfor details. Example: \"CH\" for Switzerland."
        },
        "language_code": {
          "type": "string",
          "description": "Optional. BCP-47 language code of the contents of this address (if\nknown). This is often the UI language of the input form or is expected\nto match one of the languages used in the address' country/region, or their\ntransliterated equivalents.\nThis can affect formatting in certain countries, but is not critical\nto the correctness of the data and will never affect any validation or\nother non-formatting related operations.\n\nIf this value is not known, it should be omitted (rather than specifying a\npossibly incorrect default).\n\nExamples: \"zh-Hant\", \"ja\", \"ja-Latn\", \"en\"."
        },
        "postal_code": {
          "type": "string",
          "description": "Optional. Postal code of the address. Not all countries use or require\npostal codes to be present, but where they are used, they may trigger\nadditional validation with other parts of the address (for example,\nstate or zip code validation in the United States)."
        },
        "sorting_code": {
          "type": "string",
          "description": "Optional. Additional, country-specific, sorting code. This is not used\nin most regions. Where it is used, the value is either a string like\n\"CEDEX\", optionally followed by a number (for example, \"CEDEX 7\"), or just\na number alone, representing the \"sector code\" (Jamaica), \"delivery area\nindicator\" (Malawi) or \"post office indicator\" (Côte d'Ivoire)."
        },
        "administrative_area": {
          "type": "string",
          "description": "Optional. Highest administrative subdivision which is used for postal\naddresses of a country or region.\nFor example, this can be a state, a province, an oblast, or a prefecture.\nFor Spain, this is the province and not the autonomous\ncommunity (for example, \"Barcelona\" and not \"Catalonia\").\nMany countries don't use an administrative area in postal addresses. For\nexample, in Switzerland, this should be left unpopulated."
        },
        "locality": {
          "type": "string",
          "description": "Optional. Generally refers to the city or town portion of the address.\nExamples: US city, IT comune, UK post town.\nIn regions of the world where localities are not well defined or do not fit\ninto this structure well, leave `locality` empty and use `address_lines`."
        },
        "sublocality": {
          "type": "string",
          "description": "Optional. Sublocality of the address.\nFor example, this can be a neighborhood, borough, or district."
        },
        "address_lines": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Unstructured address lines describing the lower levels of an address.\n\nBecause values in `address_lines` do not have type information and may\nsometimes contain multiple values in a single field (for example,\n\"Austin, TX\"), it is important that the line order is clear. The order of\naddress lines should be \"envelope order\" for the country or region of the\naddress. In places where this can vary (for example, Japan),\n`address_language` is used to make it explicit (for example, \"ja\" for\nlarge-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). In this\nway, the most specific line of an address can be selected based on the\nlanguage.\n\nThe minimum permitted structural representation of an address consists\nof a `region_code` with all remaining information placed in the\n`address_lines`. It would be possible to format such an address very\napproximately without geocoding, but no semantic reasoning could be\nmade about any of the address components until it was at least\npartially resolved.\n\nCreating an address only containing a `region_code` and `address_lines` and\nthen geocoding is the recommended way to handle completely unstructured\naddresses (as opposed to guessing which parts of the address should be\nlocalities or administrative areas)."
        },
        "recipients": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Optional. The recipient at the address.\nThis field may, under certain circumstances, contain multiline information.\nFor example, it might contain \"care of\" information."
        },
        "organization": {
          "type": "string",
          "description": "Optional. The name of the organization at the address."
        }
      },
      "description": "Represents a postal address, such as for postal delivery or payments\naddresses. With a postal address, a postal service can deliver items to a\npremise, P.O. box, or similar. A postal address is not intended to model\ngeographical locations like roads, towns, or mountains.\n\nIn typical usage, an address would be created by user input or from importing\nexisting data, depending on the type of process.\n\nAdvice on address input or editing:\n\n - Use an internationalization-ready address widget such as\n https://github.com/google/libaddressinput.\n - Users should not be presented with UI elements for input or editing of\n fields outside countries where that field is used.\n\nFor more guidance on how to use this schema, see:\nhttps://support.google.com/business/answer/6397478."
    },
    "v1AirTracking": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/definitions/v1AirTrackingStatus"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1AirTrackingEvent"
          }
        }
      },
      "description": "AirTracking is the air-freight timeline. Air cargo has no container to hang\nmilestones on, so they sit at the shipment level, and the overall status is\nstated rather than derived from the events the way a container's is."
    },
    "v1AirTrackingEvent": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/v1AirTrackingEventType"
        },
        "state": {
          "$ref": "#/definitions/v1TrackingEventState"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "location": {
          "$ref": "#/definitions/v1AirTrackingLocation"
        },
        "flight": {
          "$ref": "#/definitions/v1TrackingFlight"
        },
        "cargo": {
          "$ref": "#/definitions/v1TrackingCargo"
        }
      }
    },
    "v1AirTrackingEventType": {
      "type": "string",
      "enum": [
        "AIR_TRACKING_EVENT_TYPE_UNSPECIFIED",
        "AIR_TRACKING_EVENT_TYPE_RECEIVED_FROM_SHIPPER",
        "AIR_TRACKING_EVENT_TYPE_MANIFESTED",
        "AIR_TRACKING_EVENT_TYPE_DEPARTED",
        "AIR_TRACKING_EVENT_TYPE_ARRIVED",
        "AIR_TRACKING_EVENT_TYPE_RECEIVED_FROM_FLIGHT",
        "AIR_TRACKING_EVENT_TYPE_DELIVERED"
      ],
      "default": "AIR_TRACKING_EVENT_TYPE_UNSPECIFIED",
      "description": "AirTrackingEventType is the set of air milestones, numbered in the order a\nconsignment passes through them.\n\n - AIR_TRACKING_EVENT_TYPE_UNSPECIFIED: No milestone reported.\n - AIR_TRACKING_EVENT_TYPE_RECEIVED_FROM_SHIPPER: Cargo accepted from the shipper or their agent.\n - AIR_TRACKING_EVENT_TYPE_MANIFESTED: Booked onto a specific flight.\n - AIR_TRACKING_EVENT_TYPE_DEPARTED: Departed an airport.\n - AIR_TRACKING_EVENT_TYPE_ARRIVED: Arrived at an airport.\n - AIR_TRACKING_EVENT_TYPE_RECEIVED_FROM_FLIGHT: Taken off the aircraft at destination.\n - AIR_TRACKING_EVENT_TYPE_DELIVERED: Delivered to the consignee."
    },
    "v1AirTrackingLocation": {
      "type": "object",
      "properties": {
        "iata": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "description": "AirTrackingLocation names an airport. It carries an IATA code rather than the\nUN/LOCODE a seaport carries, which is why the two modes have separate location\ntypes instead of one with a field meaning different things in each."
    },
    "v1AirTrackingStatus": {
      "type": "string",
      "enum": [
        "AIR_TRACKING_STATUS_UNSPECIFIED",
        "AIR_TRACKING_STATUS_AWAITING_AIRLINE_DATA",
        "AIR_TRACKING_STATUS_BOOKED",
        "AIR_TRACKING_STATUS_IN_TRANSIT",
        "AIR_TRACKING_STATUS_LANDED",
        "AIR_TRACKING_STATUS_DELIVERED",
        "AIR_TRACKING_STATUS_UNAVAILABLE"
      ],
      "default": "AIR_TRACKING_STATUS_UNSPECIFIED",
      "description": "AirTrackingStatus is an air consignment's overall state.\n\n - AIR_TRACKING_STATUS_UNSPECIFIED: Nothing to report yet.\n - AIR_TRACKING_STATUS_AWAITING_AIRLINE_DATA: No airline movement data yet.\n - AIR_TRACKING_STATUS_BOOKED: Reserved, not yet dispatched.\n - AIR_TRACKING_STATUS_IN_TRANSIT: On its way to the destination.\n - AIR_TRACKING_STATUS_LANDED: Arrived at the destination airport.\n - AIR_TRACKING_STATUS_DELIVERED: Delivered to the consignee.\n - AIR_TRACKING_STATUS_UNAVAILABLE: No tracking information available."
    },
    "v1CargoComponent": {
      "type": "object",
      "example": {
        "width": 1.2,
        "height": 1.5,
        "depth": 0.8,
        "weight": 250.0,
        "quantity": 4
      },
      "properties": {
        "width": {
          "type": "number",
          "format": "double",
          "description": "Dimensions in metres and weight in kilograms."
        },
        "height": {
          "type": "number",
          "format": "double"
        },
        "depth": {
          "type": "number",
          "format": "double"
        },
        "weight": {
          "type": "number",
          "format": "double"
        },
        "quantity": {
          "type": "integer",
          "format": "int32",
          "description": "How many units of these dimensions."
        }
      },
      "description": "One loose unit of cargo on an LCL shipment or inquiry. Embedded in its parent, so it carries no id.",
      "title": "CargoComponent"
    },
    "v1Container": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/cargoplotContainerType"
        },
        "quantity": {
          "type": "integer",
          "format": "int32"
        },
        "dropoff_terminal_code": {
          "type": "string",
          "description": "The carrier's terminal code, not a Cargoplot location id."
        }
      },
      "description": "Container is a requested container on an inquiry: a type and a count, before\nany physical container exists. The shipment's ShippedContainer is the\ncounterpart once one does."
    },
    "v1ContainerTrackingStatus": {
      "type": "string",
      "enum": [
        "CONTAINER_TRACKING_STATUS_UNSPECIFIED",
        "CONTAINER_TRACKING_STATUS_EMPTY_TO_SHIPPER",
        "CONTAINER_TRACKING_STATUS_GATE_IN",
        "CONTAINER_TRACKING_STATUS_LOADED",
        "CONTAINER_TRACKING_STATUS_SAILING",
        "CONTAINER_TRACKING_STATUS_ARRIVED",
        "CONTAINER_TRACKING_STATUS_DISCHARGED",
        "CONTAINER_TRACKING_STATUS_GATE_OUT",
        "CONTAINER_TRACKING_STATUS_EMPTY_RETURNED"
      ],
      "default": "CONTAINER_TRACKING_STATUS_UNSPECIFIED",
      "description": "ContainerTrackingStatus is where a container has reached in its journey. It\nfollows the container's latest actual event, so an expected event does not\nmove it forward.\n\n - CONTAINER_TRACKING_STATUS_UNSPECIFIED: Nothing reported yet.\n - CONTAINER_TRACKING_STATUS_EMPTY_TO_SHIPPER: Released empty to the shipper, not yet back at the port.\n - CONTAINER_TRACKING_STATUS_GATE_IN: At the port of loading, waiting for its vessel.\n - CONTAINER_TRACKING_STATUS_LOADED: On board at the port of loading, not yet sailed.\n - CONTAINER_TRACKING_STATUS_SAILING: At sea.\n - CONTAINER_TRACKING_STATUS_ARRIVED: The vessel has arrived; the container is not yet discharged.\n - CONTAINER_TRACKING_STATUS_DISCHARGED: Lifted off the vessel, still inside the terminal.\n - CONTAINER_TRACKING_STATUS_GATE_OUT: Out of the terminal, on its way to the delivery address.\n - CONTAINER_TRACKING_STATUS_EMPTY_RETURNED: Emptied and handed back to the carrier. The journey is over."
    },
    "v1Cursor": {
      "type": "object",
      "properties": {
        "after": {
          "type": "string",
          "description": "Pass as `after` to fetch the next page. Absent if this is the last page."
        },
        "before": {
          "type": "string",
          "description": "Pass as `before` to fetch the previous page. Absent if this is the first page."
        }
      },
      "description": "Cursor carries the opaque tokens for fetching adjacent pages. A field is\nunset (absent from the JSON response) when there is no such page."
    },
    "v1DocumentDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Pass this to `GET /v1/document/{document}/download`."
        },
        "file_name": {
          "type": "string"
        },
        "media_type": {
          "$ref": "#/definitions/DocumentMediaType",
          "description": "The file's format."
        },
        "size_bytes": {
          "type": "string",
          "format": "uint64"
        },
        "uploaded_on": {
          "type": "string",
          "format": "date-time"
        },
        "expiration_date": {
          "type": "string",
          "format": "date",
          "description": "When the document stops being valid, for the types that expire."
        }
      },
      "description": "DocumentDetails is the file uploaded into a slot."
    },
    "v1FclDetails": {
      "type": "object",
      "properties": {
        "containers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1ShippedContainer"
          }
        },
        "free_demurrage_days": {
          "type": "integer",
          "format": "int64"
        },
        "free_detention_days": {
          "type": "integer",
          "format": "int64"
        },
        "free_dd_combined_days": {
          "type": "integer",
          "format": "int64"
        },
        "free_storage_days": {
          "type": "integer",
          "format": "int64"
        }
      },
      "description": "Full-container detail. Present only when cargo_type is CARGO_TYPE_CONTAINERS, and mutually exclusive with lcl. Swagger 2.0 cannot express oneOf, so the exclusion is stated here rather than in the schema.",
      "title": "FclDetails"
    },
    "v1GetShipmentTrackingResponse": {
      "type": "object",
      "properties": {
        "etd": {
          "type": "string",
          "format": "date",
          "example": "2026-09-05",
          "description": "Estimated date of departure."
        },
        "eta": {
          "type": "string",
          "format": "date",
          "description": "Estimated date of arrival."
        },
        "sea": {
          "$ref": "#/definitions/v1SeaTracking"
        },
        "air": {
          "$ref": "#/definitions/v1AirTracking"
        }
      }
    },
    "v1InquiryFclDetails": {
      "type": "object",
      "properties": {
        "containers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Container"
          }
        },
        "min_free_demurrage_days": {
          "type": "integer",
          "format": "int64"
        },
        "min_free_detention_days": {
          "type": "integer",
          "format": "int64"
        }
      },
      "description": "Full-container detail. Present only when cargo_type is CARGO_TYPE_CONTAINERS, and mutually exclusive with lcl. Swagger 2.0 cannot express oneOf, so the exclusion is stated here.",
      "title": "InquiryFclDetails"
    },
    "v1InquiryFilter": {
      "type": "object",
      "properties": {
        "status": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1InquiryResponseStatus"
          },
          "description": "Match inquiries in any of these states."
        },
        "cargo_ready_date": {
          "type": "string",
          "example": "gte:2026-07-01",
          "description": "Filter on the cargo ready date. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`."
        }
      },
      "description": "InquiryFilter narrows an inquiry listing. Every field is optional, and\nfields combine with AND. Addressed with dot notation in the query string,\ne.g. `?filter.status=STATUS_RECEIVED`.\n\nResults are always scoped to the authenticated user's organization."
    },
    "v1InquiryLclDetails": {
      "type": "object",
      "properties": {
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1CargoComponent"
          }
        },
        "tail_lift": {
          "type": "boolean"
        },
        "pallet_exchange": {
          "type": "boolean"
        }
      },
      "description": "Groupage detail. Present only when cargo_type is CARGO_TYPE_PACKAGES or CARGO_TYPE_PALLETS, and mutually exclusive with fcl. Swagger 2.0 cannot express oneOf, so the exclusion is stated here.",
      "title": "InquiryLclDetails"
    },
    "v1InquiryOrderBy": {
      "type": "string",
      "enum": [
        "INQUIRY_ORDER_BY_UNSPECIFIED",
        "INQUIRY_ORDER_BY_REFERENCE",
        "INQUIRY_ORDER_BY_STATUS",
        "INQUIRY_ORDER_BY_CARGO_READY_DATE",
        "INQUIRY_ORDER_BY_CREATE_TIME"
      ],
      "default": "INQUIRY_ORDER_BY_UNSPECIFIED",
      "description": "InquiryOrderBy is the set of fields an inquiry listing can be sorted by.\n\n - INQUIRY_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id)."
    },
    "v1InquiryResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Unique inquiry identifier."
        },
        "create_time": {
          "type": "string",
          "format": "date-time"
        },
        "update_time": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "$ref": "#/definitions/v1InquiryResponseStatus"
        },
        "requester_user_id": {
          "type": "string",
          "format": "uint64",
          "description": "The user who submitted the inquiry. Resolve it through `GET /v1/user/{user}`. As on a shipment's client_user_id, an id on an older inquiry may answer 404 once that user has been deleted or has moved to another organization."
        },
        "organization_id": {
          "type": "string",
          "format": "uint64"
        },
        "reference": {
          "type": "string",
          "example": "C3AT-XHM0",
          "description": "Human-readable Cargoplot inquiry reference."
        },
        "description": {
          "type": "string"
        },
        "origin": {
          "$ref": "#/definitions/typePostalAddress",
          "description": "Where the cargo ships from."
        },
        "destination": {
          "$ref": "#/definitions/typePostalAddress",
          "description": "Where the cargo ships to."
        },
        "cargo_ready_date": {
          "type": "string",
          "format": "date",
          "description": "Date the cargo is ready for collection."
        },
        "cargo_type": {
          "$ref": "#/definitions/cargoplotCargoType",
          "description": "What is being shipped. Also the FCL/LCL discriminator, as on the shipment."
        },
        "transport_modes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/cargoplotTransportMode"
          },
          "description": "The transport modes the inquiry is asking across."
        },
        "special_contents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/cargoplotSpecialContents"
          },
          "description": "Contents needing special handling, if any."
        },
        "incoterms": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/cargoplotIncoterm"
          },
          "description": "The Incoterms the inquiry is asking across."
        },
        "max_transit_days": {
          "type": "integer",
          "format": "int64"
        },
        "min_review_score": {
          "type": "integer",
          "format": "int64"
        },
        "hs_code_count": {
          "type": "integer",
          "format": "int64"
        },
        "timeslot_delivery": {
          "type": "boolean"
        },
        "gas_measurement": {
          "type": "boolean"
        },
        "storage": {
          "type": "boolean"
        },
        "side_loader_delivery": {
          "type": "boolean"
        },
        "total_volume": {
          "type": "number",
          "format": "float"
        },
        "total_weight": {
          "type": "number",
          "format": "float"
        },
        "port_of_loading": {
          "type": "string",
          "description": "UN/LOCODE of the requested loading port, if the inquiry names one."
        },
        "port_of_discharge": {
          "type": "string"
        },
        "insured_goods_value": {
          "$ref": "#/definitions/apiV1Money"
        },
        "carriers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Carriers the inquiry is restricted to, if any."
        },
        "suppliers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Supplier"
          }
        },
        "fcl": {
          "$ref": "#/definitions/v1InquiryFclDetails",
          "description": "Full-container detail. Present only when cargo_type is CARGO_TYPE_CONTAINERS. Exactly one of fcl or lcl is ever present, and never both."
        },
        "lcl": {
          "$ref": "#/definitions/v1InquiryLclDetails",
          "description": "Groupage detail. Present only when cargo_type is CARGO_TYPE_PACKAGES or CARGO_TYPE_PALLETS. Exactly one of fcl or lcl is ever present, and never both."
        }
      },
      "description": "The public view of an inquiry. Fields may be added in future releases; the name and type of a field already published will not change.",
      "title": "InquiryResponse"
    },
    "v1InquiryResponseStatus": {
      "type": "string",
      "enum": [
        "STATUS_UNSPECIFIED",
        "STATUS_RECEIVED",
        "STATUS_PRICES_REQUESTED",
        "STATUS_QUOTES_PROPOSED",
        "STATUS_QUOTE_ACCEPTED",
        "STATUS_CANCELLED"
      ],
      "default": "STATUS_UNSPECIFIED",
      "description": "Status is the stage an inquiry has reached.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_RECEIVED: Submitted, and waiting to be priced.\n - STATUS_PRICES_REQUESTED: Rates are being gathered for it.\n - STATUS_QUOTES_PROPOSED: One or more quotes are ready to review.\n - STATUS_QUOTE_ACCEPTED: A quote was accepted. The shipment follows from here.\n - STATUS_CANCELLED: Withdrawn. No quote will follow."
    },
    "v1InvoiceFilter": {
      "type": "object",
      "properties": {
        "status": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1InvoiceResponseStatus"
          },
          "description": "Match invoices in any of these states."
        },
        "issue_date": {
          "type": "string",
          "example": "gte:2026-07-01",
          "description": "Filter on the issue date. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`."
        },
        "due_date": {
          "type": "string",
          "description": "Filter on the due date. Same formats as issue_date."
        }
      },
      "description": "InvoiceFilter narrows an invoice listing. Every field is optional, and fields\ncombine with AND.\n\nAddressed with dot notation in the query string, e.g.\n`?filter.status=STATUS_PAID\u0026filter.due_date=lte:2026-07-31`.\n\nResults are always scoped to the authenticated user's organization."
    },
    "v1InvoiceLineItem": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "quantity": {
          "type": "number",
          "format": "float"
        },
        "unit": {
          "type": "string",
          "example": "container",
          "description": "What the quantity counts, when the charge is not a flat fee."
        },
        "unit_price": {
          "$ref": "#/definitions/apiV1Money",
          "description": "Price per unit, excluding VAT."
        },
        "price_ex_vat": {
          "$ref": "#/definitions/apiV1Money",
          "description": "Line total excluding VAT."
        },
        "vat_category": {
          "$ref": "#/definitions/VatTypeCategory"
        },
        "vat_rate": {
          "type": "number",
          "format": "float",
          "description": "The VAT percentage applied to this line."
        }
      },
      "description": "InvoiceLineItem is one charge on an invoice."
    },
    "v1InvoiceOrderBy": {
      "type": "string",
      "enum": [
        "INVOICE_ORDER_BY_UNSPECIFIED",
        "INVOICE_ORDER_BY_REFERENCE",
        "INVOICE_ORDER_BY_STATUS",
        "INVOICE_ORDER_BY_ISSUE_DATE",
        "INVOICE_ORDER_BY_DUE_DATE",
        "INVOICE_ORDER_BY_PUBLISHED_AT",
        "INVOICE_ORDER_BY_AMOUNT_EX_VAT",
        "INVOICE_ORDER_BY_AMOUNT_INC_VAT",
        "INVOICE_ORDER_BY_CREATE_TIME"
      ],
      "default": "INVOICE_ORDER_BY_UNSPECIFIED",
      "description": "InvoiceOrderBy is the set of fields an invoice listing can be sorted by.\n\n - INVOICE_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id)."
    },
    "v1InvoiceResponse": {
      "type": "object",
      "example": {
        "id": "7",
        "reference": "F2401-C2AE-XEE1",
        "shipment_id": "12",
        "status": "STATUS_PUBLISHED",
        "issue_date": "2026-07-01",
        "due_date": "2026-07-31"
      },
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Unique invoice identifier."
        },
        "reference": {
          "type": "string",
          "example": "F2401-C2AE-XEE1",
          "description": "Human-readable invoice reference."
        },
        "shipment_id": {
          "type": "string",
          "format": "uint64",
          "description": "The shipment this invoice was raised for. Resolve it through `GET /v1/shipment/{shipment}`."
        },
        "status": {
          "$ref": "#/definitions/v1InvoiceResponseStatus"
        },
        "issue_date": {
          "type": "string",
          "format": "date",
          "example": "2026-07-01",
          "description": "The date the invoice was issued."
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The date payment falls due."
        },
        "total_ex_vat": {
          "$ref": "#/definitions/apiV1Money",
          "description": "Invoice total excluding VAT."
        },
        "total_inc_vat": {
          "$ref": "#/definitions/apiV1Money",
          "description": "Invoice total including VAT."
        },
        "open_amount": {
          "$ref": "#/definitions/apiV1Money",
          "description": "What is still outstanding. Zero once the invoice is settled."
        },
        "agent_fee": {
          "$ref": "#/definitions/apiV1Money",
          "description": "The Cargoplot fee charged on this invoice."
        },
        "vat": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1VatBreakdown"
          },
          "description": "VAT totalled per rate, since one invoice can mix them."
        },
        "line_items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1InvoiceLineItem"
          }
        },
        "published_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the invoice was issued to the client."
        },
        "create_time": {
          "type": "string",
          "format": "date-time"
        },
        "update_time": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "A simplified public view of an invoice.",
      "title": "InvoiceResponse"
    },
    "v1InvoiceResponseStatus": {
      "type": "string",
      "enum": [
        "STATUS_UNSPECIFIED",
        "STATUS_PUBLISHED",
        "STATUS_PAID",
        "STATUS_DISPUTED",
        "STATUS_IN_COLLECTION",
        "STATUS_IN_PAYMENT_PLAN",
        "STATUS_FORFEITED"
      ],
      "default": "STATUS_UNSPECIFIED",
      "description": "Status is the stage an invoice has reached.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_PUBLISHED: Issued to you and payable.\n - STATUS_PAID: Settled in full.\n - STATUS_DISPUTED: Queried. The amount is under discussion.\n - STATUS_IN_COLLECTION: Overdue, and handed to a collection agency.\n - STATUS_IN_PAYMENT_PLAN: Being settled in agreed instalments.\n - STATUS_FORFEITED: Written off. No further settlement is expected."
    },
    "v1LclDetails": {
      "type": "object",
      "properties": {
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1CargoComponent"
          }
        },
        "container_number": {
          "type": "string",
          "description": "The groupage container the cargo travels in. On an FCL shipment container\nnumbers are per-container inside FclDetails.containers instead."
        },
        "deconsolidation": {
          "type": "string",
          "description": "When the groupage container is unpacked. ISO 8601 date."
        },
        "delivery_from": {
          "type": "string",
          "description": "Start of the delivery window. ISO 8601 date-time."
        },
        "delivery_to": {
          "type": "string",
          "description": "End of the delivery window. ISO 8601 date-time."
        },
        "tail_lift": {
          "type": "boolean",
          "description": "Whether the delivery requires a tail lift."
        },
        "pallet_exchange": {
          "type": "boolean"
        }
      },
      "description": "Groupage detail. Present only when cargo_type is CARGO_TYPE_PACKAGES or CARGO_TYPE_PALLETS, and mutually exclusive with fcl. Swagger 2.0 cannot express oneOf, so the exclusion is stated here rather than in the schema.",
      "title": "LclDetails"
    },
    "v1ListInquiriesResponse": {
      "type": "object",
      "properties": {
        "inquiries": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1InquiryResponse"
          }
        },
        "cursor": {
          "$ref": "#/definitions/v1Cursor"
        }
      },
      "description": "ListInquiriesResponse is a single page returned by ListInquiries."
    },
    "v1ListInvoicesResponse": {
      "type": "object",
      "properties": {
        "invoices": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1InvoiceResponse"
          }
        },
        "cursor": {
          "$ref": "#/definitions/v1Cursor"
        }
      },
      "description": "ListInvoicesResponse is a single page returned by ListInvoices or\nListShipmentInvoices."
    },
    "v1ListShipmentDocumentsResponse": {
      "type": "object",
      "properties": {
        "documents": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1ShipmentDocumentResponse"
          }
        }
      },
      "description": "ListShipmentDocumentsResponse is the whole checklist for one shipment.\n\nDeliberately not cursor-paginated, unlike the other list endpoints: a\nshipment's slots are a small bounded set, and anyone asking \"what is still\noutstanding\" needs all of them at once rather than a page."
    },
    "v1ListShipmentsResponse": {
      "type": "object",
      "properties": {
        "shipments": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1ShipmentResponse"
          }
        },
        "cursor": {
          "$ref": "#/definitions/v1Cursor"
        }
      },
      "description": "ListShipmentsResponse is a single page returned by ListShipments."
    },
    "v1Order": {
      "type": "string",
      "enum": [
        "ORDER_UNSPECIFIED",
        "ORDER_ASC",
        "ORDER_DESC"
      ],
      "default": "ORDER_UNSPECIFIED",
      "description": "Order is the direction a list is sorted in."
    },
    "v1OrganizationResponse": {
      "type": "object",
      "example": {
        "id": "42",
        "name": "Coffee Importers B.V.",
        "vat": "NL001234567B01",
        "eori": "NL001234567",
        "coc": "12345678",
        "website": "https://example.com",
        "contact_email": "info@example.com"
      },
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Unique organization identifier. This is the value every shipment, inquiry and user carries as organization_id."
        },
        "create_time": {
          "type": "string",
          "format": "date-time"
        },
        "update_time": {
          "type": "string",
          "format": "date-time"
        },
        "name": {
          "type": "string",
          "description": "Registered company name."
        },
        "type": {
          "$ref": "#/definitions/v1OrganizationResponseType",
          "description": "What kind of party the organization is. TYPE_CLIENT ships cargo; TYPE_FORWARDER moves it."
        },
        "logo_uri": {
          "type": "string",
          "description": "Publicly reachable URL of the organization's logo, if one was uploaded."
        },
        "postal_address": {
          "$ref": "#/definitions/typePostalAddress",
          "description": "The organization's registered address. region_code is populated only when the stored country is a genuine CLDR region code, and is an empty string otherwise rather than carrying a country name, which would fail validation as a country code."
        },
        "vat": {
          "type": "string",
          "example": "NL001234567B01",
          "description": "VAT identification number."
        },
        "eori": {
          "type": "string",
          "description": "EORI number, used for customs declarations."
        },
        "coc": {
          "type": "string",
          "description": "Chamber of Commerce registration number."
        },
        "website": {
          "type": "string"
        },
        "contact_email": {
          "type": "string",
          "description": "General contact address for the organization."
        },
        "billing_email": {
          "type": "string",
          "description": "Address invoices are sent to."
        },
        "phone": {
          "type": "string",
          "description": "Contact phone number as entered, in no guaranteed format."
        }
      },
      "description": "The public view of an organization, carrying its identity and trade registration details.",
      "title": "OrganizationResponse"
    },
    "v1OrganizationResponseType": {
      "type": "string",
      "enum": [
        "TYPE_UNSPECIFIED",
        "TYPE_CLIENT",
        "TYPE_FORWARDER",
        "TYPE_SUPPLIER"
      ],
      "default": "TYPE_UNSPECIFIED",
      "description": "Type is the kind of party an organization is. TYPE_CLIENT ships cargo;\nTYPE_FORWARDER moves it."
    },
    "v1PreferredSailing": {
      "type": "object",
      "properties": {
        "order": {
          "type": "integer",
          "format": "int64"
        },
        "sailing": {
          "$ref": "#/definitions/v1PreferredSailingDetails"
        }
      },
      "description": "PreferredSailing is one ranked sailing preference recorded on the shipment."
    },
    "v1PreferredSailingDetails": {
      "type": "object",
      "properties": {
        "carrier_scac": {
          "type": "string"
        },
        "carrier_name": {
          "type": "string"
        },
        "vessel": {
          "type": "string"
        },
        "etd": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "v1SeaTracking": {
      "type": "object",
      "properties": {
        "containers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1TrackingContainer"
          }
        }
      },
      "description": "SeaTracking is the sea-freight timeline: one entry per container recorded on\nthe shipment."
    },
    "v1SeaTrackingEvent": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/v1SeaTrackingEventType"
        },
        "state": {
          "$ref": "#/definitions/v1TrackingEventState"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time"
        },
        "location": {
          "$ref": "#/definitions/v1SeaTrackingLocation"
        },
        "vessel": {
          "$ref": "#/definitions/v1TrackingVessel"
        }
      }
    },
    "v1SeaTrackingEventType": {
      "type": "string",
      "enum": [
        "SEA_TRACKING_EVENT_TYPE_UNSPECIFIED",
        "SEA_TRACKING_EVENT_TYPE_EMPTY_TO_SHIPPER",
        "SEA_TRACKING_EVENT_TYPE_GATE_IN",
        "SEA_TRACKING_EVENT_TYPE_LOADED",
        "SEA_TRACKING_EVENT_TYPE_DEPARTED",
        "SEA_TRACKING_EVENT_TYPE_ARRIVED",
        "SEA_TRACKING_EVENT_TYPE_DISCHARGED",
        "SEA_TRACKING_EVENT_TYPE_GATE_OUT",
        "SEA_TRACKING_EVENT_TYPE_EMPTY_RETURNED"
      ],
      "default": "SEA_TRACKING_EVENT_TYPE_UNSPECIFIED",
      "description": "SeaTrackingEventType is the set of sea milestones, numbered in the order a\ncontainer passes through them.\n\n - SEA_TRACKING_EVENT_TYPE_UNSPECIFIED: No milestone reported.\n - SEA_TRACKING_EVENT_TYPE_EMPTY_TO_SHIPPER: The empty container was released to the shipper for loading.\n - SEA_TRACKING_EVENT_TYPE_GATE_IN: The loaded container entered the port terminal.\n - SEA_TRACKING_EVENT_TYPE_LOADED: The container was loaded onto the vessel.\n - SEA_TRACKING_EVENT_TYPE_DEPARTED: The vessel sailed from the port.\n - SEA_TRACKING_EVENT_TYPE_ARRIVED: The vessel arrived at the port.\n - SEA_TRACKING_EVENT_TYPE_DISCHARGED: The container was lifted off the vessel.\n - SEA_TRACKING_EVENT_TYPE_GATE_OUT: The container left the port terminal for delivery.\n - SEA_TRACKING_EVENT_TYPE_EMPTY_RETURNED: The emptied container was handed back to the carrier."
    },
    "v1SeaTrackingLocation": {
      "type": "object",
      "properties": {
        "un_locode": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "v1ShipmentDocumentResponse": {
      "type": "object",
      "example": {
        "id": "3",
        "type": "TYPE_COMMERCIAL_INVOICE",
        "status": "STATUS_RECEIVED",
        "document": {
          "id": "42",
          "file_name": "invoice.pdf"
        }
      },
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "The slot's identifier. Not the document's -- pass `document.id` to the download."
        },
        "type": {
          "$ref": "#/definitions/cargoplotDocumentType",
          "description": "What kind of document this slot expects."
        },
        "status": {
          "$ref": "#/definitions/cargoplotDocumentSlotStatus",
          "description": "Where the slot stands: still awaited, received, rejected."
        },
        "label": {
          "type": "string",
          "description": "A human-readable name, when the slot was given one."
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "When the document is expected."
        },
        "provided_on": {
          "type": "string",
          "format": "date-time",
          "description": "When the file was supplied."
        },
        "rejection_reason": {
          "type": "string",
          "description": "Why a supplied document was rejected, when it was. Written to say what to correct."
        },
        "document": {
          "$ref": "#/definitions/v1DocumentDetails",
          "description": "The uploaded file. Null while the slot is still outstanding."
        }
      },
      "description": "A document slot on a shipment, carrying the uploaded file when one exists.",
      "title": "ShipmentDocumentResponse"
    },
    "v1ShipmentFilter": {
      "type": "object",
      "properties": {
        "status": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1ShipmentResponseStatus"
          },
          "description": "Match shipments in any of these states."
        },
        "etd": {
          "type": "string",
          "example": "gte:2026-07-01",
          "description": "Filter on estimated departure. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`."
        },
        "eta": {
          "type": "string",
          "description": "Filter on estimated arrival. Same formats as etd."
        }
      },
      "description": "ShipmentFilter narrows a shipment listing. Every field is optional, and\nfields combine with AND.\n\nAddressed with dot notation in the query string, e.g.\n`?filter.status=STATUS_ACTIVE\u0026filter.etd=gte:2026-07-01`.\n\nResults are always scoped to the authenticated user's organization."
    },
    "v1ShipmentOrderBy": {
      "type": "string",
      "enum": [
        "SHIPMENT_ORDER_BY_UNSPECIFIED",
        "SHIPMENT_ORDER_BY_REFERENCE",
        "SHIPMENT_ORDER_BY_STATUS",
        "SHIPMENT_ORDER_BY_ETD",
        "SHIPMENT_ORDER_BY_ETA",
        "SHIPMENT_ORDER_BY_CARGO_READY_DATE",
        "SHIPMENT_ORDER_BY_CREATE_TIME"
      ],
      "default": "SHIPMENT_ORDER_BY_UNSPECIFIED",
      "description": "ShipmentOrderBy is the set of fields a shipment listing can be sorted by.\n\n - SHIPMENT_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id)."
    },
    "v1ShipmentResponse": {
      "type": "object",
      "example": {
        "id": "7",
        "reference": "C2AE-XEE1",
        "forwarder_reference": "FWD-42",
        "description": "20 pallets of coffee",
        "status": "STATUS_ACTIVE",
        "etd": "2026-07-10",
        "cargo_ready_date": "2026-07-01"
      },
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Unique shipment identifier."
        },
        "reference": {
          "type": "string",
          "example": "C2AE-XEE1",
          "description": "Human-readable Cargoplot shipment reference."
        },
        "forwarder_reference": {
          "type": "string",
          "description": "The forwarder's own reference for the shipment."
        },
        "description": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/v1ShipmentResponseStatus"
        },
        "transport_mode": {
          "$ref": "#/definitions/cargoplotTransportMode",
          "description": "How the cargo travels. One mode per shipment; an inquiry may ask across several."
        },
        "origin": {
          "$ref": "#/definitions/typePostalAddress",
          "description": "Where the cargo ships from."
        },
        "destination": {
          "$ref": "#/definitions/typePostalAddress",
          "description": "Where the cargo ships to."
        },
        "etd": {
          "type": "string",
          "format": "date",
          "example": "2026-07-10",
          "description": "Estimated date of departure."
        },
        "eta": {
          "type": "string",
          "format": "date",
          "description": "Estimated date of arrival."
        },
        "cargo_ready_date": {
          "type": "string",
          "format": "date",
          "description": "Date the cargo is ready for collection."
        },
        "create_time": {
          "type": "string",
          "format": "date-time"
        },
        "update_time": {
          "type": "string",
          "format": "date-time"
        },
        "cargo_type": {
          "$ref": "#/definitions/cargoplotCargoType",
          "description": "What is being shipped. Also the FCL/LCL discriminator: CARGO_TYPE_CONTAINERS is FCL, CARGO_TYPE_PACKAGES and CARGO_TYPE_PALLETS are LCL."
        },
        "incoterm": {
          "$ref": "#/definitions/cargoplotIncoterm",
          "description": "The agreed Incoterm for the shipment."
        },
        "special_contents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/cargoplotSpecialContents"
          },
          "description": "Contents needing special handling, if any."
        },
        "client_user_id": {
          "type": "string",
          "format": "uint64",
          "description": "The client user this shipment belongs to. Resolve it through `GET /v1/user/{user}`. A shipment can outlive its user's membership, so an id on an older shipment may answer 404 — because the user has since been deleted, or has moved to another organization. That is expected rather than a fault, and no placeholder is returned in its place."
        },
        "organization_id": {
          "type": "string",
          "format": "uint64"
        },
        "inquiry_id": {
          "type": "string",
          "format": "uint64",
          "description": "The inquiry this shipment was born from, if any."
        },
        "port_of_loading": {
          "type": "string",
          "example": "NLRTM",
          "description": "UN/LOCODE of the loading port. Human-readable names are a UI concern and are not derived here."
        },
        "port_of_discharge": {
          "type": "string",
          "description": "UN/LOCODE of the discharge port."
        },
        "mbl_number": {
          "type": "string"
        },
        "vessel": {
          "type": "string"
        },
        "shipping_line": {
          "type": "string"
        },
        "contract_reference": {
          "type": "string"
        },
        "commodity_restriction": {
          "type": "string"
        },
        "co2_emission": {
          "type": "string"
        },
        "total_volume": {
          "type": "number",
          "format": "float",
          "description": "Total volume of the cargo. Absent when unknown, rather than 0."
        },
        "total_weight": {
          "type": "number",
          "format": "float"
        },
        "hs_codes": {
          "type": "string"
        },
        "insured_goods_value": {
          "$ref": "#/definitions/apiV1Money"
        },
        "suppliers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Supplier"
          }
        },
        "preferred_sailings": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PreferredSailing"
          }
        },
        "fcl": {
          "$ref": "#/definitions/v1FclDetails",
          "description": "Full-container detail. Present only when cargo_type is CARGO_TYPE_CONTAINERS. Exactly one of fcl or lcl is ever present, and never both."
        },
        "lcl": {
          "$ref": "#/definitions/v1LclDetails",
          "description": "Groupage detail. Present only when cargo_type is CARGO_TYPE_PACKAGES or CARGO_TYPE_PALLETS. Exactly one of fcl or lcl is ever present, and never both."
        }
      },
      "description": "A simplified public view of a shipment.",
      "title": "ShipmentResponse"
    },
    "v1ShipmentResponseStatus": {
      "type": "string",
      "enum": [
        "STATUS_UNSPECIFIED",
        "STATUS_ACTIVE",
        "STATUS_COMPLETED",
        "STATUS_CANCELLED",
        "STATUS_ON_HOLD"
      ],
      "default": "STATUS_UNSPECIFIED",
      "description": "Status is the stage a shipment has reached.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_ACTIVE: Booked and under way, or being prepared to move.\n - STATUS_COMPLETED: Delivered and closed.\n - STATUS_CANCELLED: Called off. It will not move.\n - STATUS_ON_HOLD: Paused. Still live, but not progressing."
    },
    "v1ShippedContainer": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/cargoplotContainerType"
        },
        "container_number": {
          "type": "string"
        },
        "delivery_window_hours": {
          "type": "integer",
          "format": "int32"
        },
        "notes": {
          "type": "string"
        },
        "discharge_terminal": {
          "type": "string",
          "description": "The terminal short name reported on discharge."
        },
        "trucking_operator": {
          "type": "string"
        },
        "destination": {
          "$ref": "#/definitions/typePostalAddress"
        },
        "container_dropoff_location_address": {
          "$ref": "#/definitions/typePostalAddress"
        },
        "dropoff_terminal_code": {
          "type": "string",
          "description": "The carrier's terminal code, not a Cargoplot location id."
        },
        "discharge_date": {
          "type": "string",
          "description": "ISO 8601 date."
        },
        "delivery_time": {
          "type": "string",
          "description": "ISO 8601 date-time."
        },
        "shipper_confirm_time": {
          "type": "string",
          "format": "date-time",
          "description": "When the shipper confirmed, as an RFC 3339 timestamp."
        },
        "agent_confirm_time": {
          "type": "string",
          "format": "date-time"
        },
        "gate_out_time": {
          "type": "string",
          "format": "date-time"
        },
        "empty_return_time": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "ShippedContainer is one container on an FCL shipment."
    },
    "v1Supplier": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "address": {
          "type": "string",
          "description": "The supplier's address as a single free-text line, as stored."
        }
      },
      "description": "A counterparty on a shipment or inquiry. Embedded in its parent, so it carries no id.",
      "title": "Supplier"
    },
    "v1TrackingCargo": {
      "type": "object",
      "properties": {
        "pieces": {
          "type": "integer",
          "format": "int32"
        },
        "weight_kg": {
          "type": "number",
          "format": "double"
        },
        "volume_cbm": {
          "type": "number",
          "format": "double"
        }
      },
      "description": "TrackingCargo says how much of a consignment a milestone covers, which is what\ntells the legs of a split movement apart. Each measure carries its unit in its\nown name, so a magnitude here cannot be read as the wrong quantity. A measure\nis absent rather than zero when it was not reported."
    },
    "v1TrackingContainer": {
      "type": "object",
      "properties": {
        "container_number": {
          "type": "string"
        },
        "container_type": {
          "$ref": "#/definitions/cargoplotContainerType"
        },
        "status": {
          "$ref": "#/definitions/v1ContainerTrackingStatus"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SeaTrackingEvent"
          }
        },
        "discharge_date": {
          "type": "string",
          "format": "date",
          "description": "When the container was discharged. ISO 8601 date."
        },
        "gate_out_time": {
          "type": "string",
          "format": "date-time"
        },
        "empty_return_time": {
          "type": "string",
          "format": "date-time"
        },
        "discharge_terminal": {
          "type": "string"
        }
      }
    },
    "v1TrackingEventState": {
      "type": "string",
      "enum": [
        "TRACKING_EVENT_STATE_UNSPECIFIED",
        "TRACKING_EVENT_STATE_EXPECTED",
        "TRACKING_EVENT_STATE_ACTUAL"
      ],
      "default": "TRACKING_EVENT_STATE_UNSPECIFIED",
      "description": "TrackingEventState is shared by every mode: a milestone is either observed or\nstill expected.\n\n - TRACKING_EVENT_STATE_UNSPECIFIED: Neither expected nor actual; treat it as unknown.\n - TRACKING_EVENT_STATE_EXPECTED: Planned or estimated. It has not happened yet.\n - TRACKING_EVENT_STATE_ACTUAL: Observed. It happened at the timestamp given."
    },
    "v1TrackingFlight": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "airline": {
          "type": "string"
        }
      }
    },
    "v1TrackingVessel": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "voyage": {
          "type": "string"
        }
      }
    },
    "v1UserResponse": {
      "type": "object",
      "example": {
        "id": "7",
        "first_name": "Ada",
        "last_name": "Lovelace",
        "email": "ada@example.com",
        "phone": "+31 10 123 4567",
        "language": "en",
        "organization_id": "42"
      },
      "properties": {
        "id": {
          "type": "string",
          "format": "uint64",
          "description": "Unique user identifier. This is the value a shipment's client_user_id or an inquiry's requester_user_id carries."
        },
        "create_time": {
          "type": "string",
          "format": "date-time"
        },
        "update_time": {
          "type": "string",
          "format": "date-time"
        },
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "description": "Contact email. Not necessarily the address the user signs in with."
        },
        "phone": {
          "type": "string",
          "description": "Contact phone number as entered, in no guaranteed format."
        },
        "language": {
          "type": "string",
          "example": "en",
          "description": "Preferred language as an ISO 639-1 code. Empty when the user has never chosen one."
        },
        "organization_id": {
          "type": "string",
          "format": "uint64",
          "description": "The organization this user belongs to. Always the caller's own organization, since no other is reachable."
        }
      },
      "description": "The public view of a user, scoped to the authenticated caller's organization.",
      "title": "UserResponse"
    },
    "v1VatBreakdown": {
      "type": "object",
      "properties": {
        "category": {
          "$ref": "#/definitions/VatTypeCategory",
          "description": "Which VAT treatment this amount was charged under."
        },
        "rate": {
          "type": "number",
          "format": "float",
          "example": 21,
          "description": "The percentage applied."
        },
        "amount": {
          "$ref": "#/definitions/apiV1Money"
        }
      },
      "description": "VatBreakdown is the VAT charged at one rate on an invoice."
    }
  },
  "externalDocs": {
    "description": "Glossary of the codes, abbreviations and statuses this API returns",
    "url": "https://developers.cargoplot.com/glossary"
  },
  "host": "api.cargoplot.com",
  "info": {
    "title": "Cargoplot API",
    "description": "The public Cargoplot API. Authenticate with a Personal Access Token sent in the `X-Cargoplot-Key` header.",
    "version": "1.0",
    "contact": {
      "name": "Cargoplot",
      "url": "https://cargoplot.com"
    }
  },
  "paths": {
    "/v1/document/{document}/download": {
      "get": {
        "summary": "Download a document",
        "description": "Returns the uploaded file, with the content type it was stored as.\n\nThe id is the `document.id` from `GET /v1/shipment/{shipment}/document`, not the slot id.\n\nA document is readable when it is attached to a shipment in your organization and its type is one this API serves.",
        "operationId": "DocumentService_DownloadDocument",
        "responses": {
          "200": {
            "description": "The document file.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No such document readable by the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The document could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "document",
            "description": "The document's numeric id, as carried by `document.id` in the shipment's document list.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Document"
        ],
        "produces": [
          "application/octet-stream"
        ]
      }
    },
    "/v1/inquiry": {
      "get": {
        "summary": "List inquiries",
        "description": "Returns a cursor-paginated page of inquiries for the authenticated user's organization, most-recent first. Defaults to 50 inquiries per page; 100 is the maximum. Pass the `after` (or `before`) cursor from the previous response to fetch the next (or previous) page.\n\nEach inquiry carries exactly one of `fcl` or `lcl`, never both, chosen by `cargo_type`: CARGO_TYPE_CONTAINERS is FCL, CARGO_TYPE_PACKAGES and CARGO_TYPE_PALLETS are LCL. Swagger 2.0 cannot express that exclusivity, so it is stated here.",
        "operationId": "InquiryService_ListInquiries",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListInquiriesResponse"
            }
          },
          "400": {
            "description": "A query parameter was malformed or out of range.",
            "schema": {}
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "500": {
            "description": "The inquiries could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "description": "Page size, 1 to 100. Defaults to 50 when omitted or 0. A value above 100 or below 0 is rejected with 400.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "after",
            "description": "Opaque cursor: fetch the page after this cursor (from a previous response's cursor.after). Cannot be combined with before.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "before",
            "description": "Opaque cursor: fetch the page before this cursor (from a previous response's cursor.before). Cannot be combined with after.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "description": "Sort direction. Defaults to descending.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ORDER_UNSPECIFIED",
              "ORDER_ASC",
              "ORDER_DESC"
            ],
            "default": "ORDER_UNSPECIFIED"
          },
          {
            "name": "order_by",
            "description": "Field to sort by. Defaults to newest first. The sort is part of the cursor, so it cannot change while paging through a result set.\n\n - INQUIRY_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id).",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "INQUIRY_ORDER_BY_UNSPECIFIED",
              "INQUIRY_ORDER_BY_REFERENCE",
              "INQUIRY_ORDER_BY_STATUS",
              "INQUIRY_ORDER_BY_CARGO_READY_DATE",
              "INQUIRY_ORDER_BY_CREATE_TIME"
            ],
            "default": "INQUIRY_ORDER_BY_UNSPECIFIED"
          },
          {
            "name": "search",
            "description": "Free-text search across inquiry reference, description and origin/destination city. Narrows results; does not reorder them.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.status",
            "description": "Match inquiries in any of these states.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_RECEIVED: Submitted, and waiting to be priced.\n - STATUS_PRICES_REQUESTED: Rates are being gathered for it.\n - STATUS_QUOTES_PROPOSED: One or more quotes are ready to review.\n - STATUS_QUOTE_ACCEPTED: A quote was accepted. The shipment follows from here.\n - STATUS_CANCELLED: Withdrawn. No quote will follow.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "STATUS_UNSPECIFIED",
                "STATUS_RECEIVED",
                "STATUS_PRICES_REQUESTED",
                "STATUS_QUOTES_PROPOSED",
                "STATUS_QUOTE_ACCEPTED",
                "STATUS_CANCELLED"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.cargo_ready_date",
            "description": "Filter on the cargo ready date. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Inquiry"
        ]
      }
    },
    "/v1/inquiry/{inquiry}": {
      "get": {
        "summary": "Get an inquiry",
        "description": "Returns a single inquiry from the authenticated user's organization.\n\nThe path segment accepts either the Cargoplot reference (`C3AT-XHM0`) or the numeric id (`7`). An all-digit value is tried as an id first and then as a reference, so a reference that happens to be all digits stays reachable.\n\nThe inquiry is rendered exactly as it appears in the `inquiries` array of `GET /v1/inquiry`.",
        "operationId": "InquiryService_GetInquiry",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1InquiryResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No inquiry with that reference or id in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The inquiry could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "inquiry",
            "description": "The inquiry's Cargoplot reference (`C3AT-XHM0`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Inquiry"
        ]
      }
    },
    "/v1/invoice": {
      "get": {
        "summary": "List invoices",
        "description": "Returns a cursor-paginated page of invoices for the authenticated user's organization, most-recent first. Defaults to 50 invoices per page; 100 is the maximum. Pass the `after` (or `before`) cursor from the previous response to fetch the next (or previous) page.\n\nThe page lists invoices that have been issued to your organization.",
        "operationId": "InvoiceService_ListInvoices",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListInvoicesResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "500": {
            "description": "The invoices could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "description": "Page size, 1 to 100. Defaults to 50 when omitted or 0. A value above 100 or below 0 is rejected with 400.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "after",
            "description": "Opaque cursor: fetch the page after this cursor (from a previous response's cursor.after). Cannot be combined with before.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "before",
            "description": "Opaque cursor: fetch the page before this cursor (from a previous response's cursor.before). Cannot be combined with after.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "description": "Sort direction. Defaults to descending.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ORDER_UNSPECIFIED",
              "ORDER_ASC",
              "ORDER_DESC"
            ],
            "default": "ORDER_UNSPECIFIED"
          },
          {
            "name": "order_by",
            "description": "Field to sort by. Defaults to newest first. The sort is part of the cursor, so it cannot change while paging through a result set.\n\n - INVOICE_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id).",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "INVOICE_ORDER_BY_UNSPECIFIED",
              "INVOICE_ORDER_BY_REFERENCE",
              "INVOICE_ORDER_BY_STATUS",
              "INVOICE_ORDER_BY_ISSUE_DATE",
              "INVOICE_ORDER_BY_DUE_DATE",
              "INVOICE_ORDER_BY_PUBLISHED_AT",
              "INVOICE_ORDER_BY_AMOUNT_EX_VAT",
              "INVOICE_ORDER_BY_AMOUNT_INC_VAT",
              "INVOICE_ORDER_BY_CREATE_TIME"
            ],
            "default": "INVOICE_ORDER_BY_UNSPECIFIED"
          },
          {
            "name": "search",
            "description": "Free-text search across the invoice reference. Narrows results; does not reorder them.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.status",
            "description": "Match invoices in any of these states.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_PUBLISHED: Issued to you and payable.\n - STATUS_PAID: Settled in full.\n - STATUS_DISPUTED: Queried. The amount is under discussion.\n - STATUS_IN_COLLECTION: Overdue, and handed to a collection agency.\n - STATUS_IN_PAYMENT_PLAN: Being settled in agreed instalments.\n - STATUS_FORFEITED: Written off. No further settlement is expected.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "STATUS_UNSPECIFIED",
                "STATUS_PUBLISHED",
                "STATUS_PAID",
                "STATUS_DISPUTED",
                "STATUS_IN_COLLECTION",
                "STATUS_IN_PAYMENT_PLAN",
                "STATUS_FORFEITED"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.issue_date",
            "description": "Filter on the issue date. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.due_date",
            "description": "Filter on the due date. Same formats as issue_date.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Invoice"
        ]
      }
    },
    "/v1/invoice/{invoice}": {
      "get": {
        "summary": "Get an invoice",
        "description": "Returns a single invoice from the authenticated user's organization.\n\nThe path segment accepts either the invoice reference (`F2401-C2AE-XEE1`) or the numeric id (`7`). An all-digit value is tried as an id first and then as a reference, so a reference that happens to be all digits stays reachable.\n\nThe invoice is rendered exactly as it appears in the `invoices` array of `GET /v1/invoice`.",
        "operationId": "InvoiceService_GetInvoice",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1InvoiceResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No such invoice in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The invoice could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "invoice",
            "description": "The invoice's reference (`F2401-C2AE-XEE1`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Invoice"
        ]
      }
    },
    "/v1/invoice/{invoice}/download": {
      "get": {
        "summary": "Download an invoice PDF",
        "description": "Returns the invoice document as `application/pdf`.\n\nAddressed exactly as `GET /v1/invoice/{invoice}`.",
        "operationId": "InvoiceService_DownloadInvoice",
        "responses": {
          "200": {
            "description": "The invoice PDF.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No such invoice in the authenticated user's organization, or it has no document.",
            "schema": {}
          },
          "500": {
            "description": "The invoice could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "invoice",
            "description": "The invoice's reference (`F2401-C2AE-XEE1`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Invoice"
        ],
        "produces": [
          "application/pdf"
        ]
      }
    },
    "/v1/profile/organization": {
      "get": {
        "summary": "Get the authenticated user's organization",
        "description": "Returns the organization the authenticated user currently belongs to.\n\nThe response carries the organization's own `id`, which is the value every shipment, inquiry and user reports as `organization_id`.\n\nIt covers the organization's identity and trade registration details; the full field set is below.\n\n`type` is one of `TYPE_CLIENT` (ships cargo), `TYPE_FORWARDER` (moves it), `TYPE_SUPPLIER`, or `TYPE_UNSPECIFIED` when the stored value is not one of those.\n\n`postal_address.region_code` is populated only when the stored country is a genuine CLDR region code, and is an empty string otherwise rather than carrying a country name, which would fail validation as a country code and take the whole address down with it.",
        "operationId": "OrganizationService_GetProfileOrganization",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1OrganizationResponse"
            }
          },
          "400": {
            "description": "The authenticated user belongs to no organization.",
            "schema": {}
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "The organization the user points at no longer exists, which is reachable when it has been deleted.",
            "schema": {}
          },
          "500": {
            "description": "The organization could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "tags": [
          "Organization"
        ]
      }
    },
    "/v1/profile/user": {
      "get": {
        "summary": "Get the authenticated user",
        "description": "Returns the user the request's credential authenticates as.\n\nRendered exactly as `GET /v1/user/{user}` renders the same person, so the two are interchangeable for a caller that already knows its own id.",
        "operationId": "UserService_GetProfileUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1UserResponse"
            }
          },
          "400": {
            "description": "The authenticated user belongs to no organization, so there is no scope to read within.",
            "schema": {}
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "The authenticated user's own record could not be read. Documented for completeness rather than as something to plan for.",
            "schema": {}
          },
          "500": {
            "description": "The user could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "tags": [
          "User"
        ]
      }
    },
    "/v1/shipment": {
      "get": {
        "summary": "List shipments",
        "description": "Returns a cursor-paginated page of shipments for the authenticated user's organization, most-recent first. Defaults to 50 shipments per page; 100 is the maximum. Pass the `after` (or `before`) cursor from the previous response to fetch the next (or previous) page.\n\nEach shipment carries exactly one of `fcl` or `lcl`, never both, chosen by `cargo_type`: CARGO_TYPE_CONTAINERS is FCL, CARGO_TYPE_PACKAGES and CARGO_TYPE_PALLETS are LCL. Swagger 2.0 cannot express that exclusivity, so it is stated here.",
        "operationId": "ShipmentService_ListShipments",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListShipmentsResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "500": {
            "description": "The shipments could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "description": "Page size, 1 to 100. Defaults to 50 when omitted or 0. A value above 100 or below 0 is rejected with 400.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "after",
            "description": "Opaque cursor: fetch the page after this cursor (from a previous response's cursor.after). Cannot be combined with before.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "before",
            "description": "Opaque cursor: fetch the page before this cursor (from a previous response's cursor.before). Cannot be combined with after.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "description": "Sort direction. Defaults to descending.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ORDER_UNSPECIFIED",
              "ORDER_ASC",
              "ORDER_DESC"
            ],
            "default": "ORDER_UNSPECIFIED"
          },
          {
            "name": "order_by",
            "description": "Field to sort by. Defaults to newest first. The sort is part of the cursor, so it cannot change while paging through a result set.\n\n - SHIPMENT_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id).",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "SHIPMENT_ORDER_BY_UNSPECIFIED",
              "SHIPMENT_ORDER_BY_REFERENCE",
              "SHIPMENT_ORDER_BY_STATUS",
              "SHIPMENT_ORDER_BY_ETD",
              "SHIPMENT_ORDER_BY_ETA",
              "SHIPMENT_ORDER_BY_CARGO_READY_DATE",
              "SHIPMENT_ORDER_BY_CREATE_TIME"
            ],
            "default": "SHIPMENT_ORDER_BY_UNSPECIFIED"
          },
          {
            "name": "search",
            "description": "Free-text search across shipment reference, description and origin/destination city. Narrows results; does not reorder them.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.status",
            "description": "Match shipments in any of these states.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_ACTIVE: Booked and under way, or being prepared to move.\n - STATUS_COMPLETED: Delivered and closed.\n - STATUS_CANCELLED: Called off. It will not move.\n - STATUS_ON_HOLD: Paused. Still live, but not progressing.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "STATUS_UNSPECIFIED",
                "STATUS_ACTIVE",
                "STATUS_COMPLETED",
                "STATUS_CANCELLED",
                "STATUS_ON_HOLD"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.etd",
            "description": "Filter on estimated departure. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.eta",
            "description": "Filter on estimated arrival. Same formats as etd.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Shipment"
        ]
      }
    },
    "/v1/shipment/{shipment}": {
      "get": {
        "summary": "Get a shipment",
        "description": "Returns a single shipment from the authenticated user's organization.\n\nThe path segment accepts either the Cargoplot reference (`C2AE-XEE1`) or the numeric id (`7`). An all-digit value is tried as an id first and then as a reference, so a reference that happens to be all digits stays reachable.\n\nThe shipment is rendered exactly as it appears in the `shipments` array of `GET /v1/shipment`.",
        "operationId": "ShipmentService_GetShipment",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ShipmentResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No shipment with that reference or id in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The shipment could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "shipment",
            "description": "The shipment's Cargoplot reference (`C2AE-XEE1`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Shipment"
        ]
      }
    },
    "/v1/shipment/{shipment}/document": {
      "get": {
        "summary": "List a shipment's documents",
        "description": "Returns the document checklist for one shipment: every slot, whether or not a file has been uploaded into it.\n\nA slot with no file has no `document` member; one with a file carries it. That is how you tell the two apart.\n\nThe list is not paginated. A shipment's checklist is a small, bounded set.\n\nThe path segment accepts either the Cargoplot reference (`C2AE-XEE1`) or the numeric id (`7`).\n\nThe checklist covers the document types this API serves.",
        "operationId": "DocumentService_ListShipmentDocuments",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListShipmentDocumentsResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No shipment with that reference or id in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The documents could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "shipment",
            "description": "The shipment's Cargoplot reference (`C2AE-XEE1`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Document"
        ]
      }
    },
    "/v1/shipment/{shipment}/invoice": {
      "get": {
        "summary": "List a shipment's invoices",
        "description": "Returns a cursor-paginated page of the invoices raised for one shipment. Paging, ordering and filtering behave exactly as they do on `GET /v1/invoice`.\n\nThe path segment accepts either the Cargoplot reference (`C2AE-XEE1`) or the numeric id (`7`).",
        "operationId": "InvoiceService_ListShipmentInvoices",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListInvoicesResponse"
            }
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No shipment with that reference or id in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The invoices could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "shipment",
            "description": "The shipment's Cargoplot reference (`C2AE-XEE1`) or its numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "limit",
            "description": "Page size, 1 to 100. Defaults to 50 when omitted or 0.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "after",
            "description": "Opaque cursor: fetch the page after this cursor. Cannot be combined with before.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "before",
            "description": "Opaque cursor: fetch the page before this cursor. Cannot be combined with after.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "order",
            "description": "Sort direction. Defaults to descending.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ORDER_UNSPECIFIED",
              "ORDER_ASC",
              "ORDER_DESC"
            ],
            "default": "ORDER_UNSPECIFIED"
          },
          {
            "name": "order_by",
            "description": "Field to sort by. Defaults to newest first.\n\n - INVOICE_ORDER_BY_UNSPECIFIED: Falls back to the server default (newest first, by id).",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "INVOICE_ORDER_BY_UNSPECIFIED",
              "INVOICE_ORDER_BY_REFERENCE",
              "INVOICE_ORDER_BY_STATUS",
              "INVOICE_ORDER_BY_ISSUE_DATE",
              "INVOICE_ORDER_BY_DUE_DATE",
              "INVOICE_ORDER_BY_PUBLISHED_AT",
              "INVOICE_ORDER_BY_AMOUNT_EX_VAT",
              "INVOICE_ORDER_BY_AMOUNT_INC_VAT",
              "INVOICE_ORDER_BY_CREATE_TIME"
            ],
            "default": "INVOICE_ORDER_BY_UNSPECIFIED"
          },
          {
            "name": "search",
            "description": "Free-text search across the invoice reference.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.status",
            "description": "Match invoices in any of these states.\n\n - STATUS_UNSPECIFIED: No status reported.\n - STATUS_PUBLISHED: Issued to you and payable.\n - STATUS_PAID: Settled in full.\n - STATUS_DISPUTED: Queried. The amount is under discussion.\n - STATUS_IN_COLLECTION: Overdue, and handed to a collection agency.\n - STATUS_IN_PAYMENT_PLAN: Being settled in agreed instalments.\n - STATUS_FORFEITED: Written off. No further settlement is expected.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "STATUS_UNSPECIFIED",
                "STATUS_PUBLISHED",
                "STATUS_PAID",
                "STATUS_DISPUTED",
                "STATUS_IN_COLLECTION",
                "STATUS_IN_PAYMENT_PLAN",
                "STATUS_FORFEITED"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.issue_date",
            "description": "Filter on the issue date. One of `YYYY-MM-DD`, `gte:YYYY-MM-DD`, `lte:YYYY-MM-DD` or `YYYY-MM-DD..YYYY-MM-DD`.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.due_date",
            "description": "Filter on the due date. Same formats as issue_date.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Invoice"
        ]
      }
    },
    "/v1/shipment/{shipment}/tracking": {
      "get": {
        "summary": "Get shipment tracking",
        "description": "Returns one unpaginated shipment tracking response. The timeline is nested under the key naming the shipment's transport mode, so a response carries exactly one of them and a reader never has to guess which.\n\nFor sea freight that key is `sea`, and its containers originate from the authenticated organization's shipment.\n\nFor air freight it is `air`, whose milestones sit at the shipment level because air cargo has no container to hang them on.\n\nA known shipment with no movement data still returns its mode key, with the containers it is known to hold and empty `events` arrays.\n\nThe path segment accepts the Cargoplot reference (`C2AE-XEE1`) or numeric id (`7`).",
        "operationId": "TrackingService_GetShipmentTracking",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetShipmentTrackingResponse"
            }
          },
          "400": {
            "description": "The shipment is missing or its transport mode is not supported.",
            "schema": {}
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No shipment with that reference or id in the authenticated user's organization.",
            "schema": {}
          },
          "500": {
            "description": "The tracking information could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "shipment",
            "description": "The shipment's Cargoplot reference (`C2AE-XEE1`) or numeric id (`7`).",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "Tracking"
        ]
      }
    },
    "/v1/user/{user}": {
      "get": {
        "summary": "Get a user",
        "description": "Resolves one user in the authenticated caller's organization by id. This is what makes a shipment's `client_user_id` and an inquiry's `requester_user_id` resolvable.\n\nRendered exactly as `GET /v1/profile/user` renders the caller.\n\nThere is no user list endpoint: ids arrive on the shipment and inquiry records that reference them.\n\nAn id from an older record may no longer resolve, which is expected rather than a fault — see `client_user_id` for when.",
        "operationId": "UserService_GetUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1UserResponse"
            }
          },
          "400": {
            "description": "The id is not a number, or the authenticated user belongs to no organization.",
            "schema": {}
          },
          "401": {
            "description": "Missing or invalid authentication credentials.",
            "schema": {}
          },
          "404": {
            "description": "No user with that id in the authenticated caller's organization.",
            "schema": {}
          },
          "500": {
            "description": "The user could not be retrieved.",
            "schema": {}
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googleRpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "user",
            "description": "The user's numeric id, as carried by a shipment's client_user_id or an inquiry's requester_user_id.",
            "in": "path",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "User"
        ]
      }
    }
  },
  "produces": [
    "application/json"
  ],
  "schemes": [
    "https"
  ],
  "security": [
    {
      "CargoplotKey": []
    }
  ],
  "securityDefinitions": {
    "CargoplotKey": {
      "type": "apiKey",
      "description": "Personal Access Token. Format: `\u003cuserID\u003e|\u003cuuid\u003e`.",
      "name": "X-Cargoplot-Key",
      "in": "header"
    }
  },
  "swagger": "2.0",
  "tags": [
    {
      "name": "ShipmentService"
    },
    {
      "name": "DocumentService"
    },
    {
      "name": "InquiryService"
    },
    {
      "name": "InvoiceService"
    },
    {
      "name": "OrganizationService"
    },
    {
      "name": "TrackingService"
    },
    {
      "name": "UserService"
    }
  ]
}
