Order download is a query you sent to Teapplix, which will return a list of "Order" JSON data to be returned from the body.
Method and Endpoint
Order download uses "GET" REST method, and the URL is the same as inbound "OrderNotification":
Parameters to limit which orders to download from Teapplix are passed in the query string part of the URL.
- PaymentDateStart: 2012/01/01 => for orders with payment date >= 2012/01/01 (inclusive)
- PaymentDateEnd: 2012/01/31 => for orders with payment date <= 2012/01/31 (note that since 2012/01/31 02:55:12 is greater than 2012/01/31, all orders placed on 01/31 is excluded)
- ShipDateStart: 2012/01/20 => for shipped orders with ship date >= 2012/01/20
- ShipDateEnd: 2012/01/31 => for shipped orders with ship date <= 2012/01/31
- SeqStart: for txn_seq >= 12345, txn_seq is a unique number assigned to each order per Teapplix account. Based on the sequence that the order is created or pulled into Teapplix. You can remember the previous maximum number you have received, and use this to incrementally download large number of orders.
- SeqEnd: 12346 => for txn_seq <= 12346. Use this to control which set of orders to download.
- QueueId: (integer, optional) 0 => for orders with Normal queue; 3 => for orders with queue_id == 3
- NotShipped: (optional, 1 or 0) ==> if set to 1, only obtain orders not shipped
- Combine: "combine|original|all", depending on value, the following orders are included or excluded
- combine: we will provide all "non cancelled" orders. If 2 orders are combined into 1, the combined result order will be in the result, the original order will not
- original: we will provide all "non cancelled" orders. If 2 orders are combined into 1, the original order will be in the result, the combined result will not be.
- all: all orders, including combined results, cancelled orders, etc, will be in the result.
- DetailLevel: "shipping|inventory|none", certain aspect of Orders are not normally returned, and the detail level controls turning on outputing these aspects of orders:
- shipping: this will cause Teapplix to do remember weight lookup for unshipped orders, and then return ShippingDetail and Options array.
- inventory: this will cause Teapplix to do inventory lookup, and return ItemSKU and ItemLocation. ItemLocation follows these rules:
- if order item has a "saved location", then it will be returned
- if not the location set on the "product" will be returned
- for ItemSKU, this is the mapped Product Name. If no mapping is done, the return is same as Name.
Miminum list of parameters: you must specify one of: PaymentDateStart, ShipDateStart, SeqStart, NotShipped
The reply from Teapplix is described by the following Schema: