Order API

Placing an order with an exisiting user account must be authenticated with the user's password. Authenticated requests simply have an additional HTTP header:

X-NAAMA-AUTHENTICATION: username="[email]", response="[hash code]", version="1"

The hash code above is a SHA256 digest, hex encoded, of a few pieces of information about the request.

hashcode = SHA256( SHA256([password]) + [email] + [uri] )

Notice that the password is first SHA256 digested, it is never sent across in clear text. The URI does not include the domain, so it would be something like /u/test@example.com . NB this authentication is in addition to the standard client authentication.

Guest Order Place an order without an account.

POST /o/[rid]

Try it out

 

Ordr.in's unique restaurant identifier for the restaurant you're placing the order at.

 

The tray is composed of menu items and optional sub-items. A single menu item's format is: [menu item id]/[qty],[option id],[option id]... Multiple menu items are joined by a +: [menu item id]/[qty]+[menu item id2]/[qty2] For example: 3270/2+3263/1,3279 Means 2 of menu item 3270 (with no sub options) and 1 of item num 3263 with sub option 3279.

 

Tip amount in dollars and cents.

 

Either ASAP or in the date format 2 digit month - 2 digit date, i.e. January 21 would be 01-21

 

(Required if delivery_date is not ASAP) Format is 2 digit hour (24 hour time) and 2 digit minutes, i.e. 9:30 PM would be 21:30.

 

The customer's first name.

 

The customer's last name.

 

The delivery location's street address.

 

The delivery location's city.

 

The delivery location's state.

 

The delivery location's zip.

 

The customer's phone number.

 

The customer's email address.

 

(Optional) If provided a new user accont will get created with the above email address.

 

Full name as it appears on the credit card.

 

The customer's credit card number.

 

3 or 4 digit card security code.

 

The customer's credit card expiration date in mm/yyyy format.

 

The customer's billing street address.

 

(Optional) The second part of the customer's biling street address.

 

The customer's billing city.

 

The customer's billing state as a 2 letter state code. I.E. NY for New York.

 

The customer's billing 5 digit postal code.

 

The customer's billing phone number.

 

This call returns an object with the following properties:

 

If there was an error this is set to 1, otherwise it's 0.

 

Ordr.in's unique reference String for this order. Only exists if the order was successful.

 

(Optional) Our delivery partener's reference number for this order.

 

Either says that the order was completed, or gives information about an error.

 

This is an end user visible error or success message message.

 

User Order Place an order with a user account, but don't use a saved card or address.

POST /o/[rid]

Try it out

 

The user's email address

 

The user's SHA encoded password. API Explorer forms will automatically encode it for you.

 

Ordr.in's unique restaurant identifier for the restaurant you're placing the order at.

 

The tray is composed of menu items and optional sub-items. A single menu item's format is: [menu item id]/[qty],[option id],[option id]... Multiple menu items are joined by a +: [menu item id]/[qty]+[menu item id2]/[qty2] For example: 3270/2+3263/1,3279 Means 2 of menu item 3270 (with no sub options) and 1 of item num 3263 with sub option 3279.

 

Tip amount in dollars and cents.

 

Either ASAP or in the date format 2 digit month - 2 digit date, i.e. January 21 would be 01-21

 

(Required if delivery_date is not ASAP) Format is 2 digit hour (24 hour time) and 2 digit minutes, i.e. 9:30 PM would be 21:30.

 

The customer's first name.

 

The customer's last name.

 

The delivery location's street address.

 

The delivery location's city.

 

The delivery location's state.

 

The delivery location's zip.

 

The customer's phone number.

 

Full name as it appears on the credit card.

 

The customer's credit card number.

 

3 or 4 digit card security code.

 

The customer's credit card expiration date in mm/yyyy format.

 

The customer's billing street address.

 

(Optional) The second part of the customer's biling street address.

 

The customer's billing city.

 

The customer's billing state as a 2 letter state code. I.E. NY for New York.

 

The customer's billing 5 digit postal code.

 

The customer's billing phone number.

 

This call returns an object with the following properties:

 

If there was an error this is set to 1, otherwise it's 0.

 

Ordr.in's unique reference String for this order. Only exists if the order was successful.

 

(Optional) Our delivery partener's reference number for this order.

 

Either says that the order was completed, or gives information about an error.

 

This is an end user visible error or success message message.

 

Order with Credit Card and Address Place an order with a saved credit card and address.

POST /o/[rid]

Try it out

 

The user's email address

 

The user's SHA encoded password. API Explorer forms will automatically encode it for you.

 

