Get Store Revenue
HTTPBearerAuthorizationBearer <token>date_from*Date FromFirst shop calendar day of the period (inclusive).
datedate_to*Date ToLast shop calendar day of the period (inclusive); at most tomorrow (UTC); the period is at most 366 days inclusive.
datecurrency?|Currency to convert all stores into; defaults to the organization's default currency, else the most common shop currency.
store_ids?array<integer>|Only these organization stores; an unknown, foreign or deleted id answers 404. Repeated values: ?store_ids=12&store_ids=17
vendor?array<string>|Only sales of linked products with any of these vendors (OR within field)
product_type?array<string>|Only sales of linked products with any of these product types (OR within field)
include_costs?Include CostsAdd the costs block (CJ supplier costs: product and shipping, see costs.state).
falsesubtract_refunds?Subtract RefundsSubtract refunds (RETURN sales) on the day of the refund. False: RETURN sales count in no amount; orders and units are unchanged.
trueinclude?array<>Components counted in net besides products. Repeated values: ?include=shipping&include=tip. Ignored with a product filter. components always carries all of them.
[]Successful Response
application/json- response
Net revenue of the filtered stores in the period, converted into currency at today's rate.
currency*|nullcurrency_options*array<>kpis*stores*array<>components_series*array<>Per bucket start (as stores[].series), components summed over all filtered stores; no per-store series.
bucket*BucketBucket size of every stores[].series and of costs.series: the finest of hour, day, week with at most 200 buckets in the period.
"hour""day""week"costs_connected*Costs ConnectedThe organization has a supplier connection with status active.
costs?|Only with include_costs.
curl -X GET 'https://app.copyhero.app/api/v1/analytics/store-revenue?date_from=2019-08-24&date_to=2019-08-24'{ "currency": "AED", "currency_options": [ "AED" ], "kpis": { "current": { "net": "string", "components": { "property1": "string", "property2": "string" }, "orders": 0, "units": 0, "average_order_value": "string" }, "previous": { "net": "string", "components": { "property1": "string", "property2": "string" }, "orders": 0, "units": 0, "average_order_value": "string" }, "forecast": { "net": "string", "orders": 0, "units": 0 } }, "stores": [ { "store_id": 0, "status": "backfilling", "data_since": "2019-08-24", "net": "string", "components": { "property1": "string", "property2": "string" }, "series": [ { "start": "2019-08-24T14:15:22Z", "net": "string", "forecast_net": "string" } ] } ], "components_series": [ { "start": "2019-08-24T14:15:22Z", "components": { "property1": "string", "property2": "string" } } ], "bucket": "hour", "costs_connected": true, "costs": { "state": "available", "kpis": { "current": { "product_cost": "string", "shipping_cost": "string", "unpaid_product_cost": "string", "orders_cost_missing": 0 }, "previous": { "product_cost": "string", "shipping_cost": "string", "unpaid_product_cost": "string", "orders_cost_missing": 0 } }, "series": [ { "start": "2019-08-24T14:15:22Z", "product_cost": "string", "shipping_cost": "string" } ], "last_synced_at": "2019-08-24T14:15:22Z", "stores_without_supplier_shop": [ { "store_id": 0, "name": "string", "handle": "string" } ], "supplier_store_ids": [ 0 ], "costs_since": "2019-08-24" }}Get Store Product Series GET
Previous Page
Get Time Series GET
Get time-series analytics data with specified granularity. Returns time-bucketed metrics including: - timestamp: Start of each time bucket - batch_count: Number of batches in this period - task_count: Number of tasks in this period - jobs_count: Number of jobs in this period (filtered by state if provided) Access Control: - Regular users: See only their owned or employed stores - Superusers in a browser session: see all stores (API keys and MCP never act as superuser)