Order Download

You an download orders from Teapplix, complete with shipping information, using our "Report API". You must pass "Action=Report" on the URL.

There are 2 kinds of reports:

  1. Order Report - this report returns multiple lines per order. One line per line item
  2. Customer Report - this report returns one single line per order. If you have multiple items, they are listed on more columns

Order Report

Subaction=OrderRun

This report exports orders in Teapplix. Orders are exported one line per order line item (the main order information will repeat for each line). For order report API, the following parameters are available:

start_date=2012/01/01 => for orders with payment date >= 2012/01/01 (inclusive)

end_date=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)

ship_date_s=2012/01/20 => for shipped orders with ship date >= 2012/01/20

ship_date_e=2012/01/31 => for shipped orders with ship date <= 2012/01/31

seq_s=12345 => 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.

seq_e=12346 => for txn_seq <= 12346. Use this to control which set of orders to download.

queue_id=0 => for orders with Normal queue; queue_id=3 => for orders with queue_id == 3 (integer; optional)

not_shipped=1 ==> if you pass this flag, we will only give "open" orders.

combine="combine|original|all"

The orders selected under these 3 modes are different:

  • combine: we will provide all "non cancelled" orders. If 2 orders are combined into 1, the combined result order will be in the report, 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 report, the combined result will not be.
  • all: all orders, including combined results, cancelled orders, etc, will be in the result.

The result of this API call is a CSV that is the entire body of the HTTP return.

Example of calling Order Report API using "curl":

curl -k -o order_report.csv -d Subaction='OrderRun' -d start_date='' -d end_date='' -d ship_date_s='' -d ship_date_e='' -d seq_s='' -d seq_e='' -d queue_id='' "https://www.teapplix.com/h/[your teapplix account name]/ea/admin.php?User=xxxx&Passwd=xxxx&Action=Report"

Customer Report

Subaction=CustomerRun

For customer report API, the following parameters are available:

start_date=2012/01/01 => for orders with payment date >= 2012/01/01 (inclusive)

end_date=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)

ship_date_s=2012/01/20 => for shipped orders with ship date >= 2012/01/20

ship_date_e=2012/01/31 => for shipped orders with ship date <= 2012/01/31

seq_s=12345 => 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.

seq_e=12346 => for txn_seq <= 12346. Use this to control which set of orders to download.

queue_id=0 => for orders with Normal queue; queue_id=3 => for orders with queue_id == 3 (integer; optional)

The result of this API call is a CSV that is the entire body of the HTTP return.

Example of calling Customer Report API using "curl":

curl -k -o customers_report.csv -d Subaction='CustomerRun' -d start_date='' -d end_date='' -d ship_date_s='' -d ship_date_e='' -d seq_s='' -d seq_e='' -d queue_id='' "https://www.teapplix.com/h/[your teapplix account name]/ea/admin.php?User=xxxx&Passwd=xxxx&Action=Report"