Ordr.in's unique restaurant identifier for the restaurant you're placing the order at.

 

The tray is composed of menu items and optional sub-items. A single menu item's format is: [menu item id]/[qty],[option id],[option id]... Multiple menu items are joined by a +: [menu item id]/[qty]+[menu item id2]/[qty2] For example: 3270/2+3263/1,3279 Means 2 of menu item 3270 (with no sub options) and 1 of item num 3263 with sub option 3279.

 

Tip amount in dollars and cents.

 

Either ASAP or in the date format 2 digit month - 2 digit date, i.e. January 21 would be 01-21

 

(Required if delivery_date is not ASAP) Format is 2 digit hour (24 hour time) and 2 digit minutes, i.e. 9:30 PM would be 21:30.

 

The customer's first name.

 

The customer's last name.

 

The delivery location nickname. (From the user's addresses)

 

The credit card nickname. (From the user's credit cards)

 

This call returns an object with the following properties:

 

If there was an error this is set to 1, otherwise it's 0.

 

Ordr.in's unique reference String for this order. Only exists if the order was successful.

 

(Optional) Our delivery partener's reference number for this order.

 

Either says that the order was completed, or gives information about an error.

 

This is an end user visible error or success message message.

 

Order with saved Address Place an order with a saved address, and a new credit card.

POST /o/[rid]

Try it out

 

The user's email address

 

The user's SHA encoded password. API Explorer forms will automatically encode it for you.

 

Ordr.in's unique restaurant identifier for the restaurant you're placing the order at.

 

The tray is composed of menu items and optional sub-items. A single menu item's format is: [menu item id]/[qty],[option id],[option id]... Multiple menu items are joined by a +: [menu item id]/[qty]+[menu item id2]/[qty2] For example: 3270/2+3263/1,3279 Means 2 of menu item 3270 (with no sub options) and 1 of item num 3263 with sub option 3279.

 

Tip amount in dollars and cents.

 

Either ASAP or in the date format 2 digit month - 2 digit date, i.e. January 21 would be 01-21

 

(Required if delivery_date is not ASAP) Format is 2 digit hour (24 hour time) and 2 digit minutes, i.e. 9:30 PM would be 21:30.

 

The customer's first name.

 

The customer's last name.

 

The nickname of the delivery address. (From the user's saved addresses)

 

Full name as it appears on the credit card.

 

The customer's credit card number.

 

3 or 4 digit card security code.

 

The customer's credit card expiration date in mm/yyyy format.

 

The customer's billing street address.

 

(Optional) The second part of the customer's biling street address.

 

The customer's billing city.

 

The customer's billing state as a 2 letter state code. I.E. NY for New York.

 

The customer's billing 5 digit postal code.

 

The customer's billing phone number.

 

This call returns an object with the following properties:

 

If there was an error this is set to 1, otherwise it's 0.

 

Ordr.in's unique reference String for this order. Only exists if the order was successful.

 

(Optional) Our delivery partener's reference number for this order.

 

Either says that the order was completed, or gives information about an error.

 

This is an end user visible error or success message message.

 

Order with saved credit card Place an order with a saved credit card, and a new address.

POST /o/[rid]

Try it out

 

The user's email address

 

The user's SHA encoded password. API Explorer forms will automatically encode it for you.

 

Ordr.in's unique restaurant identifier for the restaurant you're placing the order at.

 

The tray is composed of menu items and optional sub-items. A single menu item's format is: [menu item id]/[qty],[option id],[option id]... Multiple menu items are joined by a +: [menu item id]/[qty]+[menu item id2]/[qty2] For example: 3270/2+3263/1,3279 Means 2 of menu item 3270 (with no sub options) and 1 of item num 3263 with sub option 3279.

 

Tip amount in dollars and cents.

 

Either ASAP or in the date format 2 digit month - 2 digit date, i.e. January 21 would be 01-21

 

(Required if delivery_date is not ASAP) Format is 2 digit hour (24 hour time) and 2 digit minutes, i.e. 9:30 PM would be 21:30.

 

The customer's first name.

 

The customer's last name.

 

The nickname of the credit card. (From the user's saved credit cards)

 

The delivery location's street address.

 

The delivery location's city.

 

The delivery location's state.

 

The delivery location's zip.

 

The customer's phone number.

 

This call returns an object with the following properties:

 

If there was an error this is set to 1, otherwise it's 0.

 

Ordr.in's unique reference String for this order. Only exists if the order was successful.

 

(Optional) Our delivery partener's reference number for this order.

 

Either says that the order was completed, or gives information about an error.

 

This is an end user visible error or success message message.