Use case / Subcontractor dispatch
Webhooks / Inbound
Use case / Document import

External Document Update With Payload

Changed on

Upload a document to a specific stop on a subcontracted trip.

This webhook uses Basic Auth (webhook credentials), not the OAuth credentials used for the API. Contact success@qargo.com to request credentials.


Query parameters

ParameterRequiredDescription
question_path_keyYesMaps the file to a document type in Qargo (e.g. CMR, POD, WEIGHT_NOTE)
stop_idYesThe Qargo UUID of the stop to attach the document to

Headers

HeaderRequiredDescription
Content-TypeYesMIME type of the file (e.g. application/pdf, image/jpeg)
Content-DispositionNoProvides the filename: attachment; filename="POD.pdf"

Filename handling

The uploaded file's name in Qargo is determined by:

  1. If Content-Disposition includes a filename — that value is used, combined with the question path key default. For example: filename="pod1234.pdf" with question path key default POD.pdf → stored as pod1234_POD.pdf.
  2. If no Content-Disposition is provided — the default filename from the question path key configuration is used.

Example

curl -X POST \
  "https://api.qargo.com/v1/webhook/subco-document-upload\
  ?question_path_key=POD&stop_id=<stop_uuid>" \
  -u "<webhook_client_id>:<webhook_secret_id>" \
  -H "Content-Type: application/pdf" \
  -H "Content-Disposition: attachment; filename=POD.pdf" \
  --data-binary @/path/to/document.pdf
post/v1/webhook/subco-document-upload

Request

  • Base URL: https://api.qargo.com
  • URL: https://api.qargo.com/v1/webhook/subco-document-upload
  • Auth: HTTP basic

Query parameters

question_path_keystring required

The question path key to map the file in Qargo, for example: CMR/POD

stop_idstring required

The stop ID to which the document is related

Request body

string binary required
OR
object required
OR
OR
string required
OR
integer required
OR
number required
OR
boolean required

Response

Successful Response

unknown required

Changes

    • breaking

      the request property contentMediaType changed from to application/octet-stream

    • info

      the request property format was generalized from binary to no format

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status