CopyHero

Get Orders

GET
/api/v1/analytics/orders

Orders of the organization's stores processed in a period, newest first.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

date_from*Date From

First shop calendar day of the period (inclusive).

Formatdate
date_to*Date To

Last shop calendar day of the period (inclusive); at most tomorrow (UTC); the period is at most 366 days inclusive.

Formatdate
store_ids?array<integer>|

Only these organization stores; an unknown, foreign or deleted id answers 404. Repeated values: ?store_ids=12&store_ids=17

include?array<>

Components counted in net_shop besides products. Repeated values: ?include=shipping&include=tip.

Default[]
subtract_refunds?Subtract Refunds

Fold later refunds into the order. False: RETURN sales count in no amount.

Defaulttrue
skip?Skip
Range0 <= value
Default0
limit?Limit
Range1 <= value <= 250
Default50

Response Body

Successful Response

application/json
  1. response
count*Count
data*array<>
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/analytics/orders?date_from=2019-08-24&date_to=2019-08-24'
Example Response
{  "count": 0,  "data": [    {      "store_id": 0,      "order_gid": "string",      "processed_at": "2019-08-24T14:15:22Z",      "net_shop": "string",      "components": {        "property1": "string",        "property2": "string"      },      "currency": "AED",      "country_code": "string",      "province_code": "string",      "product_count": 0,      "products": [        {          "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",          "title": "string",          "image_url": "string"        }      ]    }  ]}