How to add multiple medias to a basket
You can do this post request :
POST /api/dam/baskets/{basketId}/medias-collection
{
"ids": [
64,
66,
67
]
}
add this 3 medias to a basket
It returns list of medias not added in basket with the reason. The HTTP code is 207 in this case.
Example of 207 response :
POST /api/dam/baskets/213/medias-collection
Content-Type: application/json
{
"ids": [
64,66,67,68,454545,5454441
]
}
Response :
{
"_embedded": {
"errors": [
{
"ids": [
64,
66,
67,
68
],
"detailError": {
"message": "User is not authorized to perform this action : Add media in basket.",
"code": "403"
}
},
{
"ids": [
454545,
5454441
],
"detailError": {
"message": "Entity was not found",
"code": "404"
}
}
]
}
}
The ids list in request is limited to 500.