The Analytics API gives you programmatic access to the reports of your brand account. It lets you retrieve your sales and activity figures from your own tools (BI platform, data warehouse, spreadsheets...) without exporting them by hand.
Three kinds of reports are available:
- Built-in reports: the reports Le New Black provides to every brand.
- Custom reports: the reports created in your brand account.
- On-demand reports: a report you define in the request itself (dimensions, metrics, filters, sort order), without saving it, when no built-in or custom report matches what you need.
Each generated report returns its rows, along with its metadata and statistics.
Getting access
Your brand account must have subscribed to the "API / Integration" option; please contact your Le New Black account manager to get it. A brand manager then creates an API key under Settings › API and selects the Analytics API among the APIs the key opens. The client secret is shown only once, when the key is created: store it safely.
Authentication follows the OAuth2 "client credentials" flow: exchange the client id and client secret for an access token, valid for one hour, then pass it as the access_token parameter of every request. The base URI of the API is https://www.lenewblack.com/apis/analytics/v1.
The following resources are available for you to explore and test endpoints:
- Analytics API homepage
- Security best practices (written for the Wholesale API v2, the same rules apply to the Analytics API keys)
Comments
0 comments
Please sign in to leave a comment.