Models
The Models API provides operations for managing models within the system. This includes viewing, creating, updating, and deleting models. Models represent key entities in the system and is associated with Digital Product Passports (DPPs) and templates.
The model creation is the first step to do nefore creating the DPP. It allows you to create the model of the product you are referring to.

1. View All Models
GET /view-models/:companyId
Description: Fetches all models for a specific company.
Parameters:
companyId
(query parameter) - The ID of the company whose models are to be fetched.
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the list of models with their images. |
500 Internal Server Error | Error fetching models or generating signed URLs for images. |
Response Object
{
"models": [
{
"id": "string",
"name": "string",
"company_id": "string",
"type": "string",
"images": [
{
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
{
"id": "string",
"name": "string",
"company_id": "string",
"type": "string",
"images": [
{
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
]
}
2. View Model
GET /view-model/:modelId
Description: Fetches details of a specific model by its ID.
Parameters:
modelId
(path parameter) - The ID of the model to be fetched.
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the model and its images. |
406 Not Acceptable | Model not found or failed to fetch images for the model. |
500 Internal Server Error | Unexpected error occurred while fetching model data or images. |
Response Object
{
"model": {
"id": "string",
"name": "string",
"company_id": "string",
"type": "string",
"images": [
{
"image": "string",
"type": "string",
"uuid": "string"
}
]
}
}
3. Create Model

POST /create-model
Description: Creates a new model for a company.
Request Body:
{
"company_id": "string",
"name": "string",
"type": "string",
"images": [
{
"uuid": "string",
"file": "file"
}
]
}
Response
Status | Description |
---|---|
200 OK | Model created successfully along with its images. |
400 Bad Request | Error parsing form data. |
403 Forbidden | No active subscription found or model limit reached. |
406 Not Acceptable | No plan info found or no active models found for the company. |
500 Internal Server Error | Error occurred during model creation or image upload. |
Response Object
{
"message": "Model created successfully",
"model": {
"id": "uuid",
"name": "string",
"created_at": "string",
"updated_at": "string",
"company_id": "uuid",
"type": "string",
"images": [
{
"uuid": "uuid",
"image": "string",
"type": "string"
},
{
"uuid": "uuid",
"image": "string",
"type": "string"
}
]
},
"ok": true
}
4. Update Model
PUT /update-model/:modelId
Description: Updates an existing model by its ID.
Parameters:
modelId
(path parameter) - The ID of the model to be updated.
Request Body:
{
"company_id": "string",
"name": "string",
"type": "string",
"images": [
{
"uuid": "string",
"file": "file"
}
]
}
Response
Status | Description |
---|---|
200 OK | Model updated successfully with its new data and images. |
400 Bad Request | Error parsing form data. |
406 Not Acceptable | Failed to fetch existing images for the model |
500 Internal Server Error | Error occurred during model update or image processing. |
Response Object
{
"ok": true,
"message": "Model updated successfully",
"model": {
"id": "uuid",
"name": "string",
"created_at": "string",
"updated_at": "string",
"company_id": "uuid",
"type": "string",
"images": [
{
"uuid": "uuid",
"image": "string",
"type": "string"
},
{
"uuid": "uuid",
"image": "string",
"type": "string"
}
]
}
}
5. Delete Model
DELETE /delete-model/:modelId
Description: Deletes a model by its ID.
Parameters:
modelId
(path parameter) - The ID of the model to be deleted.
Response
Status | Description |
---|---|
200 OK | Model deleted successfully along with its associated data. |
403 Forbidden | No active subscription found for the company. |
406 Not Acceptable | Model not found. |
500 Internal Server Error | Error occurred during model deletion or updating subscription data. |
Response Object
{
"message": "Model deleted successfully",
"ok": true
}