Skip to content
ajar.Book a demo

Order prepare

starbucks.order.prepare

View connector

Prepare a pickup cart and return a time-bounded order preview

POST /v1/operations/starbucks.order.prepare

Headers

Authorization: Bearer YOUR_AJAR_API_KEY
x-starbucks-token: YOUR_STARBUCKS_ACCESS_TOKEN
Content-Type: application/json

Inputs

ParameterExample typeExample value
store_refstring"12198-1"
itemsarray[{"product_ref":"2333","product_id":"2333","quantity":1}]
fulfillmentstring"takeaway"
payment_method_refstring"11111111-2222-3333-4444-555555555555"

Example input

{
  "store_ref": "12198-1",
  "items": [
    {
      "product_ref": "2333",
      "product_id": "2333",
      "quantity": 1
    }
  ],
  "fulfillment": "takeaway",
  "payment_method_ref": "11111111-2222-3333-4444-555555555555"
}
Open JSON schema

Input schema

{
  "$id": "https://useajar.com/schemas/starbucks/order-prepare.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "fulfillment": {
      "const": "takeaway"
    },
    "items": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "customizations": {
            "maxItems": 0,
            "type": "array"
          },
          "product_id": {
            "pattern": "^[1-9][0-9]{0,15}$",
            "type": "string"
          },
          "product_ref": {
            "pattern": "^[1-9][0-9]{0,15}$",
            "type": "string"
          },
          "quantity": {
            "const": 1
          }
        },
        "required": [
          "product_ref",
          "product_id",
          "quantity"
        ],
        "type": "object"
      },
      "maxItems": 1,
      "minItems": 1,
      "type": "array"
    },
    "payment_method_ref": {
      "format": "uuid",
      "type": "string"
    },
    "store_ref": {
      "pattern": "^[1-9][0-9]{0,7}-[1-9][0-9]{0,7}$",
      "type": "string"
    }
  },
  "required": [
    "store_ref",
    "items",
    "fulfillment",
    "payment_method_ref"
  ],
  "title": "Starbucks order preparation input",
  "type": "object"
}