CopyHero

Get Store Product Revenue

GET
/api/v1/analytics/store-revenue/{store_id}/products

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

store_id*Store Id

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
currency?|

Currency to convert into; defaults like GET /analytics/store-revenue?store_ids=<store_id>: the organization's default currency, else the most common shop currency.

tags?array<string>|

Only linked products with any of these tags (OR within field)

vendor?array<string>|

Only linked products with any of these vendors (OR within field)

product_type?array<string>|

Only linked products with any of these product types (OR within field)

sort_by?Sort By
Default"net"
Value in"net""orders""units"
sort_order?Sort Order
Default"desc"
Value in"asc""desc"
skip?Skip
Range0 <= value
Default0
limit?Limit
Range1 <= value <= 250
Default50
subtract_refunds?Subtract Refunds

Subtract refunds (RETURN sales) on the day of the refund. False: RETURN sales count in no amount; orders and units are unchanged.

Defaulttrue

Response Body

Successful Response

application/json
  1. response

Every product of one store with its net revenue in the period, converted into currency at today's rate.

currency*|null
count*Count
data*array<>
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/analytics/store-revenue/0/products?date_from=2019-08-24&date_to=2019-08-24'
Example Response
{  "currency": "AED",  "count": 0,  "data": [    {      "internal_product_id": "17d65d0a-2bba-46da-af25-e6db2fc23598",      "title": "string",      "image_url": "string",      "published_at": "string",      "net": "string",      "orders": 0,      "units": 0    }  ]}