Karrio Documents API

This is an object representing your Karrio document upload record. A Document upload record keep traces of shipping trade documents uploaded to carriers to fast track customs and border processing.

Operations 9

POST /v1/documents/generate Generate a document #
GET /v1/documents/templates List all templates #
POST /v1/documents/templates Create a template #
GET /v1/documents/templates/{id} Retrieve a template #
PATCH /v1/documents/templates/{id} Update a template #
DELETE /v1/documents/templates/{id} Delete a template #
GET /v1/documents/uploads List all upload records #
POST /v1/documents/uploads Upload documents #
GET /v1/documents/uploads/{id} Retrieve upload record #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/karrio-documents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

karrio-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Karrio is a multi-carrier shipping API that simplifies the integration of logistics carrier services.
  title: Karrio Documents API
  version: 2026.1.32
tags:
- name: Documents
  description: 'This is an object representing your Karrio document upload record.

    A Document upload record keep traces of shipping trade documents uploaded to carriers

    to fast track customs and border processing.'
paths:
  /v1/documents/generate:
    post:
      operationId: '&&&&$$generateDocument'
      description: 'Generate any document.

        This API is designed to be used to generate GS1 labels,

        invoices and any document that requires external data.'
      summary: Generate a document
      tags:
      - Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentData'
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneratedDocument'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
  /v1/documents/templates:
    get:
      operationId: '&&&&$$list'
      description: Retrieve all templates.
      summary: List all templates
      tags:
      - Documents
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTemplateList'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      x-operationId: listDocumentTemplates
    post:
      operationId: '&&&&$$create'
      description: Create a new template.
      summary: Create a template
      tags:
      - Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentTemplateData'
        required: true
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTemplate'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      x-operationId: createDocumentTemplate
  /v1/documents/templates/{id}:
    get:
      operationId: '&&&&$$retrieve'
      description: Retrieve a template.
      summary: Retrieve a template
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Documents
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTemplate'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      x-operationId: retrieveDocumentTemplate
    patch:
      operationId: '&&&&$$update'
      description: update a template.
      summary: Update a template
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedDocumentTemplateData'
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTemplate'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      x-operationId: updateDocumentTemplate
    delete:
      operationId: '&&&&$$discard'
      description: Delete a template.
      summary: Delete a template
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Documents
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentTemplate'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
      x-operationId: discardDocumentTemplate
  /v1/documents/uploads:
    get:
      operationId: $$$$$&uploads
      description: Retrieve all shipping document upload records.
      summary: List all upload records
      parameters:
      - in: query
        name: created_after
        schema:
          type: string
          format: date-time
      - in: query
        name: created_before
        schema:
          type: string
          format: date-time
      - in: query
        name: shipment_id
        schema:
          type: string
      tags:
      - Documents
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentUploadRecords'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
    post:
      operationId: $$$$$&upload
      description: Upload a shipping document.
      summary: Upload documents
      tags:
      - Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUploadData'
        required: true
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentUploadRecord'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '424':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessages'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
  /v1/documents/uploads/{id}:
    get:
      operationId: $$$$$&retrieve_upload
      description: Retrieve a shipping document upload record.
      summary: Retrieve upload record
      parameters:
      - in: path
        name: id
        schema:
          type: string
        required: true
      tags:
      - Documents
      security:
      - TokenBasic: []
      - Token: []
      - OAuth2: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentUploadRecord'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/APIError'
          description: The list of API errors
    DocumentDetails:
      type: object
      properties:
        doc_id:
          type: string
          description: The uploaded document id.
        file_name:
          type: string
          description: The uploaded document file name.
    DocumentUploadData:
      type: object
      properties:
        shipment_id:
          type: string
          description: The documents related shipment.
        document_files:
          type: array
          items:
            $ref: '#/components/schemas/DocumentFileData'
          description: Shipping document files
        reference:
          type:
          - string
          - 'null'
          description: Shipping document file reference
          maxLength: 50
      required:
      - document_files
      - shipment_id
    DocumentTemplateData:
      type: object
      properties:
        name:
          type: string
          description: The template name
          maxLength: 255
        slug:
          type: string
          description: The template slug
          maxLength: 255
        template:
          type: string
          description: The template content
        active:
          type: boolean
          default: true
          description: disable template flag.
        description:
          type: string
          description: The template description
          maxLength: 255
        metadata:
          type: object
          additionalProperties: {}
          description: The template metadata
        options:
          type: object
          additionalProperties: {}
          description: The template rendering options
        related_object:
          enum:
          - shipment
          - order
          - other
          type: string
          x-spec-enum-id: b3691dad14d14121
          default: other
          description: The template related object
      required:
      - name
      - slug
      - template
    DocumentTemplate:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier
        name:
          type: string
          description: The template name
          maxLength: 255
        slug:
          type: string
          description: The template slug
          maxLength: 255
        template:
          type: string
          description: The template content
        active:
          type: boolean
          default: true
          description: disable template flag.
        description:
          type: string
          description: The template description
          maxLength: 255
        metadata:
          type: object
          additionalProperties: {}
          description: The template metadata
        options:
          type: object
          additionalProperties: {}
          description: The template rendering options
        related_object:
          enum:
          - shipment
          - order
          - other
          type: string
          x-spec-enum-id: b3691dad14d14121
          default: other
          description: The template related object
        object_type:
          type: string
          default: document-template
          description: Specifies the object type
        preview_url:
          type: string
          format: uri
          description: The template preview URL
      required:
      - name
      - slug
      - template
    PatchedDocumentTemplateData:
      type: object
      properties:
        name:
          type: string
          description: The template name
          maxLength: 255
        slug:
          type: string
          description: The template slug
          maxLength: 255
        template:
          type: string
          description: The template content
        active:
          type: boolean
          default: true
          description: disable template flag.
        description:
          type: string
          description: The template description
          maxLength: 255
        metadata:
          type: object
          additionalProperties: {}
          description: The template metadata
        options:
          type: object
          additionalProperties: {}
          description: The template rendering options
        related_object:
          enum:
          - shipment
          - order
          - other
          type: string
          x-spec-enum-id: b3691dad14d14121
          default: other
          description: The template related object
    Message:
      type: object
      properties:
        message:
          type: string
          description: The error or warning message
        code:
          type: string
          description: The message code
        level:
          type: string
          description: The message level
        details:
          type: object
          additionalProperties: {}
          description: any additional details
        carrier_name:
          type: string
          description: The targeted carrier
        carrier_id:
          type: string
          description: The targeted carrier name (unique identifier)
    GeneratedDocument:
      type: object
      properties:
        template_id:
          type: string
          description: The template name
        doc_format:
          type: string
          description: The format of the document
        doc_name:
          type: string
          description: The file name
        doc_file:
          type: string
          description: A base64 file content
      required:
      - doc_file
    ErrorMessages:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          description: The list of error messages
    DocumentUploadRecords:
      type: object
      properties:
        count:
          type:
          - integer
          - 'null'
        next:
          type:
          - string
          - 'null'
          format: uri
        previous:
          type:
          - string
          - 'null'
          format: uri
        results:
          type: array
          items:
            $ref: '#/components/schemas/DocumentUploadRecord'
      required:
      - results
    DocumentUploadRecord:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier
        carrier_name:
          type:
          - string
          - 'null'
          description: The shipment carrier
        carrier_id:
          type:
          - string
          - 'null'
          description: The shipment carrier configured identifier
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentDetails'
          default: []
          description: the carrier shipping document ids
        meta:
          type:
          - object
          - 'null'
          additionalProperties: {}
          description: provider specific metadata
        reference:
          type:
          - string
          - 'null'
          description: Shipping document file reference
          maxLength: 50
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          default: []
          description: The list of note or warning messages
    DocumentData:
      type: object
      properties:
        template_id:
          type: string
          description: The template name. **Required if template is not provided.**
        template:
          type: string
          description: The template content. **Required if template_id is not provided.**
        doc_format:
          type: string
          description: The format of the document
        doc_name:
          type: string
          description: The file name
        data:
          type: object
          additionalProperties: {}
          default: {}
          description: The template data
        options:
          type: object
          additionalProperties: {}
          description: The template rendering options
    DocumentTemplateList:
      type: object
      properties:
        count:
          type:
          - integer
          - 'null'
        next:
          type:
          - string
          - 'null'
          format: uri
        previous:
          type:
          - string
          - 'null'
          format: uri
        results:
          type: array
          items:
            $ref: '#/components/schemas/DocumentTemplate'
      required:
      - results
    APIError:
      type: object
      properties:
        message:
          type: string
          description: The error or warning message
        code:
          type: string
          description: The message code
        level:
          type: string
          description: The message level
        details:
          type: object
          additionalProperties: {}
          description: any additional details
    DocumentFileData:
      type: object
      properties:
        doc_file:
          type: string
          description: A base64 file to upload
        doc_name:
          type: string
          description: The file name
        doc_format:
          type:
          - string
          - 'null'
          description: The file format
        doc_type:
          type:
          - string
          - 'null'
          default: other
          description: "\n        Shipment document type\n\n        values: <br/>\n        `certificate_of_origin` `commercial_invoice` `pro_forma_invoice` `packing_list` `other`\n\n        For carrier specific packaging types, please consult the reference.\n        "
          maxLength: 50
      required:
      - doc_file
      - doc_name
  securitySchemes:
    JWT:
      in: header
      type: apiKey
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      description: 'Authorization: Bearer xxx.xxx.xxx'
    OAuth2:
      type: oauth2
      in: header
      name: Authorization
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize/
          tokenUrl: /oauth/token/
          scopes:
            read: Read access to Karrio data
            write: Write access to Karrio data
            openid: OpenID connect
      description: 'Authorization: Bearer xxxxxxxx'
    Token:
      type: apiKey
      in: header
      name: Authorization
      description: 'Authorization: Token key_xxxxxxxx'
    TokenBasic:
      type: http
      scheme: basic
      name: Authorization
      description: '-u key_xxxxxxxx:'