Create Basket Run in API Explorer
Ask AI
This endpoint creates a Basket for the store.
POST
/commerce/{accountId}/baskets
curl \
--request POST 'https://api.staging.deliverect.com/commerce/{accountId}/baskets' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"items":[{"plu":"PR1234","note":"extra salt please","menuId":"62********************3w","quantity":2,"subItems":[{"plu":"MOD123","quantity":1,"customizationPlu":"CATOPT3"}]},{"plu":"PR5678","menuId":"62********************3w","quantity":1}],"storeId":"67********************2c","customer":{"tin":"123456789","name":"John Doe","email":"john.doe@acme.com","externalId":"crm-id-1234","companyName":"ACME","phoneNumber":"+3211223344"},"fulfillment":{"time":"YYYY-MM-DDTHH:mm:ss.SSSSSSZ","type":"pickup"}}'
Request examples
Pickup
{
"items": [
{
"plu": "PR1234",
"note": "extra salt please",
"menuId": "62********************3w",
"quantity": 2,
"subItems": [
{
"plu": "MOD123",
"quantity": 1,
"customizationPlu": "CATOPT3"
}
]
},
{
"plu": "PR5678",
"menuId": "62********************3w",
"quantity": 1
}
],
"storeId": "67********************2c",
"customer": {
"tin": "123456789",
"name": "John Doe",
"email": "john.doe@acme.com",
"externalId": "crm-id-1234",
"companyName": "ACME",
"phoneNumber": "+3211223344"
},
"fulfillment": {
"time": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"type": "pickup"
}
}
{
"items": [
{
"plu": "PR1234",
"note": "extra salt please",
"menuId": "62********************3w",
"quantity": 2,
"subItems": [
{
"plu": "MOD123",
"quantity": 1,
"customizationPlu": "CATOPT2"
}
]
},
{
"plu": "PR5678",
"menuId": "62********************3w",
"quantity": 1
}
],
"storeId": "67********************2c",
"customer": {
"tin": "123456789",
"name": "John Doe",
"email": "john.doe@acme.com",
"externalId": "crm-id-1234",
"companyName": "ACME",
"phoneNumber": "+3211223344"
},
"fulfillment": {
"type": "delivery",
"address": {
"line": "5030 W Lovers Ln, Dallas, TX 75209, US",
"note": "first floor, left door, happy dog",
"coordinates": [
32.850713,
-96.828014
]
}
}
}
{
"items": [
{
"plu": "PR1234",
"note": "extra salt please",
"menuId": "62********************3w",
"quantity": 2,
"subItems": [
{
"plu": "MOD123",
"quantity": 1,
"customizationPlu": "CATOPT2"
}
]
},
{
"plu": "PR5678",
"menuId": "62********************3w",
"quantity": 1
}
],
"storeId": "67********************2c",
"customer": {
"tin": "123456789",
"name": "John Doe",
"email": "john.doe@acme.com",
"externalId": "crm-id-1234",
"companyName": "ACME",
"phoneNumber": "+3211223344"
},
"fulfillment": {
"spot": "table-5",
"type": "eatIn"
}
}
{
"items": [
{
"plu": "PR1234",
"note": "extra salt please",
"menuId": "62********************3w",
"quantity": 2,
"subItems": [
{
"plu": "MOD123",
"quantity": 1,
"customizationPlu": "CATOPT2"
}
]
},
{
"plu": "PR5678",
"menuId": "62********************3w",
"quantity": 1
}
],
"storeId": "67********************2c",
"customer": {
"tin": "123456789",
"name": "John Doe",
"email": "john.doe@acme.com",
"externalId": "crm-id-1234",
"companyName": "ACME",
"phoneNumber": "+3211223344"
},
"fulfillment": {
"type": "dispatch",
"offer": {
"price": 1000,
"available": true,
"expiresAt": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"validationId": "62********************3e",
"pickupTimeETA": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deliveryTimeETA": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ"
},
"address": {
"line": "5030 W Lovers Ln, Dallas, TX 75209, US",
"note": "first floor, left door, happy dog",
"coordinates": [
32.850713,
-96.828014
]
}
}
}
Response examples (200)
{
"id": "65********************e2",
"etag": "f4c8f20eeb23206c2bc8cf66c2843a6efaa3eaaf",
"items": [
{
"id": "65********************27",
"net": 747,
"plu": "QS-01",
"name": "Classic Quesadilla + Drink",
"note": "as much cheese as possible!",
"gross": 698,
"price": 529,
"taxes": [
{
"name": "GST",
"rate": 7000,
"amount": 49
}
],
"menuId": "64********************7b",
"quantity": 1,
"subItems": [
{
"plu": "DRNK-01",
"name": "Coca Cola",
"note": "Extra cold please",
"price": 169,
"quantity": 1,
"subItems": [],
"customizationPlu": "MOD-01"
}
],
"discounts": [],
"discountTotal": 0
},
{
"id": "691327c5d367f4588f9482fb",
"net": 318,
"plu": "645611577",
"name": "Chocolate Chip Cookie",
"note": "In seperate bag please",
"gross": 318,
"price": 159,
"taxes": [],
"menuId": "6902550da160cca419af2469",
"quantity": 2,
"subItems": [],
"discounts": [],
"discountTotal": 0
}
],
"taxes": [
{
"name": "SALES_TAX",
"amount": 49
}
],
"status": "open",
"channel": 20000,
"charges": {
"bagFee": {
"net": 0,
"tax": 0,
"gross": 0,
"value": 0,
"taxRate": 0
},
"netTotal": 0,
"taxTotal": 0,
"grossTotal": 0,
"deliveryFee": {
"net": 0,
"tax": 0,
"gross": 0,
"value": 0,
"taxRate": 0
},
"serviceCharge": {
"net": 0,
"tax": 0,
"type": "fixed",
"gross": 0,
"value": 0,
"taxRate": 0
}
},
"created": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"deleted": false,
"payment": {
"tips": [],
"total": 1065,
"subTotal": 1016,
"taxTotal": 56,
"tipTotal": 0,
"chargesTotal": 0,
"discountsTotal": 0
},
"storeId": "67********************a8",
"updated": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
"category": {
"type": "restaurant"
},
"currency": "USD",
"customer": {
"tin": "123456789",
"name": "John Doe",
"email": "john.doe@acme.com",
"externalId": "crm-id-1234",
"companyName": "ACME",
"phoneNumber": "+3211223344"
},
"accountId": "66********************d1",
"discounts": [],
"fulfillment": {
"time": null,
"type": "pickup"
},
"taxExclusive": true,
"channelLinkId": "67********************a8",
"channelOrderId": null,
"channelOrderDisplayId": null
}
Response examples (422)
{
"code": "product_snoozed",
"context": {
"plu": "123",
"menuId": "63********************b5"
},
"message": "Product is currently snoozed"
}