Basket tags
This relation allows to associate tags to the current basket.
4.78.0+
List all basket tags
GET /api/dam/baskets/{basketId}/tags
This request returns a list of all given basket (with ID = basketId) tags.
Check if tag exist in basket
GET /api/dam/baskets/{basketId}/tags/{tagId}
This request returns the given tag (with text = tagId) if found for given basket (with ID = basketId), otherwise the HTTP status of the response will be 404
.
Add a tag
Example :
POST /api/dam/baskets/{basketId}/tags
{
"tag": "Critical"
}
This request add a single tag to a basket. Idempotent method: The HTTP status of the response will be 201
if the tag is added with success or if it already exists.
Remove a tag
Example :
DELETE /api/dam/baskets/{basketId}/tags/{tagId}
This request deletes a single tag from a basket. If the tag is removed with success, the HTTP status of the response will be 204
.
Possible errors are :
-
400
(basket-tag-size_exceeded): If given tag exceeds 265 characters (DB field size) -
401
(security-notAuthorized): Provided authorization is incomplete or invalid -
403
(basket-tags-access-denied): User needs admin access -
404
(basket-tag-not-found) : Requested tag with text tagId does not exist -
404
(basket-not-found) : Requested basket with id = basketId does not exist -
500
(basket-tags-internal-server-error): Internal server error
Remove all basket tags
DELETE /api/dam/baskets/{basketId}/tags
This request deletes all tags from a basket. If the tags are removed with success, the HTTP status of the response will be 204
.
Basket tags collection
This relation allows to associate multiple tags to the current basket.
4.78.0+
Add tags
Example :
POST /api/dam/baskets/{basketId}/tags-collection
{
"tags": [
"Urgent",
"Long terme",
"Ready"
]
}
This request add multiple tags to a basket. Idempotent method, if the tags are added with success, the HTTP status of the response will be 201
.
Remove tags
Example :
DELETE /api/dam/baskets/{basketId}/tags-collection
{
"tags": [
"Long term",
"Ready"
]
}
This request deletes multiple tags from a basket. Idempotent method, if the tags are removed with success, the HTTP status of the response will be 204
.
Possible errors are :
-
400
(basket-tags-max_exceeded): Number of given tags exceeds 1000 -
400
(basket-tag-size_exceeded): If at least one of the given tags exceeds 265 characters (DB field size) -
401
(security-notAuthorized): Provided authorization is incomplete or invalid -
403
(basket-tags-access-denied): User needs admin access -
404
(basket-not-found) : Requested basket with id = basketId does not exist -
500
(basket-tags-internal-server-error): Internal server error