Cards
The Template Cards API allows you to manage the lifecycle of template cards, including creating, viewing, updating, and deleting them.
A template cards allows you to upload text data, as key and value format, to the DPP object.

1. Create Template Card
POST /create-template-card/:templateId
Description: Create a new template card for a specific template.
Request Body
{
"name": "string",
"description": "string",
"characteristics": [
{
"name": "string",
"description": "string"
}
]
}
Response
Status | Description |
---|---|
200 OK | Template card created successfully along with its characteristics. |
400 Bad Request | Invalid request body or characteristics are not iterable. |
500 Internal Server Error | An error occurred while creating the Template card. |
Response Object
{
"message": "Template card created successfully",
"ok": true,
"template_card": {
"id": "string",
"template_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"characteristics": [
{
"id": "string",
"template_card_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
}
]
}
}
2. View Template Cards
GET /view-template-cards/:templateId
Description: Retrieve all template cards for a specific template.
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the list of Template cards with their characteristics. |
500 Internal Server Error | An error occurred while fetching the Template cards data. |
Response Object
{
"message": "Template cards retrieved successfully",
"ok": true,
"template_cards": [
{
"id": "string",
"template_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"characteristics": [
{
"id": "string",
"template_card_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
}
]
}
]
}
3. View Template Card
GET /view-template-card/:templateId/:cardId
Description: Retrieve the details of a specific template card.
Response
Status | Description |
---|---|
200 OK | Successfully retrieved the Template card with its characteristics. |
406 Not Acceptable | The specified Template card was not found. |
500 Internal Server Error | An error occurred while fetching the Template card data. |
Response Object
{
"message": "Template card retrieved successfully",
"ok": true,
"template_card": {
"id": "string",
"template_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"characteristics": [
{
"id": "string",
"template_card_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
}
]
}
}
4. Update Template Card
PUT /update-template-card/:templateId/:cardId
Description: Modify the details of an existing template card.
Request Body
{
"name": "string",
"description": "string",
"characteristics": [
{
"id": "string",
"name": "string",
"description": "string"
}
]
}
Response
Status | Description |
---|---|
200 OK | Template card updated successfully with new characteristics. |
400 Bad Request | Invalid request body or characteristics are not iterable. |
406 Not Acceptable | Template card not found with the specified ID. |
500 Internal Server Error | An error occurred while updating the Template card. |
Response Object
{
"message": "Template card updated successfully",
"ok": true,
"template_card": {
"id": "string",
"template_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"characteristics": [
{
"id": "string",
"template_card_id": "string",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string"
}
]
}
}
5. Delete Template Card
DELETE /delete-template-card/:templateId/:cardId
Description: Delete an existing template card.
Response
Status | Description |
---|---|
200 OK | Template card and its characteristics deleted successfully. |
500 Internal Server Error | An unexpected error occurred during the deletion process. |
Response Object
{
"message": "Template card deleted successfully",
"ok": true
}
6. Delete Card Characteristic
DELETE /characteristic/:characteristicId
Description: Delete a single card characteristic.
Response
Status | Description |
---|---|
200 OK | Card characteristic deleted successfully. |
500 Internal Server Error | An unexpected error occurred during the deletion process. |
Response Object
{
"message": "Characteristic deleted successfully",
"ok": true
}