-
Notifications
You must be signed in to change notification settings - Fork 2
rest interface
shanx edited this page Feb 19, 2011
·
4 revisions
The CashPad iPad and iPhone apps will register their orders with a central backend. For version 1 of the backend this will be a simple flow:
- CashPad will register orders locally within the app
- At some point in time a CashPad user wants to push the new orders to the backend
- The user presses the sync button
- All orders that have not been transferred before will be pushed to the server
The apps have a responsibility to flag already pushed orders locally within the sqlite datastore.
Route
POST http://test.cashpad.com/api/user/{user_id}/order/
- Create a new order for the selected
User
resource.
Request
The request can contain the following fields:
- created_on (
datetime
): Datetime on which the order was created in the CashPad app.- item_list (
array
): List of items that are part of the order.
- product_id (
integer
): Unique id identifying the product.- product_name (
string
): Name of the product.- amount (
integer
): Amount of products ordered.- unit_price (
decimal
): Price of the product per unit.