Daily or weekly sales series of one product
Returns how a product's net sales, units, orders, cost and margin evolved, day by day (granularity=day) or in 7-day buckets (granularity=week), with the previous period of the same length aligned point by point for comparison.
- Weekly buckets count 7 days from
dateFrom, not calendar weeks; the last one may be shorter. - Days without sales are returned as zero.
- Cost and margin follow the listing rule: they are
nullwhen the sale value or cost is incomplete. - Data can take up to 30 minutes to reflect updates.
ClientIdAuthClientSecretAuthx-client-id<token>Client ID
x-client-secret<token>Client secret
productId*stringParent product id, in the shape its platform publishes: a VTEX identifier (1234567) or a Shopify GID (gid://shopify/Product/10417518674198), which carries slashes and must be percent-encoded in the path. The value is the same productId the listing returned, forwarded opaquely. A product absent from the catalog but present in sales or in the entry cohort is still addressable.
^[A-Za-z0-9._~+@:/-]{1,256}$length <= 256organizationId*stringuuidintegrationId*stringStore identifier: the sourceIntegrationId returned by GET /v1/products/integrations. Do not use the VTEX App Key.
uuiddateFrom?stringDefaults to 29 days before dateTo.
datedateTo?stringDefaults to today.
dategranularity?string"day""day""week"Series of the product. no_base still returns every bucket, with zeros.
application/json- response
state*string"ready""no_base""stale"reason*|null"no_period_sales""stale_source"asOf*|date-timeintegrationId*stringproductId*stringgranularity*string"day""week"bucketDays*integer17period*Window a block actually measured, reported when it is not the requested period. Read from the returned rows, so it is a fact rather than a computed claim.
periodApplied*Which period the block actually measured. basis: 'requested': the block used dateFrom/dateTo, so its numbers match the selected days. basis: 'source_window': the block ignores the requested period and uses a rolling window of its own, reported in window. Always present, whatever the block's state, and not a sign of degradation.
data*array<>previous*|The window of the same length immediately before period, for the "Período anterior" legend. Null only when that read failed; the current series is published either way.
curl -X GET "https://example.com/v1/products/string/series?organizationId=497f6eca-6276-4993-bfeb-53cbbbba6f08&integrationId=497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "state": "ready", "reason": null, "asOf": "2019-08-24T14:15:22Z", "integrationId": "string", "productId": "string", "granularity": "day", "bucketDays": 1, "period": { "from": "2019-08-24", "to": "2019-08-24" }, "periodApplied": { "basis": "requested", "granularity": "day" }, "data": [ { "index": 0, "from": "2019-08-24", "to": "2019-08-24", "netSales": 0, "netUnits": 0, "orders": 0, "cogs": 0, "marginTotal": 0, "marginNdReason": null } ], "previous": { "state": "ready", "reason": null, "window": { "from": "2019-08-24", "to": "2019-08-24" }, "data": [ { "index": 0, "from": "2019-08-24", "to": "2019-08-24", "netSales": 0, "netUnits": 0, "orders": 0, "cogs": 0, "marginTotal": 0, "marginNdReason": null } ] }}