Validate Order POST /publicapi/v1/validate-order This API validates new orders. The endpoint validates the input but does not issue and charges or transmit the order to the restaurant. Returns the validated order.

Returns: Order
Parameters
Description
Location
Type
Value
Name
The API key of the Restaurant for which this order would be placed, discoverd via restaurant search.
body
string
restaurantApiKey
An array of selected items and customizations. Only apiKey, comments, and customizationChoices are inspected.
body
items
Delivery method, either 'pickup' or 'delivery'.
body
string
method
Payment method, either 'cash' or 'card'.
body
string
payment
Designates whether or not the order is a test order. Test orders do not process credit card payment and can be used to test sending orders without being charged. Test orders may only be sent to restaurants marked as test restaurants. Defaults to false if omitted.
body
boolean
test
A tip for the delivery driver.
body
number
tip
Instructions or comments for preparation or delivery.
body
string
comments
The card that would be charged for 'card' payment. If 'apiKey' is present, a saved card would be used (discovered via User sign-in or registration). Otherwise a new card would be created.
body
card
The address for 'delivery' method. If 'apiKey' is present, a saved address would be used (discovered via User sign-in or registration). Otherwise a new address would be created.
body
address
The recipient of this order. If 'apiKey' is present, the existing user's details would be used (discovered via User sign-in or registration). In addition, firstName, lastName, and phone can be overridden in this object. If no apiKey is present, the order would be placed as a guest.
body
recipient

Curl

curl -X POST \
 -H 'X-Access-Token: __API_EXPLORER_AUTH_KEY__' \
 -H 'Content-Type: application/json' \
 -d '{
  "restaurantApiKey": "90fd4587554469b1f15b4f2e73e761809f4b4bcca52eedca",
  "items": [
    {
      "apiKey": "11949568",
      "customizationChoices": [
        {
          "apiKey": "105372479"
        }
      ],
      "comments": "Pile it high!"
    }
  ],
  "method": "pickup",
  "payment": "cash",
  "test": "false",
  "card": {
    "apiKey": null
  },
  "address": {
    "apiKey": null
  },
  "recipient": {
    "apiKey": "485ca34bedf9153e7ecdb0c1c698d2cee41ee9406039e889"
  }
}' \
 'https://eatstreet.com/publicapi/v1/validate-order'