Order Download API

Summary #

In addition to our pull-based export API, we provide a simpler way to fetch orders.This tends to perform better, since it responds to query parameters, instead of being intended for use in exporting orders into an ERP system.

Basic Information #

Following are details about the API:

  • URL: https://supercat.supercatsolutions.com/<org>/orders.json (where <org> is the shortname of your organization, same as in all the admin portal URLs).
  • Authentication: HTTP Basic
  • Parameters:
    • export_format: optional One of "stdjson", "stdjsonv2", or "default". Affects the output format.
    • submit_from: optional Fetch only orders submitted on or after this date. Formatted "yyyy-mm-dd" or a valid ISO8601 date/time stamp. If it's not present, system will return orders all the way back to the first order.
    • submit_to: optional Fetch only orders submitted on or before this date. Formatted "yyyy-mm-dd" or a valid ISO8601 date/time stamp. If it's not present, system will return orders all the way up to the current date.
    • receipt_from: optional Fetch only orders received by our server on or after this date. Formatted "yyyy-mm-dd" or a valid ISO8601 date/time stamp. If it's not present, system will return orders all the way back to the first order.
    • receipt_to: optional Fetch only orders received by our server on or before this date. Formatted "yyyy-mm-dd" or a valid ISO8601 date/time stamp. If it's not present, system will return orders all the way up to the current date.
    • single_documentoptional Instead of the normal JSON stream (one JSON Object per line), output a single Array of JSON Object.

For example:

http://supercat.supercatsolutions.com/demo/orders.json?export_format=stdjsonv2&from_date=2019-05-01

Will return all orders on or after 2019/05/01, using our StdJSONv2 order format.

Recommended parameters #

In most cases, you will want to

  • specify "stdjsonv2" for the export_format parameter
  • use the receipt_from and receipt_to parameters for your needs

Response Format #

The response format is a JSON stream: each order corresponds to a single JSON document taking up a single line of output. This way you can parse each order as it comes in, in addition to minimizing memory consumption on parsing (order results can be quite large).

For details on the format of each document, see JSON Order Fields.

The StdJSONv2 format adds an additional entry to the order items: "custom_fields", which includes any product custom fields defined for the relevant product.