Basic information
GET /{shopId}/sales
Returns the summary of sales figures for a specified product or for the shop grouped by currencies. The amounts are gross and net amounts. By default the results of the last 30 days are displayed. Open-ended queries are limited to 30 days. The maximum time frame for displaying orders is 1 year.
Authorisation
OAuth 2.0 Token required with scopes:
orders_read
URI parameters
Name | Type | Description |
---|---|---|
shopId |
string |
The unique identifier of the shop. Required:
true
Example:
DemoShop
|
Query parameters
Name | Type | Description |
---|---|---|
createdBefore |
string |
Filters orders created before this timestamp (format according to ISO 8601). The maximum time frame for displaying orders is 1 year. If no filter is set, all orders will be displayed. Required:
false
|
createdAfter |
string |
Filters orders created after this timestamp (format according to ISO 8601). The maximum time frame for displaying orders is 1 year. If no filter is set, all orders will be displayed. Required:
false
|
productId |
string |
The unique identifier of the product. Required:
false
|
Response attributes
Name | Type | Description |
---|---|---|
|
object of salesSummary |
Response
HTTP 200
Media type application/json
{ "createdAfter": "2016-03-20T08:21:43.779Z", "createdBefore": "2016-04-19T07:21:43.779Z", "salesPerCurrency": [ { "currency": "EUR", "totalGrossRevenue": 9.99, "totalNetRevenue": 8.39495798319328, "unitsSold": 1 "totalOrders": 1 } ] }
HTTP 400
Query parameter validations errors. Invalid date format or date range longer than one year.
HTTP 403
Forbidden. OAuth 2.0 Token required with ‘orders_read’ scope.