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