Skip to main content

DPP Versioning

The DPP Versioning API allows for the management of version histories for Digital Product Passports (DPPs). Through this API, users can create and view different versions of a DPP, including associated files and technical cards. Each version of a DPP records its unique data and history, providing a comprehensive log of changes over time.

1. View DPP Versions

GET /view-dpp-versions/:dppId

Description: Retrieves all versions and associated history for a given Digital Product Passport (DPP) identified by dppId. This includes version details, files, technical cards, and their characteristics.

Parameters:

  • dppId: The ID of the DPP for which versions are being retrieved.

Response

StatusDescription
200 OKSuccessfully fetched DPP versions along with their files and cards.
500 Internal Server ErrorAn error occurred while fetching DPP versions.

Response Object

{
"versions": [
{
"version": "string",
"uri": "string",
"files": [
{
"id": "string",
"name": "string",
"description": "string",
"type": "string",
"path": "string",
"url": "string"
}
],
"cards": [
{
"id": "string",
"name": "string",
"description": "string",
"characteristics": [
{
"id": "string",
"characteristic": "string"
}
]
}
]
}
]
}

2. Create DPP Version

POST /version/:dppId/create

Description: Creates a new version for a Digital Product Passport (DPP) and stores its history, including files and technical cards.

Parameters:

  • dppId: The ID of the DPP for which the version is being created.
  • versionId: The ID of the new version being created.

Request Body

{
"dppId": "string",
"versionId": "string"
}

Response

StatusDescription
200 OKConfirmation that the DPP version and associated histories have been successfully created.
500 Internal Server ErrorAn error occurred during the creation of the DPP version.

Response Object

{
"message": "DPP version and associated histories have been successfully created",
"ok": true
}