Developers · API endpoints

Documents

Upload, list and download model documents such as the EU Declaration of Conformity and test reports.

Version
v1.0.0
Base URL
https://dppapi-production.up.railway.app/v1
Format
JSON · OpenAPI 3.1
FeedbackLast updated

Cet article n'est pas encore disponible en français ; il est affiché ci-dessous en anglais.

Documents belong to a model. The EU Declaration of Conformity is a required data point (Annex XIII 1(r)); test reports are Annex XIII Point 3 and visible to authorities only.

Files must be PDF, JPEG or PNG and at most 25 MB. The content is checked against the declared type, so a renamed file is refused.

Personalise the samples. Paste a test key and every snippet uses it — and your own model and passport ids.

POST/v1/models/{id}/documents
write scope

Upload a document

A multipart/form-data upload with one file and its metadata. Send the text fields before the file part: the upload is read as a stream, and fields that precede the file are guaranteed to be seen with it. The samples use that order.

Parameters1

  • idstringpathrequired

    The model id.

Request body · multipart/form-data, fields before the file4

  • filefilerequired

    PDF, JPEG or PNG, up to 25 MB.

  • typestringrequired

    Document type: "EU Declaration of Conformity", "Test Report", "Due Diligence Report", "Carbon Footprint Study" or "Safety Data Sheet".

  • point"1" | "3"optional

    Annex XIII point: 1 (default) for public documents, 3 for authority-only test reports.

  • namestringoptional

    Display name. Defaults to the file name.

Headers2

  • Idempotency-Keystringheaderoptional

    Optional. A unique string per logical operation (a UUID is ideal). The first response is stored for 24 hours and replayed for retries; see Idempotency.

  • X-DPP-Dry-Run"true"headeroptional

    Optional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.

Responses

  • 201Created — The stored document.

Errors7

Webhooks fired

POST /v1/models/{id}/documents
curl -X POST "https://dppapi-production.up.railway.app/v1/models/cm1q8x2k40003l70f9a8s7d6e/documents" \-H "Authorization: Bearer $DPP_API_KEY" \-F "type=EU Declaration of Conformity" \-F "file=@declaration.pdf;type=application/pdf"
201 Created · The stored document.
{"id": "cm1q9a3fz0011l70fk8m2n4p6","modelId": "cm1q8x2k40003l70f9a8s7d6e","name": "DoC C48-15.pdf","type": "EU Declaration of Conformity","point": 1,"mimeType": "application/pdf","size": 482113,"createdAt": "2027-01-15T09:20:00.000Z"}
GET/v1/documents
read scope

List documents

Documents across your models, newest first, a page at a time, each with its downloadUrl.

Parameters4

  • limitintegerqueryoptional

    Page size, 1–200. Default 50.

  • cursorstringqueryoptional

    The next_cursor of the previous page. Omit for the first page.

  • model_idstringqueryoptional

    Only documents of this model.

  • typestringqueryoptional

    Only this document type (case-insensitive), e.g. EU Declaration of Conformity.

Responses

  • 200OK — A page of documents.

Errors2

Response fields · 200

object
  • has_morebooleanrequired
  • next_cursorstring | nullrequired

    Pass as cursor to get the next page.

GET /v1/documents
curl "https://dppapi-production.up.railway.app/v1/documents?model_id=cm1q8x2k40003l70f9a8s7d6e" \-H "Authorization: Bearer $DPP_API_KEY"
200 OK · A page of documents.
{"data": [{"id": "cm1q9a3fz0011l70fk8m2n4p6","modelId": "cm1q8x2k40003l70f9a8s7d6e","name": "DoC C48-15.pdf","type": "EU Declaration of Conformity","point": 1,"mimeType": "application/pdf","size": 482113,"downloadUrl": "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6/download","createdAt": "2027-01-15T09:20:00.000Z"}],"has_more": true,"next_cursor": "eyJpZCI6ImNtMXE4eTBicTAwMDZsNzBmeDl5OHo3dzYifQ"}
GET/v1/documents/{id}
read scope

Get a document

One document’s metadata and its downloadUrl.

Parameters1

  • idstringpathrequired

    The document id.

Responses

  • 200OK — The document.

Errors2

  • 401unauthorized The key is missing, unknown or revoked.
  • 404Not found No document with this id in your organisation.

Response fields · 200

object
  • idstring
  • modelIdstring
  • namestring
  • typestring
  • pointinteger

    Annex XIII point: 1 public, 3 authority only.

  • mimeTypestring
  • sizeinteger
  • downloadUrlstring
  • createdAtstring · date-time
GET /v1/documents/{id}
curl "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6" \-H "Authorization: Bearer $DPP_API_KEY"
200 OK · The document.
{"id": "cm1q9a3fz0011l70fk8m2n4p6","modelId": "cm1q8x2k40003l70f9a8s7d6e","name": "DoC C48-15.pdf","type": "EU Declaration of Conformity","point": 1,"mimeType": "application/pdf","size": 482113,"downloadUrl": "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6/download","createdAt": "2027-01-15T09:20:00.000Z"}
GET/v1/documents/{id}/download
read scope

Download a document

The file itself, with its original content type.

Parameters1

  • idstringpathrequired

    The document id.

Responses

  • 200OK — The file bytes (application/pdf, image/jpeg or image/png).

Errors2

  • 401unauthorized The key is missing, unknown or revoked.
  • 404Not found No document with this id in your organisation.
GET /v1/documents/{id}/download
curl "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6/download" \-H "Authorization: Bearer $DPP_API_KEY"
200The file bytes (application/pdf, image/jpeg or image/png).

Préférences en matière de cookies

Vous choisissez les cookies utilisés. Vous pouvez modifier votre choix à tout moment via « Paramètres des cookies » en bas de page. Politique de confidentialité

Nécessaires

Toujours actifs

Indispensables au fonctionnement du site : votre thème clair/sombre et ce choix de cookies sont enregistrés dans votre navigateur. Ils ne servent pas à vous suivre.

Analyse

Google Analytics 4 mesure l’utilisation des pages au moyen de statistiques, ce qui nous aide à améliorer le site. Si vous acceptez, il dépose des cookies et mesure votre visite en détail. Si vous refusez, il ne dépose aucun cookie, mais Google peut tout de même recevoir des données techniques, comme la page consultée, le type de navigateur et l’adresse IP.

_ga, _ga_* · jusqu’à 2 ans · Google