Files
The Digital Product Passport Files API allows you to manage the lifecycle of DPP Files, including creating, viewing, updating, and deleting DPP Files.
A DPP files allows you to upload file, with name and description, to the DPP object.

1. Create DPP File
POST /models/:modelId/dpps/:dppId/upload-file
Request Body
{
"dpp_type": "uuid",
"model_id": "uuid",
"template_id": "uuid",
"code": "string",
"version": "string",
"name": "string",
"description": "string",
"company_id": "uuid"
}
Response
Status | Description |
---|---|
200 OK | File uploaded successfully and the corresponding record created. |
400 Bad Request | No file provided or error parsing request body. |
500 Internal Server Error | Failed to upload the file or unexpected error occurred during creation. |
Response Object
{
"message": "DPP created successfully",
"ok": true,
"dpp": {
"id": "uuid",
"template_id": "uuid",
"code": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"description": "string",
"company_id": "uuid",
"model_id": "uuid",
"type": "string",
"search_id": "string",
"images": [
{
"id": "uuid",
"created_at": "string",
"model_id": "uuid",
"template_id": "uuid",
"image": "string",
"type": "string",
"uuid": "uuid"
}
]
}
}
2. view DPP Files
GET /view-dpp-files/:dppId
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the list of DPP files with their signed URLs. |
500 Internal Server Error | Failed to fetch the DPP files or generate their signed URLs. |
Response Object
{
{
"message": "DPP created successfully",
"ok": true,
"dpp": {
"id": "string",
"template_id": "string",
"code": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"description": "string",
"company_id": "string",
"model_id": "string",
"type": "string",
"search_id": "string",
"images": [
{
"id": "string",
"created_at": "string",
"model_id": "string",
"template_id": "string",
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
}
}
3. view DPP File
GET /models/:modelId/view-dpp-file/:dppId/file/:fileId
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the DPP file with its signed URL |
406 Not Acceptable | The specified DPP file was not found. |
500 Internal Server Error | Failed to fetch the DPP file or generate its signed URL. |
Response Object
{
{
"message": "DPP created successfully",
"ok": true,
"dpp": {
"id": "string",
"template_id": "string",
"code": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"description": "string",
"company_id": "string",
"model_id": "string",
"type": "string",
"search_id": "string",
"images": [
{
"id": "string",
"created_at": "string",
"model_id": "string",
"template_id": "string",
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
}
}
4. Update DPP Files
PUT /models/:modelId/update-dpp-file/:dppId/file/:fileId
Request Body
{
"dpp_type": "string",
"model_id": "string",
"code": "string",
"version": "string",
"name": "string",
"description": "string",
"company_id": "string",
"user_id": "string"
}
Response
Status | Description |
---|---|
200 OK | File updated successfully with new information and signed URL. |
400 Bad Request | Error parsing request body or missing required fields. |
406 Not Acceptable | The specified file or DPP was not found. |
500 Internal Server Error | Failed to update the file or unexpected error occurred during the update. |
Response Object
{
{
"message": "DPP updatet successfully",
"ok": true,
"dpp": {
"id": "string",
"template_id": "string",
"code": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"description": "string",
"company_id": "string",
"model_id": "string",
"type": "string",
"search_id": "string",
}
}
}
5. Delete DPP Files
DELETE /models/:modelId/delete-dpp-file/:dppId/file/:fileId
Response
Status | Description |
---|---|
200 OK | File deleted successfully from the database and storage. |
406 Not Acceptable | The specified file or DPP was not found. |
500 Internal Server Error | Failed to delete the file or unexpected error occurred during the deletion. |
Request Body
{
"dpp_type": "string",
"model_id": "string",
"code": "string",
"version": "string",
"name": "string",
"description": "string",
"company_id": "string",
"user_id": "string"
}
Response Object
{
{
"message": "DPP created successfully",
"ok": true,
"dpp": {
"id": "string",
"template_id": "string",
"code": "string",
"created_at": "string",
"updated_at": "string",
"name": "string",
"description": "string",
"company_id": "string",
"model_id": "string",
"type": "string",
"search_id": "string",
"images": [
{
"id": "string",
"created_at": "string",
"model_id": "string",
"template_id": "string",
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
}
}