Qargo Use case / Document import API

This section provides an overview of all available methods to import documents into Qargo. ![Document import paths overview](/docs/static/document_import_overview.svg) ### Document import methods There are five ways to get documents into Qargo, grouped by domain: #### Operational #### 1. Generic document import webhook The most flexible option for importing documents at the **order level**. Query parameters are fully configurable per integration and are used to pass file metadata and order matching criteria. Only order-level document types are supported. - **Scope**: Order-level - **Auth**: Basic Auth (webhook credentials) - **Query parameters**: Configurable per integration (`filename` is always required) - **Supported content**: Binary files, text, or base64-encoded content See the [generic document import webhook](/docs/use-case-document-import/document-import-webhook) for full details. #### Master Data #### 2. Synchronous API upload Upload documents directly via the REST API. Used for master data synchronisation (e.g. importing reference documents). Suited for integrations that require a synchronous response. - **Scope**: Master data (sync / import) - **Auth**: OAuth2 (API credentials) See the [document upload endpoint](/docs/api-document/upload_document_content_v1_documents_document_upload_content_post) for full details. #### 3. Subcontractor document upload webhook Upload documents linked to a specific **stop** on a subcontracted trip. Uses fixed query parameters for stop identification and document type mapping. - **Scope**: Stop-level (subcontractor trips) - **Auth**: Basic Auth (webhook credentials) - **Query parameters**: `question_path_key`, `stop_id` See the [subcontractor document upload webhook](/docs/use-case-subcontractor-dispatch/subcontractor-document-upload-webhook) for full details and example. #### 4. Fleet document upload webhook Upload documents linked to a specific **stop** or **stop group** on a fleet-dispatched trip. Same pattern as the subcontractor variant. - **Scope**: Stop-level (fleet trips) - **Auth**: Basic Auth (webhook credentials) - **Query parameters**: `question_path_key`, `stop_id`, `stop_group_id` See the [fleet document upload webhook](/docs/use-case-fleet-dispatch/fleet-document-upload-webhook) for full details and example. #### Accounting #### 5. E-invoicing webhook Import structured purchase invoices or credit notes, optionally with file attachments (e.g. invoice PDF, CMR). Supports JSON, XML (UBL/Peppol), and multipart uploads. - **Scope**: Purchase invoices / credit notes - **Auth**: Basic Auth (webhook credentials) - **Formats**: JSON, XML (Peppol UBL), multipart/form-data - **Attachments**: Supported via `attachments` array (base64-encoded) in JSON, or as additional parts in multipart uploads See the [e-invoicing webhook](/docs/use-case-e-invoicing/e-invoicing-webhook) for full details, format examples, and attachment handling. ### Choosing the right method | Method | Domain | Scope | Auth | Best for | |--------|--------|-------|------|----------| | Generic document import | Operational | Order | Basic Auth | CMR, POD, packing lists — any order-level document | | Subcontractor document upload | Operational | Stop | Basic Auth | POD/CMR from subcontractor systems (per stop) | | Fleet document upload | Operational | Stop / Stop group | Basic Auth | POD/CMR from fleet apps (per stop or stop group) | | Synchronous API upload | Master Data | Master data | OAuth2 | Reference document synchronisation | | E-invoicing | Accounting | Invoice / Credit note | Basic Auth | Purchase invoices via Peppol, EDI, or custom format | > **Note:** The generic document import webhook currently supports **order-level document types only**. For stop-level documents, use the subcontractor or fleet document upload webhooks.

Operations 1

POST /v1/webhook/document-import Generic Document Import #

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/qargo:qargo-use-case-document-import-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

qargo-use-case-document-import-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Qargo TMS Use case / Document import API
  description: For support, please contact integrations@qargo.com.
  version: 1.2.0
servers:
- url: https://api.qargo.com
tags:
- name: Use case / Document import
  description: This section provides an overview of all available methods to import documents into Qargo.
