Download OpenAPI specification:Download
High performance, extensible cart that holds products for a later checkout.
Key Features:
Key Benefits:
Creates a new cart. When a cart is created, its status is set to open
.
Note: There can be only one open cart per customer. If another cart needs to be created for a specific customer, you need to update the existing cart's status to closed
.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
Use when you want to create a cart for a logged in customer.
The request was successful. Cart details are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The request could not be completed due to a conflict with the current state of the target resource.
Some server-side error occurred. Details will be provided in the response payload.
{- "siteCode": "main",
- "currency": "EUR",
- "type": "shopping",
- "sessionValidated": true
}
{- "cartId": "65141d687308095e25ca0671",
- "yrn": "urn:yaas:hybris:cart:cart-item:saastest2;65141d687308095e25ca0671"
}
Retrieves a cart's details based on the store's site code and criteria such as session ID or customer ID.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart details are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "id": "612c9ae63cff1d66f699b691",
- "yrn": "urn:yaas:hybris:cart:cart:saastest2;612c9ae63cff1d66f699b691",
- "customerId": "87413250",
- "currency": "EUR",
- "siteCode": "main",
- "sessionId": "YxXRjn9zSFM7gMq5dtNKarX7xYkIMV",
- "metadata": {
- "createdAt": "2021-08-30T08:46:30.780Z",
- "modifiedAt": "2021-08-30T08:46:30.786Z",
- "version": 1
}, - "leadTime": 0,
- "nonDelivery": [
- "5",
- "6"
]
}
Retrieves a specified cart's details.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart details are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "id": "6128cf97330cc7035fa1484c",
- "yrn": "urn:yaas:hybris:cart:cart:saastest2;6128cf97330cc7035fa1484c",
- "currency": "EUR",
- "siteCode": "main",
- "items": [
- {
- "id": "0",
- "itemYrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60",
- "quantity": 6,
- "effectiveQuantity": 6,
- "price": {
- "priceId": "5f5a3ce5fb29e20020be99c8",
- "originalAmount": 4.99,
- "effectiveAmount": 4.99,
- "currency": "EUR"
}
}
], - "sessionId": "YxXRjn9zSFM7gMq5dtNKarX7xYkIMV",
- "metadata": {
- "createdAt": "2021-08-27T11:42:15.709Z",
- "modifiedAt": "2021-08-30T10:32:46.711Z",
- "version": 1
}, - "leadTime": 0,
- "nonDelivery": [
- "5",
- "6"
]
}
Updates a specified cart's details.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The cart has been updated.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The request could not be completed due to a conflict with the current state of the target resource.
Some server-side error occurred. Details will be provided in the response payload.
{- "customerId": "87413250",
- "currency": "EUR",
- "deliveryWindowId": "60006da77ec20a807cd6f065",
- "type": "wishlist",
- "zipCode": "10115",
- "countryCode": "DE",
- "status": "OPEN",
- "deliveryWindow": {
- "id": "5b5572a61cf31a000f31eee4",
- "deliveryDate": "2023-06-06T12:00:00.000Z",
- "slotId": "5678-8756-3321-1234"
}, - "metadata": {
- "mixins": {
- "generalAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/orderGeneralAttributesMixIn.v9.json",
}
}, - "mixins": {
- "deliveryTime": {
- "deliveryDate": "2021-06-08T12:00:00.000Z",
- "deliveryTimeId": "5f5a3da02d48b9000d39798c"
}
}
}
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Deletes a specified cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The cart has been deleted.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Refreshes a specified cart and their items. In case the prices assigned to cart's items have been changed then these changes are recognized and reassigned to the cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The cart has been refreshed.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The request could not be completed due to a conflict with the current state of the target resource.
Some server-side error occurred. Details will be provided in the response payload.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Changes a specified cart's site. The following cart settings are changed according to the new site:
In case the new site uses a different currency, the endpoint sends a price match request to the Price Service. This ensures that items in cart display correct prices in the new site's currency.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
All item's currencies are updated.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "siteCode": "USA"
}
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Changes a specified cart's currency. The endpoint sends a price match request to the Price Service. This ensures that items in cart display correct prices in the new currency.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
All item's currencies are updated.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "currency": "USD"
}
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Merges a list of anonymous carts with the specified customer cart.
Note: The cart specified in the path parameter must belong to a logged in customer. Carts listed in the request body must belong to anonymous customers.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Carts have been merged.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "carts": [
- "60effb93e5545f246574fde2"
]
}
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Retrieves the lead time and non-delivery times for a specified cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart lead time and non delivery times are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "leadTime": 10,
- "nonDelivery": [
- "1",
- "3",
- "5"
]
}
Adds multiple products to the specified cart and creates cart items.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Items have been added to the cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
[- {
- "product": {
- "id": "5f5a3ce35bac380024b93cff",
- "yrn": "{productYrn}",
- "name": "Cherry Tomatoes",
- "description": "Guaranteed to be the sweetest tomato you have ever tasted! This super sweet bite sized tomato is juicy and bursting with flavor. They are great for snacking and in salads. Kids love them too!",
- "images": [
- {
- "id": "dbf2f8a4-1ff6-40a9-982f-1485ddb602e0",
}
]
}, - "quantity": 100,
- "price": {
- "priceId": "5f5a3ce5fb29e20020be99c8",
- "yrn": "{priceYrn}",
- "originalAmount": 4.99,
- "effectiveAmount": 4.99,
- "currency": "EUR",
- "measurementUnit": {
- "quantity": 100,
- "unitCode": "GRM"
}
}, - "weightDependent": true
}, - {
- "product": {
- "id": "5f5a3b435bac380024b93c88",
- "yrn": "{productYrn}",
- "name": "Black Tea",
- "description": "A pack of high-quality black tea to drink with your guests.",
- "images": [
- {
- "id": "4b4addad-9272-4435-83a0-4b5f1621208d",
}
]
}, - "quantity": 1,
- "price": {
- "priceId": "5f5a3b45fb29e20020be9976",
- "yrn": "{priceYrn}",
- "originalAmount": 2.29,
- "effectiveAmount": 2.29,
- "currency": "EUR",
- "measurementUnit": {
- "quantity": 1,
- "unitCode": "H87"
}
}, - "weightDependent": false
}
]
[- {
- "status": 201,
- "id": "1",
- "headers": {
- "location": "/carts/612cc4783cff1d66f699b6a1/items/1"
}, - "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60"
}, - {
- "status": 201,
- "id": "2",
- "headers": {
- "location": "/carts/612cc4783cff1d66f699b6a1/items/2"
}, - "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc61"
}
]
Retrieves all items added to the specified cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart items are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
[- {
- "id": "0",
- "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60",
- "itemYrn": "{productYrn}",
- "quantity": 6,
- "effectiveQuantity": 6,
- "price": {
- "priceId": "5f5a3b45fb29e20020be9976",
- "originalAmount": 2.29,
- "effectiveAmount": 2.29,
- "currency": "EUR"
}
}, - {
- "id": "1",
- "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60",
- "itemYrn": "{productYrn}",
- "quantity": 2,
- "effectiveQuantity": 2,
- "price": {
- "priceId": "5f59fe70fb29e20020be8f12",
- "originalAmount": 9.49,
- "effectiveAmount": 9.49,
- "currency": "EUR"
}
}
]
Adds a product to the specified cart and creates a cart item.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
cart.cart_manage_external_prices
Note: This scope is used to manage external prices, products and fees. It's required only when an external price, product or fee is provided.
The request was successful. The product has been added to the cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The request could not be completed due to a conflict with the current state of the target resource.
Some server-side error occurred. Details will be provided in the response payload.
{- "itemYrn": "{productYrn}",
- "price": {
- "priceId": "{priceId}",
- "effectiveAmount": 0.3582,
- "originalAmount": 0.3582,
- "currency": "EUR"
}, - "quantity": 6
}
{- "itemId": "5c3351aea9812100098ffc60",
- "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60"
}
Removes all products from the specified cart and deletes the cart items.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Products have been deleted from the cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Retrieves a specified cart item's details.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart item details are returned.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "id": "0",
- "yrn": "urn:yaas:saasag:caasproduct:product:saastest2;5c3351aea9812100098ffc60",
- "itemYrn": "{productYrn}",
- "quantity": 2,
- "effectiveQuantity": 2,
- "price": {
- "priceId": "5f59fe70fb29e20020be8f12",
- "originalAmount": 9.49,
- "effectiveAmount": 9.49,
- "currency": "EUR"
}
}
Updates a specified cart item.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The cart item has been updated.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The request could not be completed due to a conflict with the current state of the target resource.
Some server-side error occurred. Details will be provided in the response payload.
{- "itemYrn": "{productYrn}",
- "quantity": 5,
- "price": {
- "priceId": "5f59fe70fb29e20020be8f12",
- "originalAmount": 9.49,
- "effectiveAmount": 9.49,
- "currency": "EUR",
- "measurementUnit": {
- "quantity": 1,
- "unitCode": "H87"
}
}
}
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Removes a specified product from cart and deletes the cart item.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The item has been removed from cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Applies a discount on the specified cart. Multiple discount coupons can be applied to cart, but you need to send a separate request for each discount coupon.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The discount has been applied to cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The request could not be completed due to a conflict with the current state of the target resource.
Internal Server Error
{- "code": "DEVIZU",
- "amount": 10,
- "currency": "EUR",
- "name": "Thanksgiving coupon for all orders",
- "calculationType": "ApplyDiscountBeforeTax",
- "links": [
- {
- "title": "THANKSGIVING10",
- "rel": "validate",
- "type": "application/json",
}, - {
- "title": "THANKSGIVING10 redeem",
- "rel": "redeem",
- "type": "application/json",
}
]
}
{- "yrn": "{discountYrn}",
- "discountId": "1",
- "discountIndex": 0
}
Removes all discounts applied to the specified cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Discounts have been removed.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}
Returns all discounts of the specified cart.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. Cart discounts items are returned.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Some server-side error occurred. Details will be provided in the response payload.
[- {
- "id": "string",
- "yrn": "string",
- "couponYrn": "string",
- "code": "string",
- "amount": 0,
- "currency": "str",
- "discountRate": 0,
- "name": "string",
- "calculationType": "ApplyDiscountBeforeTax",
- "discountCalculationType": "SUBTOTAL",
- "valid": true,
- "links": [
- {
- "rel": "validate",
- "title": "string",
- "href": "string",
- "type": "application/json"
}, - {
- "rel": "validate",
- "title": "string",
- "href": "string",
- "type": "application/json"
}
], - "discountValidationDetails": {
- "message": "string",
- "details": [
- "string"
]
}, - "discountIndex": 0
}
]
Delete the discount in the cart by the provided discount Index.
cart.cart_manage
Note: This scope is only required for OAuth2 authorization method to authorize the request with the access_token
.
The request was successful. The discount has been removed from cart.
The request was syntactically incorrect. Details will be provided in the response payload.
Given request is unauthorized - the authorization token is invalid or has expired.
Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
Internal server error.
{- "code": 400,
- "status": "BAD_REQUEST",
- "message": "There are validation problems, see details section for more information"
}