Bu makale İngilizce olarak mevcuttur.
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.
/v1/models/{id}/documentsUpload 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
idstringpathrequiredThe model id.
Request body · multipart/form-data, fields before the file4
filefilerequiredPDF, JPEG or PNG, up to 25 MB.
typestringrequiredDocument type: "EU Declaration of Conformity", "Test Report", "Due Diligence Report", "Carbon Footprint Study" or "Safety Data Sheet".
point"1" | "3"optionalAnnex XIII point:
1(default) for public documents,3for authority-only test reports.namestringoptionalDisplay name. Defaults to the file name.
Headers2
Idempotency-KeystringheaderoptionalOptional. 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"headeroptionalOptional, live keys. Validate the write in full and store nothing. Test keys always dry-run; see Test keys.
Responses
- 201Created — The stored document.
Errors7
- 400
No file uploadedThe form has no file part. - 400
Document type requiredThetypefield is missing. - 401
unauthorizedThe key is missing, unknown or revoked. - 403
insufficient_scopeThe key has nowritescope. - 404
Model not foundNo such model in your organisation. - 413
File too largeOver 25 MB. - 415
Unsupported file typeNot PDF, JPEG or PNG.
Webhooks fired
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"{"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"}/v1/documentsList documents
Documents across your models, newest first, a page at a time, each with its downloadUrl.
Parameters4
limitintegerqueryoptionalPage size, 1–200. Default 50.
cursorstringqueryoptionalThe
next_cursorof the previous page. Omit for the first page.model_idstringqueryoptionalOnly documents of this model.
typestringqueryoptionalOnly this document type (case-insensitive), e.g.
EU Declaration of Conformity.
Responses
- 200OK — A page of documents.
Errors2
- 400
Validation faileddetailsnames each invalid field. - 401
unauthorizedThe key is missing, unknown or revoked.
Response fields · 200
object- idstring
- modelIdstring
- namestring
- typestring
- pointinteger
Annex XIII point: 1 public, 3 authority only.
- mimeTypestring
- sizeinteger
- downloadUrlstring
- createdAtstring · date-time
- has_morebooleanrequired
- next_cursorstring | nullrequired
Pass as
cursorto get the next page.
curl "https://dppapi-production.up.railway.app/v1/documents?model_id=cm1q8x2k40003l70f9a8s7d6e" \-H "Authorization: Bearer $DPP_API_KEY"{"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"}/v1/documents/{id}Get a document
One document’s metadata and its downloadUrl.
Parameters1
idstringpathrequiredThe document id.
Responses
- 200OK — The document.
Errors2
- 401
unauthorizedThe key is missing, unknown or revoked. - 404
Not foundNo 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
curl "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6" \-H "Authorization: Bearer $DPP_API_KEY"{"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"}/v1/documents/{id}/downloadDownload a document
The file itself, with its original content type.
Parameters1
idstringpathrequiredThe document id.
Responses
- 200OK — The file bytes (
application/pdf,image/jpegorimage/png).
Errors2
- 401
unauthorizedThe key is missing, unknown or revoked. - 404
Not foundNo document with this id in your organisation.
curl "https://dppapi-production.up.railway.app/v1/documents/cm1q9a3fz0011l70fk8m2n4p6/download" \-H "Authorization: Bearer $DPP_API_KEY"application/pdf, image/jpeg or image/png).