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

Este artículo aún no está disponible en español; se muestra a continuación en inglés.

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).

Preferencias de cookies

Tú decides qué cookies se usan. Puedes cambiar tu elección en cualquier momento desde «Configuración de cookies» en el pie de página. Política de privacidad

Necesarias

Siempre activas

Imprescindibles para que el sitio funcione: tu tema claro/oscuro y esta elección de cookies se guardan en tu navegador. No sirven para rastrearte.

Analítica

Google Analytics 4 mide cómo se usan las páginas mediante estadísticas, lo que nos ayuda a mejorar el sitio. Si aceptas, instala cookies y mide tu visita por completo. Si rechazas, no instala cookies, pero Google aún puede recibir datos técnicos como la página vista, el tipo de navegador y la dirección IP.

_ga, _ga_* · hasta 2 años · Google