Helps to create, update a basket with products, and promotions.
The basket PUT request is divided into two parts to eliminate complete syncing errors. Part 1: the initial basket setup and send, and Part 2: Flag as complete with final send.
Part 1 generates the basket ID, which can then be used for updates and also to attach transactions. It is always the first thing that must be done.
Part 2 completes the basket, which disables all further modifications in anyway.
If you would like to add transactions to the basket, then it should be done in between part 1 and part 2. Please see the transaction PUT and transactiomn PUT APIs for details as to how this works.
The endpoint you need to use for this is:
/basket| Key | Details | Example |
|---|---|---|
| Authorization* | {token_type} {access_token} | Bearer c3499c2729730a7f807efb8676a92dcb6f8a3f8f |
| Method* | PUT | N/A |
| x-accept-version | {recommended_latest_version_number} | 2 |
* Required header
NOTE: To update just supply the object id.
| Key | Details | Data Type |
|---|---|---|
| baskets[{basketId}].storeId | Store Id | Int |
| baskets[{basketId}].consumerId | Consumer Id | Int |
| baskets[{basketId}].name | Name | String |
| baskets[{basketId}].note | Basket Note | String |
| baskets[{basketId}].basketProducts | Basket Products | Array |
| basketProducts[{basketProductId}].price | Modified Price | String |
| basketProducts[{basketProductId}].quantity | Basket Product Qty | Int |
| basketProducts[{basketProductId}].note | Basket Product Note | String |
| basketProducts[{basketProductId}].added | Time since added | Bool / Int |
| basketProducts[{basketProductId}].productInstanceId | Product Instance Id | Int |
| Key | Details | Data Type | Example |
|---|---|---|---|
| statusCode | Very important to check this for any error. 201 for success. | int | 201 |
| Key | Details | Data Type |
|---|---|---|
| baskets[{basketId}].id | unique basket Id | Int |
| baskets[{basketId}].storeId | Store Id | Int |
| baskets[{basketId}].consumerId | Consumer Id | Int |
| baskets[{basketId}].name | Name | String |
| baskets[{basketId}].note | Note | String |
| baskets[{basketId}].basketProducts | Basket Products | Array |
| basketProducts[{basketProductId}].price | Modified Price | String |
| basketProducts[{basketProductId}].quantity | Basket Product Qty | Int |
| basketProducts[{basketProductId}].note | Basket Product Note | String |
| basketProducts[{basketProductId}].added | Time since added | Bool / Int |
| basketProducts[{basketProductId}].productInstanceId | Product Instance Id | Int |
| Key | Details | Example |
|---|---|---|
| Authorization* | {token_type} {access_token} | Bearer c3499c2729730a7f807efb8676a92dcb6f8a3f8f |
| Method* | PUT | N/A |
| x-accept-version | {recommended_latest_version_number} | 2 |
* Required header
NOTE: To update just supply the object id.
| Key | Details | Data Type |
|---|---|---|
| baskets[{basketId}].id | unique basket Id | Int |
| baskets[{basketId}].storeId | Store Id | Int |
| baskets[{basketId}].consumerId | Consumer Id | Int |
| baskets[{basketId}].completed | Is Complete / Time since complete | Bool / Int |
| baskets[{basketId}].name | Name | String |
| baskets[{basketId}].note | Note | String |
| baskets[{basketId}].basketProducts | Basket Products | Array |
| basketProducts[{basketProductId}].price | Modified Price | String |
| basketProducts[{basketProductId}].quantity | Basket Product Qty | Int |
| basketProducts[{basketProductId}].note | Basket Product Note | String |
| basketProducts[{basketProductId}].added | Time since added | Bool / Int |
| basketProducts[{basketProductId}].productInstanceId | Product Instance Id | Int |
| Key | Details | Data Type | Example |
|---|---|---|---|
| statusCode | Very important to check this for any error. 201 for success. | int | 201 |
| Key | Details | Data Type |
|---|---|---|
| baskets[{basketId}].id | unique basket Id | Int |
| baskets[{basketId}].storeId | Store Id | Int |
| baskets[{basketId}].consumerId | Consumer Id | Int |
| baskets[{basketId}].completeDate | Complete Date | Date |
| baskets[{basketId}].name | Name | String |
| baskets[{basketId}].note | Note | String |
| baskets[{basketId}].basketProducts | Basket Products | Array |
| basketProducts[{basketProductId}].price | Modified Price | String |
| basketProducts[{basketProductId}].quantity | Basket Product Qty | Int |
| basketProducts[{basketProductId}].note | Basket Product Note | String |
| basketProducts[{basketProductId}].added | Time since added | Bool / Int |
| basketProducts[{basketProductId}].productInstanceId | Product Instance Id | Int |
Please check the live API calls for more details on the API messages.
| ID | Status Code | Title | Details |
|---|---|---|---|
| 908 | 401 | Expired Token | Token expired or invalid. Please renew your token |
| 911 | 401 | Authorization Header Invalid | The authorization header is invalid. The correct format is Authorization: {token_type} {accessToken} |
| 919 | 429 | Cannot handle too many request | There is a limit for every object you can send to our server and you are exceding that. |
| 913 | 400 | Required parameter or object missing in request | One or more of the required parameters or object formation is missing in your request. Please refer the documentation |
| 904 | 401 | Access Denied | Access denied for the request |
| 912 | 403 | Resource Not Allowed For Specified User | The user does not own this resource and its forbidden |
| 899 | 500 | Unknown Error | Something went wrong. Please contact the site administrator |
Please check the live API calls for more details on the API messages.
| ID | Status Code | Title | Details |
|---|---|---|---|
| 202 | 200 | Token is valid | Token is validated and found valid. |
| 206 | 201 | Resource Created | Your resource is created partially or fully. Please check further message or process log |