Send Order POST /publicapi/v1/send-order This API processes new orders. The endpoint validates the input, charges the user's payment card (if card payment is selected), and transmits the order to the restaurant.

Returns: Order
Parameters
Description
Location
Type
Value
Name
The API key of the Restaurant for which this order is 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 will 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 to be charged for 'card' payment. If 'apiKey' is present, a saved card will be used (discovered via User sign-in or registration). Otherwise a new card will be created.
body
card
The address for 'delivery' method. If 'apiKey' is present, a saved address will be used (discovered via User sign-in or registration). Otherwise a new address will be created.
body
address
The recipient of this order. If 'apiKey' is present, the existing user's details will 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 will 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/send-order'