POST /commerce/{accountId}/baskets

This endpoint creates a Basket for the store.

Path parameters

  • accountId string Required

    Default value is empty.

application/json

Body

  • storeId string Required

    ID of the store the basket is happening for.

    Default value is empty.

  • fulfillment object
    Hide fulfillment attribute Show fulfillment attribute object
    • type string Required

      Values are pickup, delivery, eatIn, or dispatch. Default value is pickup.

  • items array[object]
    Hide items attributes Show items attributes object
    • menuId string Required
    • plu string Required

      Default value is 3F_COMBO.

    • quantity integer(int32) Required

      Default value is 2.

    • note string
    • subItems array[object]
      Hide subItems attributes Show subItems attributes object
      • plu string Required

        Default value is A_FRS.

      • customizationPlu string Required
      • quantity integer(int32) Required

        Default value is 1.

      • note string
  • customer object
    Hide customer attributes Show customer attributes object
    • name string
    • companyName string
    • phoneNumber string
    • email string
    • externalId string
    • tin string

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string
    • created string
    • updated string
    • deleted boolean

      Default value is true.

    • etag string
    • accountId string
    • storeId string
    • currency string
    • taxExclusive boolean

      Default value is true.

    • status string
    • items array[object]
      Hide items attributes Show items attributes object
      • menuId string
      • plu string
      • name string
      • quantity integer

        Default value is 0.

      • note string
      • price integer

        Default value is 0.

      • gross integer

        Default value is 0.

      • taxes array
      • net integer

        Default value is 0.

      • subItems array[object]
        Hide subItems attributes Show subItems attributes object
        • customizationPlu string
        • plu string
        • name string
        • quantity integer

          Default value is 0.

        • price integer

          Default value is 0.

        • subItems array
      • discounts array
      • discountTotal integer

        Default value is 0.

    • payment object
      Hide payment attributes Show payment attributes object
      • tips array
      • discountsTotal integer

        Default value is 0.

      • chargesTotal integer

        Default value is 0.

      • taxTotal integer

        Default value is 0.

      • tipTotal integer

        Default value is 0.

      • total integer

        Default value is 0.

    • customer object
      Hide customer attributes Show customer attributes object
      • name string
      • companyName string
      • phoneNumber string
      • email string
      • externalId string
      • tin string
    • fulfillment object
      Hide fulfillment attribute Show fulfillment attribute object
      • type string
    • charges object
      Hide charges attributes Show charges attributes object
      • taxTotal integer

        Default value is 0.

      • netTotal integer

        Default value is 0.

      • grossTotal integer

        Default value is 0.

      • serviceCharge object
        Hide serviceCharge attributes Show serviceCharge attributes object
        • type string
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

      • bagFee object
        Hide bagFee attributes Show bagFee attributes object
        • type string
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

      • deliveryFee object
        Hide deliveryFee attributes Show deliveryFee attributes object
        • type string
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

    • taxes array
    • discounts array
  • 422 application/json

    Unprocessable Entity

    Hide response attributes Show response attributes object
    • code string Required
    • message string Required
    • context object Required
      Hide context attributes Show context attributes object
      • menuId string Required
      • plu string Required
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
{
  "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"
}