Arranging designs
- Last updated on May 15, 2025
- •
- 4 minutes to read
If you need different product categories, you can organize your designs into folders with the names of these categories. For example, you may have the following folder structure:
/Commercial Printing
/Business Cards
/Letter-size Flyer
/Tabloid-size Poster
...
Creating folders
The endpoint POST /api/storage/v1/designs/folders
creates a single folder in the Designs asset section. To create a new folder /Commercial Printing/Business Cards, you need to make two requests:
Create Commercial Printing in the root folder with the following request body.
{ "name": "Commercial Printing", "path": "/" }
Create Business Cards in Commercial Printing with the following request body.
{ "name": "Business Cards", "path": "Commercial Printing" }
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/folders" \
-H "accept: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d "{\"name\":\"Commercial Printing\",\"path\":\"/\"}"
To get the list of all folders in the Designs asset section, use the endpoint GET /api/storage/v1/designs/folders/all
. To retrieve the list of subfolders with their content, make a request to GET /api/storage/v1/designs/folders/content-by-path
. The endpoint POST /api/storage/v1/designs/{id}
duplicates designs and folders.
Batch operations
The Asset Storage API allows you to perform batch operations on assets and folders:
When copying, you can assign new names to assets and folders. New elements will keep the metadata, however, they will get new IDs. Since original items stay intact, you need to perform deletion after copying to implement the move function.
The endpoint POST /api/storage/v1/designs/batch-copy
takes the following object in the request body.
{
"entityIds": [
"61790db31079e200f24ff92c", "652686bb3507abfadd354e83"
],
"folderIds": [
"6649a16e396239641d1b91dc"
],
"conflictStrategy": "Abort",
"path": "Cards"
}
To pass the folder identifiers, you can get them by getting the entire folder list with GET /api/storage/v1/designs/folders/all
or by path with GET /api/storage/v1/designs/folders/content-by-path
. The folder specified in the path
must exist.
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/batch-copy" \
-H "accept: */*" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d "{\"entityIds\":[\"61790db31079e200f24ff92c\",\"652686bb3507abfadd354e83\"],\"folderIds\":[\"6649a16e396239641d1b91dc\"],\"conflictStrategy\":\"Abort\",\"path\":\"Cards\"}"
The endpoint POST /api/storage/v1/designs/batch-delete
also allows you to delete several assets and folders at once. In the request body, pass an object like this:
{
"entityIds": [
"6649c593396239641d1b920f", "6649c593396239641d1b9210"
],
"folderIds": [
"6649a0b1396239641d1b91db", "6649c592396239641d1b920e"
]
}
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/batch-delete" \
-H "accept: */*" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d "{\"entityIds\":[\"6649c593396239641d1b920f\",\"6649c593396239641d1b9210\"],\"folderIds\":[\"6649a0b1396239641d1b91db\",\"6649c592396239641d1b920e\"]}"
Conflict resolving strategy
When copying files and folders, there may be situations when there is an item with the same name in the destination folder. This results in an error. To resolve such errors automatically, a conflict resolving strategy was introduced. In the request parameters, you have already used the conflictStrategy
with the Abort
value, which aborts the request if the desired item name exists in the assets.
The following actions are available:
Abort
— the operation is canceled.Overwrite
— the existing file or folder is deleted, and a new one takes its place.Rename
— the existing file remains unchanged, and a unique name is generated for the new one.Skip
— the operation is skipped for the existing file.
Further Reading
- Learn how to get a design list using this API.
- Explore how to configure retention policy of assets.
- Dive into Asset Storage API reference.