POST API/V40/Interactive/Cart/Items
Add an item to cart
Request Information
URI Parameters
None.
Body Parameters
The request model.
AddCartItemRequestName | Description | Type | Additional information |
---|---|---|---|
ItemCode |
This code actually relates to a CategoryItem - left unchanged for backwards compatibility |
string |
Required |
Quantity | integer |
Required |
|
PosItemCode | string | ||
Comments | string | ||
Options |
Modifiers realting to the CategoryItem that we want to add to the cart |
Collection of RequestCartItemOption | |
SessionToken |
The token associated with this session of API interactions. This token should always be included in API calls, because it contains important session state information. |
string |
Required |
Request Formats
application/json, text/json
{ "itemCode": "sample string 1", "quantity": 2, "posItemCode": "sample string 3", "comments": "sample string 4", "options": [ { "code": "sample string 1", "value": "sample string 2", "posItemCode": "sample string 3" }, { "code": "sample string 1", "value": "sample string 2", "posItemCode": "sample string 3" } ], "sessionToken": "sample string 5" }
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
ResponseContainerModelName | Description | Type | Additional information |
---|---|---|---|
SessionToken |
The token associated with this session of API interactions. Generally this is the same token passed with the API request parameters, but under certain circumstances this can be changed before being sent back to the caller. |
string | |
ResponsesIncluded |
A list of response messages names contained in this composite message, for easy pre-parsing. |
string | |
Responses |
A list of response messages contained in this composite message. |
Collection of Object | |
Status |
The success status the composite message. |
CompositeStatus |
Response Formats
application/json, text/json
{ "sessionToken": "JMSBIT0U3YgKAAAAAAAAAAAAAAA.49rqtPIpNJIwYG-jrzbrmSb3pbJWoovASPVTusYnIvA", "responsesIncluded": "addCartItemResponse", "responses": [ { "addCartItemResponse": { "content": { "cart": { "updatedDateTime": "2024-12-04T08:24:54.4191524+00:00", "items": [ { "code": "sample string 1", "categoryItemCode": "sample string 2", "title": "sample string 3", "price": 4.0, "quantity": 5, "imageUrl": "sample string 6", "comments": "sample string 7", "options": [ { "code": "sample string 1", "value": "sample string 2", "price": 3.0 }, { "code": "sample string 1", "value": "sample string 2", "price": 3.0 } ], "extraCharges": [ { "percent": 1.0, "isPercentage": true, "title": "sample string 2" }, { "percent": 1.0, "isPercentage": true, "title": "sample string 2" } ], "hasOnlySingleSelectRequiredModifiersWithNonZeroValues": true }, { "code": "sample string 1", "categoryItemCode": "sample string 2", "title": "sample string 3", "price": 4.0, "quantity": 5, "imageUrl": "sample string 6", "comments": "sample string 7", "options": [ { "code": "sample string 1", "value": "sample string 2", "price": 3.0 }, { "code": "sample string 1", "value": "sample string 2", "price": 3.0 } ], "extraCharges": [ { "percent": 1.0, "isPercentage": true, "title": "sample string 2" }, { "percent": 1.0, "isPercentage": true, "title": "sample string 2" } ], "hasOnlySingleSelectRequiredModifiersWithNonZeroValues": true } ], "extraCharges": [ { "price": 1.0, "isPercentage": false, "title": "sample string 2" }, { "price": 1.0, "isPercentage": false, "title": "sample string 2" } ] } }, "succeeded": true } } ], "status": "Success" }