Products

Products launched in the last 60 days

GET
/v1/products/launches

Products whose first sale in the store, over its whole history, falls inside the 60 days that end at dateTo. Per product: first sale date (Ativo desde), new customers, distinct buyers, new share of the buyers, orders and margin, all over the window. newCustomers is the same definition as the listing (customers whose first purchase in the store was an order with the product); buyers is a distinct count, which the listing does not publish. Reads analytics.fct_order_sku_sales and analytics.fct_customer_cohort. A store whose history starts inside the window answers history_too_short with no rows. Cached for 5 minutes.

Authorization

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Query Parameters

organizationId*string
Formatuuid
integrationId*string

Canonical source integration id, exposed by GET /v1/products/integrations as sourceIntegrationId.

Formatuuid
dateTo?string

Last day of the window. Defaults to today.

Formatdate
gtmMotionId?string

GTM motion of the organization (UUID), as listed by GET /v1/gtm-motions. Optional: without it, the response covers the organization's default GTM motion. The default motion is answered with the organization's data, the same numbers as when the parameter is omitted. Another GTM motion of the organization only sees its own stores (V4MOS-2707): a store belongs to a motion whole, so GET /v1/products/integrations lists only the motion's stores (none for a motion without a store) and a route that reads one store answers exactly as for the organization when integrationId is a store of the motion, and 404 GTM_MOTION_STORE_NOT_IN_MOTION otherwise. Not a UUID: 400. Not a live GTM motion of the organization: 403 GTM_MOTION_NOT_IN_ORGANIZATION.

Formatuuid

Response Body

Launches of the window, ordered by new customers and then orders, descending. All of them: grouping the tail is the caller's.

application/json
  1. response
state*string
Value in"ready""no_launches""history_too_short"
reason*|

Why launches is empty; null when ready.

Value in"store_history_shorter_than_window""no_launch_in_window"null
asOf*|
Formatdate-time
integrationId*string
Formatuuid
windowDays*integer
period*
launches*array<>
curl -X GET "https://example.com/v1/products/launches?organizationId=497f6eca-6276-4993-bfeb-53cbbbba6f08&integrationId=497f6eca-6276-4993-bfeb-53cbbbba6f08&gtmMotionId=019a5b2e-7c4d-7abc-8def-0123456789ab"
{  "state": "ready",  "reason": "store_history_shorter_than_window",  "asOf": "2019-08-24T14:15:22Z",  "integrationId": "497a18ca-284e-40c0-985d-f72be35d468e",  "windowDays": 60,  "period": {    "from": "2019-08-24",    "to": "2019-08-24"  },  "launches": [    {      "productId": "string",      "productName": "string",      "firstSaleDate": "2019-08-24",      "newCustomers": 0,      "buyers": 0,      "newShare": 0,      "orders": 0,      "netSales": 0,      "marginTotal": 0,      "marginAverage": 0,      "marginNdReason": "incomplete_gross_value"    }  ]}