Skip to content
shanx edited this page Feb 19, 2011 · 4 revisions

Rest Interface for CashPad

Introduction

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.

Resources

Order

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.
Clone this wiki locally