Commerce
Get product metrics
A product's sales.
PAID orders by when they were paid, in the shop's currency; the last 30 days when no window is named.
product*stringA product id. Anything that is not one is 404 resource_missing.
Format
uuidperiod?stringValue in
"today""yesterday""this_week""last_week""last_7_days""last_30_days""last_90_days""this_month""last_month""this_year""all_time"from?stringThe first day, in East Africa Time.
Format
dateto?stringThe last day, in East Africa Time.
Format
datestart_date?stringDeprecatedUse from. An instant; one with no zone is UTC.
end_date?stringDeprecatedUse to. An instant; one with no zone is UTC.
include_daily?booleanAdds a daily series.
Default
falseX-Request-Id?stringYour id for this request; it becomes the request_id of any error. Without it the server makes one.
curl -X GET 'https://v3.ghala.io/v1/commerce/shop/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/metrics'{ "currency": "string", "period": "string", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "total_orders": 0, "total_customers": 0, "total_quantity": 0, "total_sales": "1500.00", "available_stock": 0, "daily": [ { "day": "2019-08-24", "total_amount": "1500.00", "total_quantity": 0 } ]}