{
  "components": {
    "headers": {
      "ApiVersion": {
        "description": "The API version that answered, for example `1.1`.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitLimit": {
        "description": "Requests allowed in the window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Seconds until the window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "RequestId": {
        "description": "This request's id. Quote it to support; the SDKs expose it.",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Body_upload_document": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A PDF or an image of one document.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_document",
        "type": "object"
      },
      "Body_upload_document_public_v1_shipments__shipment_id__documents_post": {
        "properties": {
          "file": {
            "contentMediaType": "application/octet-stream",
            "description": "A PDF or an image of one document.",
            "title": "File",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "title": "Body_upload_document",
        "type": "object"
      },
      "ConfirmedField": {
        "additionalProperties": false,
        "properties": {
          "absence_reason": {
            "anyOf": [
              {
                "enum": [
                  "not_applicable",
                  "missing_from_documents",
                  "illegible"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Supply a value or an absence reason, never both and never neither.\nReturned on the record as ``confirmed_absence``. ``illegible`` added in 1.1.",
            "title": "Absence Reason"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "source_extraction_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The ``extraction_id`` of the reading you confirmed, to keep the\nmachine's reading beside the person's answer.",
            "title": "Source Extraction Id"
          },
          "value": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name"
        ],
        "title": "ConfirmedField",
        "type": "object"
      },
      "Document": {
        "properties": {
          "declared_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The type you sent with the upload, if any.",
            "title": "Declared Type"
          },
          "detected_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The type ExportFlow detected.",
            "title": "Detected Type"
          },
          "document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The type in use: the one you declared, otherwise the one detected.\nOpen text, not a closed list. Types with rules today are\n``bill_of_lading``, ``commercial_invoice``, ``packing_list``,\n``certificate_of_origin``, ``phytosanitary_certificate`` and\n``fpis_certificate``; any other type is still read and cross-checked\nagainst the shipment's other documents, and reported as\n``cross_checked_only`` in a verification's coverage. Null until\nclassified, or when the type could not be identified.",
            "title": "Document Type"
          },
          "duplicate": {
            "default": false,
            "description": "True when this exact file was already on the shipment: the existing\ndocument is returned, nothing new is stored and nothing is charged.",
            "title": "Duplicate",
            "type": "boolean"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why processing failed, when ``status`` is ``failed``.",
            "title": "Error"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "media_type": {
            "title": "Media Type",
            "type": "string"
          },
          "page_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Count"
          },
          "parent_document_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set on a document split out of a larger file. When an upload holds\nseveral documents (for example a bill of lading and an invoice scanned\ninto one PDF), the upload becomes ``split`` and each part becomes its own\ndocument on the same shipment, with this field naming the upload. The\nparts are processed, listed and verified like any other document; the\n``split`` upload itself is not read.",
            "title": "Parent Document Id"
          },
          "sha256": {
            "title": "Sha256",
            "type": "string"
          },
          "shipment_id": {
            "format": "uuid",
            "title": "Shipment Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "classifying",
              "reading",
              "processed",
              "failed",
              "split"
            ],
            "title": "Status",
            "type": "string"
          },
          "type_confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 to 1: how sure the detection is.",
            "title": "Type Confidence"
          },
          "uploaded_at": {
            "format": "date-time",
            "title": "Uploaded At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "shipment_id",
          "filename",
          "media_type",
          "sha256",
          "page_count",
          "document_type",
          "declared_type",
          "detected_type",
          "type_confidence",
          "status",
          "error",
          "parent_document_id",
          "uploaded_at"
        ],
        "title": "Document",
        "type": "object"
      },
      "DocumentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Document"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "DocumentPage",
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "description": "Stable and machine-readable. Branch on this, never on the message.\nEvery code, its HTTP status and what to do about it are listed under\n``x-exportflow.error_codes`` in this document. New codes may be added.",
            "title": "Code",
            "type": "string"
          },
          "message": {
            "description": "For people. It may be reworded at any time.",
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "ErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "ExtractedField": {
        "properties": {
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 to 1, when the reading method gives one.",
            "title": "Confidence"
          },
          "extraction_id": {
            "description": "Cite this when confirming the field, to keep the reading it came from.",
            "format": "uuid",
            "title": "Extraction Id",
            "type": "string"
          },
          "method": {
            "description": "How the value was read, for example ``text_layer`` or ``vision``.",
            "title": "Method",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The page the value was read from, counting from 1.",
            "title": "Page"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why there is no value, when there is none: ``not_present``,\n``illegible`` or ``provider_failed``. A field is never returned as an\nempty string: it has a value or a reason.",
            "title": "Unavailable Reason"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "name",
          "value",
          "unavailable_reason",
          "confidence",
          "page",
          "method",
          "extraction_id"
        ],
        "title": "ExtractedField",
        "type": "object"
      },
      "Extraction": {
        "properties": {
          "document_id": {
            "format": "uuid",
            "title": "Document Id",
            "type": "string"
          },
          "document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Type"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/ExtractedField"
            },
            "title": "Fields",
            "type": "array"
          },
          "status": {
            "enum": [
              "classifying",
              "reading",
              "processed",
              "failed",
              "split"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "status",
          "document_type",
          "fields"
        ],
        "title": "Extraction",
        "type": "object"
      },
      "Finding": {
        "properties": {
          "document_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "expected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected"
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Field"
          },
          "found": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Found"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "rule": {
            "title": "Rule",
            "type": "string"
          },
          "rule_version": {
            "title": "Rule Version",
            "type": "integer"
          },
          "severity": {
            "description": "``critical``: will cause rejection. ``verify``: inconsistent, and may\nbe intentional; a person should look. ``clean``: a rule ran and passed.\n``uncovered``: no rule covers this. ``unavailable``: a value the rule\nneeded could not be read. ``uncovered`` and ``unavailable`` are not\npasses: show them differently from ``clean``.",
            "enum": [
              "critical",
              "verify",
              "clean",
              "uncovered",
              "unavailable"
            ],
            "title": "Severity",
            "type": "string"
          }
        },
        "required": [
          "id",
          "rule",
          "rule_version",
          "severity",
          "document_id",
          "field",
          "found",
          "expected",
          "message"
        ],
        "title": "Finding",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "Identity": {
        "description": "Who a key is, as the server sees it. The SDK's connection check.",
        "properties": {
          "api_version": {
            "title": "Api Version",
            "type": "string"
          },
          "application_id": {
            "format": "uuid",
            "title": "Application Id",
            "type": "string"
          },
          "application_name": {
            "title": "Application Name",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "title": "Environment",
            "type": "string"
          },
          "key_prefix": {
            "title": "Key Prefix",
            "type": "string"
          },
          "organisation_id": {
            "format": "uuid",
            "title": "Organisation Id",
            "type": "string"
          },
          "organisation_name": {
            "title": "Organisation Name",
            "type": "string"
          },
          "scopes": {
            "description": "Empty means every scope.",
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "organisation_id",
          "organisation_name",
          "application_id",
          "application_name",
          "environment",
          "key_prefix",
          "scopes",
          "api_version"
        ],
        "title": "Identity",
        "type": "object"
      },
      "MeterUsage": {
        "properties": {
          "billable_units": {
            "title": "Billable Units",
            "type": "integer"
          },
          "estimated_charge_micro": {
            "description": "Millionths of ``currency``. An estimate until an invoice is issued.",
            "title": "Estimated Charge Micro",
            "type": "integer"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "meter": {
            "title": "Meter",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "quota": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Units allowed this period on your plan; null means no limit.",
            "title": "Quota"
          },
          "succeeded": {
            "title": "Succeeded",
            "type": "integer"
          },
          "unit": {
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "meter",
          "name",
          "unit",
          "succeeded",
          "failed",
          "billable_units",
          "estimated_charge_micro",
          "quota"
        ],
        "title": "MeterUsage",
        "type": "object"
      },
      "NewShipment": {
        "additionalProperties": false,
        "properties": {
          "commodity": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commodity"
          },
          "destination_country": {
            "anyOf": [
              {
                "maxLength": 2,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 3166-1 alpha-2 country code, for example ``IN``.",
            "title": "Destination Country"
          },
          "destination_port": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 5,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "UN/LOCODE of the port of discharge: five characters, country then\nplace, no space. For example ``INNSA`` (Nhava Sheva).",
            "title": "Destination Port"
          },
          "exporter_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exporter Name"
          },
          "hs_code": {
            "anyOf": [
              {
                "maxLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Harmonized System code, digits only, for example ``180100``.",
            "title": "Hs Code"
          },
          "origin_country": {
            "anyOf": [
              {
                "maxLength": 2,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 3166-1 alpha-2 country code, for example ``NG``.",
            "title": "Origin Country"
          },
          "reference": {
            "anyOf": [
              {
                "maxLength": 120,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own identifier for the shipment, for example an order number.",
            "title": "Reference"
          }
        },
        "title": "NewShipment",
        "type": "object"
      },
      "NewWebhookEndpoint": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "event_types": {
            "description": "Empty subscribes to every event type.",
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "title": "Event Types",
            "type": "array"
          },
          "url": {
            "maxLength": 2000,
            "minLength": 12,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "NewWebhookEndpoint",
        "type": "object"
      },
      "ProcessingAccepted": {
        "properties": {
          "document_id": {
            "format": "uuid",
            "title": "Document Id",
            "type": "string"
          },
          "queued": {
            "description": "False when the document was already being processed or already read.",
            "title": "Queued",
            "type": "boolean"
          },
          "status": {
            "enum": [
              "classifying",
              "reading",
              "processed",
              "failed",
              "split"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "document_id",
          "status",
          "queued"
        ],
        "title": "ProcessingAccepted",
        "type": "object"
      },
      "Reading": {
        "description": "One document's reading of a field.",
        "properties": {
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "0 to 1, when the reading method gives one. Added in 1.1.",
            "title": "Confidence"
          },
          "document_absence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What a person recorded about this field on this one document, if\nanything. Added in 1.1.",
            "enum": [
              "not_on_this_document",
              "illegible",
              "not_applicable",
              null
            ],
            "title": "Document Absence"
          },
          "document_id": {
            "format": "uuid",
            "title": "Document Id",
            "type": "string"
          },
          "extraction_id": {
            "description": "Cite this as ``source_extraction_id`` when confirming the field.",
            "format": "uuid",
            "title": "Extraction Id",
            "type": "string"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How the value was read. Added in 1.1.",
            "title": "Method"
          },
          "page": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The page the value was read from, counting from 1. Added in 1.1.",
            "title": "Page"
          },
          "unavailable_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "``not_present``, ``illegible`` or ``provider_failed`` when there is no value.",
            "title": "Unavailable Reason"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "document_id",
          "value",
          "unavailable_reason",
          "extraction_id"
        ],
        "title": "Reading",
        "type": "object"
      },
      "Record": {
        "description": "What the shipment's documents say, and what has been confirmed.",
        "properties": {
          "confirmed": {
            "description": "True once at least one field is confirmed. Verification requires it.",
            "title": "Confirmed",
            "type": "boolean"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/RecordField"
            },
            "title": "Fields",
            "type": "array"
          },
          "shipment_id": {
            "format": "uuid",
            "title": "Shipment Id",
            "type": "string"
          }
        },
        "required": [
          "shipment_id",
          "confirmed",
          "fields"
        ],
        "title": "Record",
        "type": "object"
      },
      "RecordConfirmation": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/ConfirmedField"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Fields",
            "type": "array"
          }
        },
        "required": [
          "fields"
        ],
        "title": "RecordConfirmation",
        "type": "object"
      },
      "RecordField": {
        "properties": {
          "confirmed_absence": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a person confirmed the field has no value: why. It is the\n``absence_reason`` sent to ``PUT /shipments/{id}/record``: one of\n``not_applicable``, ``missing_from_documents`` or ``illegible``.",
            "enum": [
              "not_applicable",
              "missing_from_documents",
              "illegible",
              null
            ],
            "title": "Confirmed Absence"
          },
          "confirmed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the field was confirmed. Null means not confirmed yet.",
            "title": "Confirmed At"
          },
          "confirmed_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The value a person confirmed. Null when not confirmed, or confirmed absent.",
            "title": "Confirmed Value"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "readings": {
            "description": "Every document's reading of this field. More than one distinct value is\nthe disagreement verification exists to find.",
            "items": {
              "$ref": "#/components/schemas/Reading"
            },
            "title": "Readings",
            "type": "array"
          }
        },
        "required": [
          "name",
          "readings",
          "confirmed_value",
          "confirmed_absence",
          "confirmed_at"
        ],
        "title": "RecordField",
        "type": "object"
      },
      "Shipment": {
        "description": "A set of documents that travel together and are checked against each other.",
        "properties": {
          "commodity": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Commodity"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "destination_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination Country"
          },
          "destination_port": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Destination Port"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "title": "Environment",
            "type": "string"
          },
          "exporter_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exporter Name"
          },
          "hs_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hs Code"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "origin_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin Country"
          },
          "reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference"
          }
        },
        "required": [
          "id",
          "reference",
          "commodity",
          "exporter_name",
          "origin_country",
          "destination_country",
          "destination_port",
          "hs_code",
          "environment",
          "created_at"
        ],
        "title": "Shipment",
        "type": "object"
      },
      "ShipmentPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Shipment"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "ShipmentPage",
        "type": "object"
      },
      "Usage": {
        "properties": {
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "title": "Environment",
            "type": "string"
          },
          "estimated_charge_micro": {
            "title": "Estimated Charge Micro",
            "type": "integer"
          },
          "meters": {
            "items": {
              "$ref": "#/components/schemas/MeterUsage"
            },
            "title": "Meters",
            "type": "array"
          },
          "period_end": {
            "description": "Exclusive: the first day of the next period.",
            "format": "date",
            "title": "Period End",
            "type": "string"
          },
          "period_start": {
            "format": "date",
            "title": "Period Start",
            "type": "string"
          },
          "plan": {
            "title": "Plan",
            "type": "string"
          }
        },
        "required": [
          "environment",
          "period_start",
          "period_end",
          "currency",
          "plan",
          "meters",
          "estimated_charge_micro"
        ],
        "title": "Usage",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "Verification": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "coverage": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "What was checked and what was not. Evidence of inconsistency is\nreported; a specification is never certified as met. Null until the\nverification completes. Keys: ``rule_set_version``, ``engine_version``,\n``rules_effective_on`` (a date) and ``effective_date_source``;\n``documents``, a list of ``{document_id, type, validation,\nrules_applied, reason?}`` where ``validation`` is ``checked`` (rules for\nits type ran) or ``cross_checked_only`` (its type has no rules: it was\nonly compared with the other documents, which is not a pass);\n``fields_unavailable``, a list of ``{field, reason, document_id}``; and,\nwhen no shipped-on-board date was confirmed, ``effective_date_note``.",
            "title": "Coverage"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "title": "Findings",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "rule_set_version": {
            "title": "Rule Set Version",
            "type": "integer"
          },
          "severity_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "How many findings of each severity.",
            "title": "Severity Counts",
            "type": "object"
          },
          "shipment_id": {
            "format": "uuid",
            "title": "Shipment Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "complete",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "shipment_id",
          "status",
          "rule_set_version",
          "severity_counts",
          "failure_reason",
          "created_at",
          "completed_at",
          "coverage",
          "findings"
        ],
        "title": "Verification",
        "type": "object"
      },
      "VerificationAccepted": {
        "description": "A verification was queued. Fetch it, or wait for ``verification.completed``.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "shipment_id": {
            "format": "uuid",
            "title": "Shipment Id",
            "type": "string"
          },
          "status": {
            "const": "queued",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "shipment_id",
          "status"
        ],
        "title": "VerificationAccepted",
        "type": "object"
      },
      "VerificationPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/VerificationSummary"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "VerificationPage",
        "type": "object"
      },
      "VerificationSummary": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "failure_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Reason"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "rule_set_version": {
            "title": "Rule Set Version",
            "type": "integer"
          },
          "severity_counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "description": "How many findings of each severity.",
            "title": "Severity Counts",
            "type": "object"
          },
          "shipment_id": {
            "format": "uuid",
            "title": "Shipment Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "complete",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "shipment_id",
          "status",
          "rule_set_version",
          "severity_counts",
          "failure_reason",
          "created_at",
          "completed_at"
        ],
        "title": "VerificationSummary",
        "type": "object"
      },
      "WebhookEndpoint": {
        "properties": {
          "application_id": {
            "format": "uuid",
            "title": "Application Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "title": "Event Types",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "title": "Status",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "application_id",
          "url",
          "description",
          "event_types",
          "status",
          "disabled_reason",
          "created_at",
          "last_success_at",
          "last_failure_at"
        ],
        "title": "WebhookEndpoint",
        "type": "object"
      },
      "WebhookEndpointCreated": {
        "properties": {
          "application_id": {
            "format": "uuid",
            "title": "Application Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "event_types": {
            "items": {
              "type": "string"
            },
            "title": "Event Types",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "signing_secret": {
            "description": "Shown once. Use it to verify the signature on every delivery.",
            "title": "Signing Secret",
            "type": "string"
          },
          "status": {
            "enum": [
              "enabled",
              "disabled"
            ],
            "title": "Status",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "application_id",
          "url",
          "description",
          "event_types",
          "status",
          "disabled_reason",
          "created_at",
          "last_success_at",
          "last_failure_at",
          "signing_secret"
        ],
        "title": "WebhookEndpointCreated",
        "type": "object"
      },
      "WebhookEndpointPage": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "WebhookEndpointPage",
        "type": "object"
      },
      "WebhookEvent": {
        "description": "The body of every delivery, signed with `ExportFlow-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of '<t>.<raw body>'>`. Deliveries are at least once: de-duplicate on `id`. Answer 2xx within 10 seconds. There are no shipment events: a shipment changes only through its documents and verifications.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "enum": [
              "document.uploaded",
              "document.processing.started",
              "document.processing.completed",
              "document.processing.failed",
              "verification.completed",
              "verification.failed",
              "usage.threshold.reached",
              "billing.invoice.generated",
              "webhook.test"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_billing_invoice_generated": {
        "description": "The `billing.invoice.generated` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "currency": {
                "type": "string"
              },
              "invoice": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "number": {
                "type": "string"
              },
              "period_end": {
                "format": "date",
                "type": "string"
              },
              "period_start": {
                "format": "date",
                "type": "string"
              },
              "total_micro": {
                "description": "Millionths of `currency`.",
                "type": "integer"
              }
            },
            "required": [
              "invoice",
              "number",
              "currency",
              "total_micro"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "billing.invoice.generated",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_document_processing_completed": {
        "description": "The `document.processing.completed` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "document": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fields_read": {
                "type": "integer"
              },
              "pages": {
                "type": "integer"
              },
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "status": {
                "description": "The document's status when the event was raised.",
                "type": "string"
              }
            },
            "required": [
              "document",
              "shipment",
              "status",
              "document_type"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "document.processing.completed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_document_processing_failed": {
        "description": "The `document.processing.failed` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "document": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "stage": {
                "enum": [
                  "classification",
                  "reading"
                ],
                "type": "string"
              },
              "status": {
                "description": "The document's status when the event was raised.",
                "type": "string"
              }
            },
            "required": [
              "document",
              "shipment",
              "status",
              "document_type"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "document.processing.failed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_document_processing_started": {
        "description": "The `document.processing.started` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "document": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "status": {
                "description": "The document's status when the event was raised.",
                "type": "string"
              }
            },
            "required": [
              "document",
              "shipment",
              "status",
              "document_type"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "document.processing.started",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_document_uploaded": {
        "description": "The `document.uploaded` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "document": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "document_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "status": {
                "description": "The document's status when the event was raised.",
                "type": "string"
              }
            },
            "required": [
              "document",
              "shipment",
              "status",
              "document_type"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "document.uploaded",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_usage_threshold_reached": {
        "description": "The `usage.threshold.reached` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "environment": {
                "enum": [
                  "sandbox",
                  "production"
                ],
                "type": "string"
              },
              "limit": {
                "type": "integer"
              },
              "meter": {
                "type": "string"
              },
              "organisation": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "period": {
                "description": "YYYY-MM",
                "type": "string"
              },
              "resets_at": {
                "format": "date-time",
                "type": "string"
              },
              "threshold_percent": {
                "enum": [
                  80,
                  100
                ],
                "type": "integer"
              },
              "used": {
                "type": "integer"
              }
            },
            "required": [
              "organisation",
              "meter",
              "threshold_percent",
              "used",
              "limit",
              "period"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "usage.threshold.reached",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_verification_completed": {
        "description": "The `verification.completed` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "findings": {
                "additionalProperties": {
                  "type": "integer"
                },
                "description": "How many findings of each severity.",
                "type": "object"
              },
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "status": {
                "enum": [
                  "complete"
                ],
                "type": "string"
              },
              "verification": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              }
            },
            "required": [
              "verification",
              "shipment",
              "status",
              "findings"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "verification.completed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_verification_failed": {
        "description": "The `verification.failed` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "shipment": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "status": {
                "enum": [
                  "failed"
                ],
                "type": "string"
              },
              "verification": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              }
            },
            "required": [
              "verification",
              "shipment",
              "status"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "verification.failed",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      },
      "WebhookEvent_webhook_test": {
        "description": "The `webhook.test` event.",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "application_id": {
            "description": "Null for account-level events.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "properties": {
              "message": {
                "type": "string"
              },
              "webhook_endpoint": {
                "properties": {
                  "id": {
                    "format": "uuid",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              }
            },
            "required": [
              "webhook_endpoint",
              "message"
            ],
            "type": "object"
          },
          "environment": {
            "enum": [
              "sandbox",
              "production"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "type": {
            "const": "webhook.test",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "api_version",
          "environment",
          "data"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "description": "An API key from the developer console.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Document processing and verification for trade documents, for integration into\nyour own ERP, accounting or procurement software.\n\n**Authentication.** Send your API key as a bearer token:\n`Authorization: Bearer exfk_live_...`. Keys are created in the developer\nconsole. A key beginning `exfk_test_` works in the sandbox environment, one\nbeginning `exfk_live_` in production; the two never see each other's data.\n\n**Idempotency.** Every `POST`, `PUT`, `PATCH` and `DELETE` needs an\n`Idempotency-Key` header. Repeating a request with the same key and the same\nbody returns the original response and does the work once. The SDKs set it\nfor you and reuse it when they retry.\n\n**Asynchronous work.** Uploading a document and starting a verification both\nreturn at once. Poll the resource, or register a webhook endpoint and be told.\n\n**Versioning.** This is version 1. Within it, fields and endpoints are only\nadded, never removed or changed in meaning. Every response carries\n`ExportFlow-Api-Version`. A deprecated endpoint is announced at least six\nmonths ahead and answers with `Deprecation` and `Sunset` headers until it goes.\n\n**Errors.** Every error is `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`.\nBranch on `code`; `message` is for people.\n\n**Rate limits.** Every response carries `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset` (seconds). A request over the\nlimit is answered 429 with `Retry-After`.\n\n**Billing.** Requests are not charged. Usage is recorded when work completes:\na document accepted, a document processed, a verification completed. Each is\nrecorded once however many times it is requested, retried or read. Sandbox\nusage is measured and never charged. `GET /usage` shows your month so far.\n",
    "title": "ExportFlow API",
    "version": "1.1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/public/v1/documents/{document_id}": {
      "get": {
        "operationId": "get_document",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Fetch a document and its processing status",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/documents/{document_id}/extraction": {
      "get": {
        "description": "The current reading of every field, each with a value or the reason\nthere is none. Empty until the document's status is ``processed``.",
        "operationId": "get_extraction",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Extraction"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "The fields read from a document",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/documents/{document_id}/process": {
      "post": {
        "description": "Queues classification and reading for a document that failed.\n\nA document is processed automatically when it is uploaded, so this is the\nrecovery route. Calling it for a document that is being processed or has\nbeen read changes nothing and answers ``queued: false``; it never buys the\nsame reading twice.",
        "operationId": "process_document",
        "parameters": [
          {
            "in": "path",
            "name": "document_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Document Id",
              "type": "string"
            }
          },
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessingAccepted"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Process a document again",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/me": {
      "get": {
        "operationId": "me",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Who this API key is",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/shipments": {
      "get": {
        "operationId": "list_shipments",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "reference",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 120,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reference"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentPage"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List shipments",
        "tags": [
          "public"
        ]
      },
      "post": {
        "operationId": "create_shipment",
        "parameters": [
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewShipment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Create a shipment",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/shipments/{shipment_id}": {
      "get": {
        "operationId": "get_shipment",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Fetch a shipment",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/shipments/{shipment_id}/documents": {
      "get": {
        "operationId": "list_documents",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentPage"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "List a shipment's documents",
        "tags": [
          "public"
        ]
      },
      "post": {
        "description": "Scans, stores and queues the document for processing.\n\nProcessing is asynchronous. Poll ``GET /documents/{id}`` or subscribe to\n``document.processing.completed``. Uploading the same file to the same\nshipment twice returns the first document with ``duplicate: true``.\n\nA file that holds several documents is split: the upload's status becomes\n``split`` and each part appears in ``GET /shipments/{id}/documents`` as a\ndocument of its own, with ``parent_document_id`` naming the upload. Read\nand confirm the parts; the ``split`` upload itself has no reading.\n\nAccepted: PDF, PNG, JPEG, TIFF and WebP, one file per request. Refusals\nare 400 with a code beginning ``upload_``.",
        "operationId": "upload_document",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          },
          {
            "description": "What you say the document is.",
            "in": "query",
            "name": "document_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 64,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "What you say the document is.",
              "title": "Document Type"
            }
          },
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_document"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Upload a document",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/shipments/{shipment_id}/record": {
      "get": {
        "operationId": "get_record",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "What the shipment's documents say",
        "tags": [
          "public"
        ]
      },
      "put": {
        "description": "Confirm the values a person has checked against the documents.\n\nVerification will not start until the record is confirmed, and that is\ndeliberate: if a field was misread, every finding computed from it would\nbe wrong. Confirm what the document says, not what it should say; the\nverification is what finds the error.",
        "operationId": "confirm_record",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          },
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordConfirmation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Confirm what the documents say",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/shipments/{shipment_id}/verifications": {
      "get": {
        "operationId": "list_verifications",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationPage"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "A shipment's verifications, newest first",
        "tags": [
          "public"
        ]
      },
      "post": {
        "description": "Checks the confirmed record against the published rule set.\n\nAsynchronous: poll ``GET /verifications/{id}`` or subscribe to\n``verification.completed``. Answers 409 ``not_confirmed`` until the record\nhas been confirmed.",
        "operationId": "create_verification",
        "parameters": [
          {
            "in": "path",
            "name": "shipment_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Shipment Id",
              "type": "string"
            }
          },
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationAccepted"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Verify a shipment's documents",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/usage": {
      "get": {
        "description": "This application's usage in this key's environment. Charges are\nestimates until an invoice is issued; quotas are for the whole account.",
        "operationId": "get_usage",
        "parameters": [
          {
            "description": "YYYY-MM; the current month if omitted.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "YYYY-MM; the current month if omitted.",
              "title": "Period"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "What this application used in a month",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/verifications/{verification_id}": {
      "get": {
        "operationId": "get_verification",
        "parameters": [
          {
            "in": "path",
            "name": "verification_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Verification Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "A verification's status, findings and coverage",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/webhook_endpoints": {
      "get": {
        "operationId": "list_webhook_endpoints",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointPage"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "This application's webhook endpoints",
        "tags": [
          "public"
        ]
      },
      "post": {
        "operationId": "create_webhook_endpoint",
        "parameters": [
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWebhookEndpoint"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointCreated"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Register a webhook endpoint",
        "tags": [
          "public"
        ]
      }
    },
    "/public/v1/webhook_endpoints/{endpoint_id}": {
      "delete": {
        "operationId": "delete_webhook_endpoint",
        "parameters": [
          {
            "in": "path",
            "name": "endpoint_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Endpoint Id",
              "type": "string"
            }
          },
          {
            "description": "Any string of 1 to 255 characters, unique per operation you intend. Repeating a request with the same key and the same body returns the first response; the same key with a different body is refused with `idempotency_key_reused`. Keys do not expire.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response",
            "headers": {
              "ExportFlow-Api-Version": {
                "$ref": "#/components/headers/ApiVersion"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              },
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is malformed, or the upload was refused.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The API key is missing or invalid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The key may not do this.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "No such resource in this key's environment.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "Not possible in the current state (for example `not_confirmed`), or an idempotency key in use or reused with a different request.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "The request is well formed but not valid.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "426": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "This SDK version is no longer supported.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A rate limit, quota or spending limit was reached.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "ExportFlow failed. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            },
            "description": "A dependency is unavailable. Safe to retry.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/RequestId"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "summary": "Remove a webhook endpoint",
        "tags": [
          "public"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production and sandbox",
      "url": "https://api.exportflow.app"
    }
  ],
  "webhooks": {
    "billing.invoice.generated": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_billing_invoice_generated"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "billing.invoice.generated"
      }
    },
    "document.processing.completed": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_document_processing_completed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "document.processing.completed"
      }
    },
    "document.processing.failed": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_document_processing_failed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "document.processing.failed"
      }
    },
    "document.processing.started": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_document_processing_started"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "document.processing.started"
      }
    },
    "document.uploaded": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_document_uploaded"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "document.uploaded"
      }
    },
    "usage.threshold.reached": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_usage_threshold_reached"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "usage.threshold.reached"
      }
    },
    "verification.completed": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_verification_completed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "verification.completed"
      }
    },
    "verification.failed": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_verification_failed"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "verification.failed"
      }
    },
    "webhook.test": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "ExportFlow-Signature",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent_webhook_test"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Received. Anything else is retried."
          }
        },
        "summary": "webhook.test"
      }
    }
  },
  "x-exportflow": {
    "billable_events": {
      "document.processing.completed": "document.processing",
      "document.uploaded": "document.upload",
      "verification.completed": "verification.run"
    },
    "error_codes": {
      "account_suspended": {
        "meaning": "The account is suspended. Contact ExportFlow.",
        "status": 403
      },
      "application_disabled": {
        "meaning": "The application this key belongs to is disabled.",
        "status": 403
      },
      "application_owner_unavailable": {
        "meaning": "The application's owner can no longer act.",
        "status": 403
      },
      "document_busy": {
        "meaning": "The document is being processed. Wait for it to finish.",
        "status": 409
      },
      "document_is_bundle": {
        "meaning": "The document was split into parts; act on the parts instead.",
        "status": 409
      },
      "document_not_found": {
        "meaning": "No such document in this key's environment.",
        "status": 404
      },
      "document_not_on_shipment": {
        "meaning": "The document is not on this shipment.",
        "status": 404
      },
      "document_unreadable": {
        "meaning": "The stored file could not be read back. Safe to retry.",
        "status": 502
      },
      "idempotency_conflict": {
        "meaning": "An earlier attempt with this key was released as this one arrived. Retry with the same key.",
        "status": 409
      },
      "idempotency_key_required": {
        "meaning": "Send an `Idempotency-Key` header on this request.",
        "status": 400
      },
      "idempotency_key_reused": {
        "meaning": "This key was used for a different request. Retrying cannot succeed: use a new key.",
        "status": 409
      },
      "idempotency_key_too_long": {
        "meaning": "The `Idempotency-Key` is too long.",
        "status": 400
      },
      "insufficient_scope": {
        "meaning": "The key lacks the scope this operation needs.",
        "status": 403
      },
      "internal_error": {
        "meaning": "ExportFlow failed. Safe to retry with the same idempotency key.",
        "status": 500
      },
      "invalid_api_key": {
        "meaning": "The key is missing, wrong, revoked or expired. Do not retry.",
        "status": 401
      },
      "invalid_confirmation": {
        "meaning": "A confirmed field needs a value or an absence reason, never both or neither.",
        "status": 422
      },
      "invalid_period": {
        "meaning": "A period is a month written YYYY-MM.",
        "status": 422
      },
      "invalid_request": {
        "meaning": "A field is missing or not valid; the message names it.",
        "status": 422
      },
      "invalid_shipment": {
        "meaning": "The shipment's fields are not valid.",
        "status": 422
      },
      "invalid_webhook_url": {
        "meaning": "The URL must be public HTTPS.",
        "status": 422
      },
      "ip_not_allowed": {
        "meaning": "The request came from an address the key does not allow.",
        "status": 403
      },
      "no_documents": {
        "meaning": "The shipment has no documents yet.",
        "status": 409
      },
      "no_rule_set": {
        "meaning": "No published rule set applies. Contact ExportFlow.",
        "status": 409
      },
      "not_confirmed": {
        "meaning": "Confirm the shipment's record before verifying it.",
        "status": 409
      },
      "port_not_in_country": {
        "meaning": "The destination port (UN/LOCODE) is not in the destination country.",
        "status": 422
      },
      "port_without_country": {
        "meaning": "A destination port was sent without a destination country.",
        "status": 422
      },
      "quota_exceeded": {
        "meaning": "The period's allowance is used up. Waiting will not help.",
        "status": 429
      },
      "rate_limited": {
        "meaning": "Too many requests. Wait `Retry-After` seconds and retry.",
        "status": 429
      },
      "request_in_progress": {
        "meaning": "A request with this key is still running. Retry with the same key shortly.",
        "status": 409
      },
      "run_not_found": {
        "meaning": "No such verification in this key's environment.",
        "status": 404
      },
      "scanner_unavailable": {
        "meaning": "The virus scanner is unavailable. Safe to retry.",
        "status": 503
      },
      "sdk_version_unsupported": {
        "meaning": "This SDK version is too old. Upgrade it.",
        "status": 426
      },
      "shipment_not_found": {
        "meaning": "No such shipment in this key's environment.",
        "status": 404
      },
      "source_extraction_not_on_shipment": {
        "meaning": "`source_extraction_id` names a reading from another shipment.",
        "status": 422
      },
      "spend_limit_reached": {
        "meaning": "The period's spending limit is reached. Waiting will not help.",
        "status": 429
      },
      "too_many_documents_in_progress": {
        "meaning": "Too many documents are being processed at once. Retry after some finish.",
        "status": 429
      },
      "unknown_event_type": {
        "meaning": "One of the event types is not published.",
        "status": 422
      },
      "upload_declared_type_mismatch": {
        "meaning": "The declared media type does not match the content.",
        "status": 400
      },
      "upload_empty": {
        "meaning": "The file is empty.",
        "status": 400
      },
      "upload_infected": {
        "meaning": "The virus scanner refused the file.",
        "status": 400
      },
      "upload_password_protected": {
        "meaning": "The PDF is password protected.",
        "status": 400
      },
      "upload_too_large": {
        "meaning": "The file is larger than the upload limit.",
        "status": 400
      },
      "upload_too_many_pages": {
        "meaning": "The file has more pages than the limit.",
        "status": 400
      },
      "upload_too_small": {
        "meaning": "The file is too small to be a document.",
        "status": 400
      },
      "upload_unreadable_image": {
        "meaning": "The image is damaged and cannot be opened.",
        "status": 400
      },
      "upload_unreadable_pdf": {
        "meaning": "The PDF is damaged and cannot be opened.",
        "status": 400
      },
      "upload_unrecognised_format": {
        "meaning": "Not a PDF, PNG, JPEG, TIFF or WebP file.",
        "status": 400
      },
      "verification_not_found": {
        "meaning": "No such verification in this key's environment.",
        "status": 404
      },
      "webhook_endpoint_not_found": {
        "meaning": "No such webhook endpoint.",
        "status": 404
      }
    },
    "idempotency_header": "Idempotency-Key",
    "request_id_header": "x-request-id",
    "version_header": "ExportFlow-Api-Version",
    "webhook_events": [
      "document.uploaded",
      "document.processing.started",
      "document.processing.completed",
      "document.processing.failed",
      "verification.completed",
      "verification.failed",
      "usage.threshold.reached",
      "billing.invoice.generated",
      "webhook.test"
    ],
    "webhook_signature_header": "ExportFlow-Signature"
  }
}