Skip to main content

DPP Translation and Viewing API

This API enables viewing a DPP (Digital Product Passport) and its associated resources (files, images, and tech cards) while supporting multilingual translation based on the language header provided in the request.


View Models

1. View DPP with Translation

GET /dpp/:dppId

Description: Fetches a DPP by its ID along with translated names, descriptions, associated files, images, and tech cards. The translation is based on the language provided in the language header.

Parameters:

  • dppId: The ID of the DPP to fetch (path parameter).
  • language: The target language for translation (header).

Headers:

  • language: The target language code (e.g., en for English, fr for French, etc.). Defaults to en if header not provided.

Response:

StatusDescription
200 OKSuccessfully fetched and translated the DPP.
400 Bad RequestMissing required parameters or invalid language header.
404 Not FoundThe specified DPP ID does not exist.
500 Internal Server ErrorAn error occurred while processing the request.

Response Object:

{
"dpp": {
"id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"type": "string",
"company_id": "string",
"model_id": "string",
"images": [
{
"image": "string",
"type": "string",
"uuid": "string"
}
],
"files": [
{
"id": "string",
"name": "string",
"description": "string",
"path": "string"
}
],
"cards": [
{
"id": "string",
"name": "string",
"description": "string",
"characteristics": [
{
"id": "string",
"characteristic": "string"
}
]
}
]
}
}