We support a variety of methods to confirm orders:

Delivery Method Response Method Notes
Fax Voice An order is sent via fax with a confirmation number, followed by a phone call requesting that confirmation number
Online Online Unconfirmed orders are listed and confirmed via a dashboard
HTTP Post Response code An order in JSON format will be sent via post
Email Link An email is sent with a link to confirm

Http Post

In this method, an endpoint is provided by the third party which will accept an HTTP Post request with the data for an individual order. The receiving endpoint should respond with either a 200, indicating the order is good, or 400, indicating the order is bad.

The provided endpoint should expect a JSON object with these properties:

Property Type Notes
instructions String Instructions given by the user for the merchant
timePlaced Time Format: ISO 8601. The time that the order was submitted to our system
timeRequested Time Format: ISO 8601. The time that the user has requested the order be delivered, if it matches timePlaced, it is for ASAP
type String Either ‘pickup’ or ‘delivery’
merchant Object
merchant.name String
merchant.id Integer Our internal id for the merchant
merchant.address Address See below for Address format
customer Object
customer.id Integer
customer.firstName String
customer.lastName String
customer.email Email
customer.phone Phone 10 digit phone number without formatting (ex: 5554443434)
customer.address Address See below for Address format
charges Object A list of charges associated with the order, including the total, tip, and tax
charges.subtotal Float The total amount of the food and drinks
charges.deliveryFee Float The flat or percent fee charged for delivery
charges.preTax Array Array of charges that are applied to the order before tax (these are taxed as well)
charges.tax Float
charges.postTax Array Array of charges that are applied to the order after tax (these are not taxed)
charges.tip Float The amount of gratuity the customer has elected to pay
charges.total Float
cart Array Array of Cart Entities. See below for format

The charges referenced above in the ‘preTax’ and ‘postTax’ properties are formatted as such:

Property Type Notes
label String The name of the charge
amount Float The value of the charge

The Address object referenced above is formatted as such:

Property Type Notes
street String
unit String Used for apartment number, floor, or a nearby landmark/cross street
city String
state String Two letter format (ex: NY, NJ, CT)
zipCode String Five digit postal code
longitude Float
latitude Float

The array of Cart Entities is referenced above is a tree, based on the menu structure and selections. A selected Item may have a child OptionGroup or PriceGroup, each of which would have selected Options with their respective prices. Note that an Option could have child OptionGroups. See the Menu Structure documentation.

Property Type Notes
id Integer The unique id of the menu entity
thirdPartyId String|Null The id defined in the menu import, if applicable.
type String Item | PriceGroup | OptionGroup | Option
quantity Float
price Float (Item,Option only) The price of an individual entity, with the added cost of any options selected
extendedPrice Float (Item,Option only) The full price of the line item. (i.e. price * quantity)
instructions String (Item,Option only) Instructions given for the particular item or option (ex: no cheese)
children Array Array of Cart Entities

Example order JSON:

{
  "order": {
    "merchant": {
      "name": "NYC Pizzeria",
      "id": 1234,
      "address": {
        "street": "123 Broadway",
        "unit": "",
        "city": "NEW YORK",
        "state": "NY",
        "zipCode": "10001",
        "longitude": -74.005836,
        "latitude": 40.710125
      }
    },
    "customer": {
      "firstName": "John",
      "lastName": "Adams",
      "email": "JohnAdams@example.com",
      "phone": "5554447894",
      "address": {
        "street": "199 WATER ST",
        "unit": "",
        "city": "NEW YORK",
        "state": "NY",
        "zipCode": "10038",
        "longitude": -74.004271030426,
        "latitude": 40.706888574096
      }
    },
    "charges": {
      "subtotal": 24.95,
      "deliveryFee": 0,
      "preTax": [
        {
          "label" : "Convenience Fee",
          "amount" : 1.50
        }
      ],
      "tax": 2.61,
      "postTax": [
        {
          "label" : "Bag Fee",
          "amount" : 0.25
        }
      ],
      "tip": 4,
      "total": 33.33
    },
    "cart": [
      {
        "id": 16,
        "thirdPartyId": 26,
        "name": "Hawaiian Pizza",
        "type": "Item",
        "children": [
          {
            "id": 17,
            "thirdPartyId": 65,
            "name": "Pick One",
            "type": "PriceGroup",
            "children": [
              {
                "id": 18,
                "thirdPartyId": 24,
                "name": "16 Inch",
                "type": "Option",
                "children": [
                  {
                    "id": 117,
                    "thirdPartyId": 118,
                    "name": "16 Inch Pizza Toppings",
                    "type": "OptionGroup",
                    "children": [
                      {
                        "id": 130,
                        "thirdPartyId": 125,
                        "name": "Broccoli",
                        "type": "Option",
                        "children": [
                          
                        ],
                        "quantity": 1,
                        "price": 0,
                        "extendedPrice": 0,
                        "instructions": ""
                      },
                      {
                        "id": 125,
                        "thirdPartyId": 167,
                        "name": "Fresh Garlic",
                        "type": "Option",
                        "children": [
                          
                        ],
                        "quantity": 1,
                        "price": 0,
                        "extendedPrice": 0,
                        "instructions": ""
                      },
                      {
                        "id": 136,
                        "thirdPartyId": 185,
                        "name": "Jalapenos",
                        "type": "Option",
                        "children": [
                          
                        ],
                        "quantity": 1,
                        "price": 0,
                        "extendedPrice": 0,
                        "instructions": ""
                      }
                    ],
                    "quantity": 1,
                    "price": 0,
                    "extendedPrice": 0,
                    "instructions": ""
                  }
                ],
                "quantity": 1,
                "price": 0,
                "extendedPrice": 0,
                "instructions": ""
              }
            ]
          }
        ],
        "quantity": 1,
        "price": 0,
        "extendedPrice": 0,
        "instructions": ""
      }
    ],
    "id": 31478948,
    "instructions": "Ring the bell",
    "timePlaced": "2014-08-19T21:58:41+0000",
    "timeRequested": "2014-08-19T21:58:41+0000",
    "type": "pickup"
  }
}

If there is an error, the endpoint should return a 400 status code. An optional message may be passed in the ‘message’ namespace in a json response. This message will be attached to the order.

Example response JSON:

{
    "message" : "There was an internal error."
}