Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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 methodsThere are five ways to get documents into Qargo, grouped by domain:#### Operational#### 1. Generic document import webhookThe 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 contentSee the [generic document import webhook](/docs/use-case-document-import/document-import-webhook) for full details.#### Master Data#### 2. Synchronous API uploadUpload 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 webhookUpload 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 webhookUpload 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 webhookImport 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 uploadsSee 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.

Qargo Use case / Document import API is one of 26 APIs that Qargo publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Use case / Document import. The published artifact set on APIs.io includes an OpenAPI specification and an API reference.

This API exposes 4 operations across 4 paths, and defines 9 schemas. It is described by OpenAPI 3.1.0, at version 1.2.0.

Requests are made against a single base URL, https://api.qargo.com.

4 operations 4 paths 9 schemas 4 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.2.0
Base URL
https://api.qargo.com
Authentication
OAuth 2.0, HTTP Basic
Resource Areas
1

Authentication & Security 2

Qargo Use case / Document import API declares 2 security schemes for authenticating requests. It supports OAuth 2.0 (oAuth2ClientCredentials) using the clientCredentials flow. It accepts HTTP basic authentication (BasicAuthWebhookCredentials).

Paths & Operations 4

Across 4 paths, the API surfaces 4 operations — 4 POST. Each is listed below with its method, path, parameters, and response codes.

Use case / Document import 4

This section provides an overview of all available methods to import documents into Qargo. ![Document import paths overview](/docs/static/documentimportoverview.svg) Document impo…

POST
/v1/documents/document/upload_content
Upload Document Content
Upload_document_content_v1_documents_document_upload_content_post body → 201400401403422429500503
POST
/v1/webhook/document-import
Generic Document Import
document-import-webhook 1 param body → 200400401403422429500503
POST
/v1/webhook/fleet-document-upload
External Document Upload From A Fleet Application
fleet-document-upload-webhook 3 params body → 200400401403422429500503
POST
/v1/webhook/subco-document-upload
External Document Update With Payload
subcontractor-document-upload-webhook 2 params body → 200400401403422429500503

Schemas 9

The contract defines 9 schemas that model the data the API accepts and returns. The most detailed are ValidationErrorDetail (4 properties), ValidationError (3 properties), ErrorStatus (2 properties), ValidationErrorResponse (2 properties). Each schema is shown below with its type and property counts.

ErrorType
string
ValidationError
object
3 properties 3 required
ErrorStatus
object
2 properties 1 required
Body_Upload_document_content_v1_documents_document_upload_content_post
object
1 property 1 required
HTTPValidationError
object
1 property
ValidationErrorResponse
object
2 properties 2 required
DocumentImportResponse
object
Response schema for the document import webhook. This schema is used to return errors or success messages.
1 property
DocumentUploadResponse
object
1 property 1 required
ValidationErrorDetail
object
4 properties 1 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

qargo-use-case-document-import-api-openapi.yml Raw ↑

Other APIs Qargo publishes across the network.

Qargo Subcontractor API
Qargo Customer API
Qargo API / Accounting API
Qargo API / Authentication API
Qargo API / Company API
Qargo API / Document API
Qargo API / Order API
Qargo API / Resource API
Qargo API / Task API
Qargo API / Trip API
Qargo System API
Qargo Use case / Accounting API