Skip to main content

DPPs

The DppsResource class provides methods to manage Digital Product Passports (DPPs). A DPP acts as a digital twin of a physical product, capturing its entire lifecycle, provenance, and technical characteristics. All DPPs are organized under a parent Product Model.


Methods

list

Retrieves all Digital Product Passports associated with a specific Product Model.

Signature

async list(modelId: string, options?: RequestOptions): Promise<Dpps[]>

Parameters

ParameterTypeDescription
modelIdstringThe unique identifier of the parent Product Model.
optionsRequestOptions(Optional) Custom configuration for the request.

Returns

  • Promise<Dpps[]>: An array of DPP objects belonging to the model.

get

Fetches detailed information for a specific Digital Product Passport.

Signature

async get(modelId: string, id: string, options?: RequestOptions): Promise<Dpps>

Parameters

ParameterTypeDescription
modelIdstringThe unique identifier of the parent Product Model.
idstringThe unique identifier of the specific DPP.

create

Creates a new Digital Product Passport under a specific Model..

Signature

async create(modelId: string, data: CreateDpp, options?: RequestOptions): Promise<Dpps>

Example

const newDpp = await sdk.dpps.create("model_abc_123", {
name: "Serial Number #001",
code: "SN001",
description: "Unique passport for the first production unit",
});

Parameters

ParameterTypeDescription
modelIdstringThe ID of the Model this DPP should belong to.
dataCreateDppObject containing name, code, and description.

update

Updates the fields of an existing Digital Product Passport.

Signature

async update(modelId: string, id: string, data: UpdateDpp, options?: RequestOptions): Promise<Dpps>

Parameters

ParameterTypeDescription
modelIdstringThe unique identifier of the parent Product Model.
idstringThe unique identifier of the DPP to update.
dataUpdateDppThe fields to be updated (name, code, description, etc.).

delete

Permanently deletes a Digital Product Passport from the system.

Signature

async delete(id: string, options?: RequestOptions): Promise<void>

Parameters

ParameterTypeDescription
idstringThe unique identifier of the DPP to remove.

Error Handling

All methods will throw an SDKError if the API returns a failure or if the network is unreachable.

try {
const dpps = await sdk.dpps.list("invalid-id");
} catch (error) {
if (error instanceof SDKError) {
// Handle API error (e.g., 404 or 500)
console.error(error.message);
}
}