paths:
  /v1/webhook/document-import:
    post:
      tags:
      - Use case / Document import
      summary: Generic Document Import
      description: Webhook for importing documents and attaching them to existing orders in Qargo.
      operationId: document-import-webhook
      security:
      - BasicAuthWebhookCredentials: []
      parameters:
      - name: filename
        in: query
        required: true
        schema:
          type: string
          description: Name of the file being uploaded, including extension. This is used as the primary source for the file name in Qargo.
          title: Filename
        description: Name of the file being uploaded, including extension. This is used as the primary source for the file name in Qargo.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
              - type: string
                format: binary
              - type: object
              - type: array
                items: {}
              - type: string
              - type: integer
              - type: number
              - type: boolean
              - type: 'null'
              description: The document content as binary file data or a JSON message.
              title: File
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentImportResponse'
        '400':
          description: Bad Request — invalid input or malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized — missing or invalid authentication credentials
        '403':
          description: Forbidden — insufficient permissions for this operation
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests — rate limit exceeded. See the `Retry-After` header
        '500':
          description: Internal Server Error
        '503':
          description: Service Unavailable — temporarily unable to handle the request
components:
  schemas:
    ErrorStatus:
      properties:
        error_type:
          $ref: '#/components/schemas/ErrorType'
        error_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Error Message
          description: (User visible) error message
      type: object
      required:
      - error_type
      title: ErrorStatus
    ValidationErrorResponse:
      properties:
        message:
          description: Human-readable summary of the validation failure
          title: Message
          type: string
        errors:
          description: One entry per validation failure. Always present and non-empty — a single failure yields a one-item array, so integrators can handle one and many the same way.
          items:
            $ref: '#/components/schemas/ValidationErrorDetail'
          minItems: 1
          title: Errors
          type: array
      required:
      - message
      - errors
      title: ValidationErrorResponse
      type: object
    ValidationErrorDetail:
      properties:
        message:
          description: Human-readable summary of this validation failure
          title: Message
          type: string
        field:
          anyOf:
          - type: string
          - type: 'null'
          default: null
          description: Name of the field that failed validation, if known
          title: Field
        path:
          anyOf:
          - type: string
          - type: 'null'
          default: null
          description: JSON path to the field within the request payload (e.g. '$.consignor.address.country')
          title: Path
        detail:
          anyOf:
          - type: string
          - type: object
          - type: 'null'
          default: null
          description: Additional structured context about the failure, if provided by the backend
          title: Detail
      required:
      - message
      title: ValidationErrorDetail
      type: object
    ErrorType:
      type: string
      enum:
      - USER_INPUT_ERROR
      - INTERNAL_ERROR
      - NOT_SUPPORTED
      title: ErrorType
    DocumentImportResponse:
      properties:
        errors:
          anyOf:
          - items:
              $ref: '#/components/schemas/ErrorStatus'
            type: array
          - type: 'null'
          title: Errors
          description: List of errors that occurred during the webhook processing. If empty/omitted, the webhook was processed successfully.
          examples:
          - error_message: The payload is invalid.
            error_type: USER_INPUT_ERROR
          - error_message: Not supported.
            error_type: NOT_SUPPORTED
          - error_message: Unknown error.
            error_type: INTERNAL_ERROR
      type: object
      title: DocumentImportResponse
      description: 'Response schema for the document import webhook.

        This schema is used to return errors or success messages.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /v1/auth/token
    BasicAuthWebhookCredentials:
      type: http
      scheme: basic
x-tagGroups:
- name: Use cases
  tags:
  - Use case / Accounting
  - Use case / Customer portal
  - Use case / Document import
  - Use case / E-invoicing
  - Use case / Fleet dispatch
  - Use case / Intermodal [partner]
  - Use case / Location booking
  - Use case / Master data sync
  - Use case / Order
  - Use case / Subcontractor dispatch
  - Use case / Tracking
  - Use case / Trip import
  - Use case / Visibility
- name: API
  tags:
  - API / Accounting
  - API / Authentication
  - API / Company
  - API / Document
  - API / Order
  - API / Resource
  - API / Task
  - API / Trip
- name: System
  tags:
  - System
- name: Webhooks
  tags:
  - Webhooks / Inbound
  - Webhooks / Outbound
- name: ''
  tags: []