For testing purposes please use this domain - https://u-test.ordr.in/
When in production use this domain - https://u.ordr.in/
All user requests (besides user creation) 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.
It returns a JSON hash. Each hash contains these fields:
first_name: The user's first name last_name: The user's first name em: The user's email
You must pass in the following fields in the POST data (in standard x-www-form-urlencoded format):
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message
It returns a JSON array of hashes. Each hash represents a saved address and contains these fields:
nick: The nickname of this address (i.e. Home, Work) addr: The street address addr2: The 2nd line of the address (optional) city: The city state: The state zip: The zip code phone: The phone number
nick: The nickname of this address (i.e. Home, Work) addr: The street address addr2: The 2nd line of the address (optional) city: The city state: The state zip: The zip code phone: The phone number
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message
It returns a JSON array of hashes. Each hash represents a saved address and contains these fields:
nick: The nickname of the card name: The name on the card. cc_last5: The last 5 digits of the card expiry_month: The 2 digit expiry month (i.e. 01 = January, 12 = December) expiry_year: The 4 digit expiry year type: The type of card (i.e. American Express) bill_addr: The billing address bill_addr2: The second line of the billing address (optional) bill_city: The billing city bill_state: The billing state bill_zip: The billing zip
It returns a JSON hash with a single fixed key "cc". The value of cc is a hash that contains these fields:
name: The name on the card. cc_last5: The last 5 digits of the card expiry_month: The 2 digit expiry month (i.e. 01 = January, 12 = December) expiry_year: The 4 digit expiry year type: The type of card (i.e. American Express) bill_addr: The billing address bill_addr2: The second line of the billing address (optional) bill_city: The billing city bill_state: The billing state bill_zip: The billing zip
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message
It returns a JSON array of hashes, where each hash represents an order with this format:
oid The order ID rid The restaurant ID rname The restaurant name total The total cost in dollars. tip The tip in dollars. ctime The time (in UTC) of the order in unix time. item This is an array of hashes, each hash represents an item ordered.
name The name of the item id The id of the item price The price of the item in cents qty The quantity ordered opts An array of hashes, each hash represents an option ordered with the main item. Each option is of the same format as the item
It returns a JSON array of hashes, where each hash represents an order with this format:
oid The order ID rid The restaurant ID rname The restaurant name total The total cost in dollars. tip The tip in dollars. ctime The time (in UTC) of the order in unix time. item This is an array of hashes, each hash represents an item ordered.
name The name of the item id The id of the item price The price of the item in cents qty The quantity ordered opts An array of hashes, each hash represents an option ordered with the main item. Each option is of the same format as the item
password: The SHA256 digested password, hex encoded
It returns a JSON hash with this data:
_error a boolean (0|1), 1 means there was an error, 0 means it was successful msg the error message