API referenceCartItem
Creates a CartItem resource.
Creates a CartItem resource.
POST
/api/carts/{cartId}/cart_items/batch_createcurl -X POST "/api/carts/{cartId}/cart_items/batch_create" \
-H "apikey: $MEDIALISTER_API_KEY" \
-H "Content-Type: application/ld+json" \
-d '{
"cartItems": [
{
"product": "/api/formats/0a097745-ff39-4659-8cae-a9bfb596a124"
},
{
"product": "/api/formats/0a097745-ff39-4659-8cae-a9bfb596a123"
},
{
"product": "/api/formats/0a097745-ff39-4659-8cae-a9bfb596a122"
}
],
"campaign": "/api/campaigns/abcd32bd-a699-4f3e-bb19-ea807a0a6fc8"
}'Authorization
apikeystringheaderrequiredValue for the apikey header parameter.
Parameters
cartIdstringpathrequiredCart identifier
Body
application/ld+json
The new CartItem resource
cartItemsany[]requiredcampaignstring
Response
application/ld+json
CartItem resource created
@contextone of@idstringrequired@typestringrequireditemsCartItem.jsonld-cartItem.batchCreated[]
{
"@context": "string",
"@id": "string",
"@type": "string",
"items": [
{
"@context": "string",
"@id": "string",
"@type": "string"
}
]
}