Allocates products in a cart
POST/api/v1/eventim/cart/allocateProducts
Adds a specified quantity of a product to an existing cart. Products can be allocated globally or scoped to a specific event session:
- Global products: Omit both EventId and EventSessionId. The product is added to the cart without session association.
- Session-scoped products: Provide both EventId and EventSessionId. The product allocation is linked to that specific event session.
EventId and EventSessionId must be provided together or both omitted. The response includes the cart item details with pricing breakdown, including base amount (per unit) and itemized fees.
Examples
Success (200) - Session-scoped product
{
"cartId": 45892,
"cartItemDetail": {
"cartItemId": 12034,
"productId": 80075,
"eventId": 57,
"eventSessionId": 89,
"quantity": 2,
"amount": 15.00,
"fees": 2.50,
"feesDetails": [
{ "colId": 2, "amount": 1.50 },
{ "colId": 3, "amount": 1.00 }
]
}
}
Success (200) - Global product
{
"cartId": 45892,
"cartItemDetail": {
"cartItemId": 12035,
"productId": 80073,
"quantity": 1,
"amount": 25.00,
"fees": 0.00,
"feesDetails": []
}
}
Error 400 - Missing x-tenant header
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "Bad Request",
"status": 400,
"detail": "Tenant header 'x-tenant' is required"
}
Error 400 - Validation failed
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "Bad Request",
"status": 400,
"detail": "CartId must be greater than 0"
}
Error 400 - EventId and EventSessionId mismatch
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "Bad Request",
"status": 400,
"detail": "EventId and EventSessionId must be both set or both null"
}
Error 404 - Cart not found
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Not Found",
"status": 404,
"detail": "Cart with ID 99999 was not found",
"errorCode": 12004
}
Error 404 - Product not found
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Not Found",
"status": 404,
"detail": "Product with ID 99999 was not found",
"errorCode": 10400
}
Error 409 - Product out of stock
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.10",
"title": "Conflict",
"status": 409,
"detail": "Product with ID 80069 is out of stock",
"errorCode": 10401
}
Error 409 - Insufficient stock
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.10",
"title": "Conflict",
"status": 409,
"detail": "Requested quantity 100 for product 80065 exceeds available stock 10",
"errorCode": 10402
}
Error 500 - Server error
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.6.1",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred",
"traceId": "00-a1b2c3d4e5f6-789012345678-00"
}
Request
Responses
- 200
- 400
- 404
- 409
- 500
OK
Bad Request
Not Found
Conflict
Internal Server Error