Prisjakt Insights GraphQL API Reference
Welcome to the Prisjakt Insights GraphQL API reference! This reference includes the complete set of GraphQL types, queries, mutations, and their parameters for getting Prisjakt Insights.
API Endpoints
# Production:
https://api.pj.nu/insights
# Auth url:
https://auth.pj.nu/oauth2/token
Authentication
To get started, generate client credentials (client ID and client secret) in the Business Center portal. This is self-service — no manual approval is required.
Once you have credentials, call the token endpoint https://auth.pj.nu/oauth2/token to get an access token:
curl --request POST \
--url https://auth.pj.nu/oauth2/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=<your-client-id> \
--data client_secret=<your-client-secret> \
--data grant_type=client_credentials
This request will respond with an access token:
{
"access_token": "<JWT-access-token>",
"expires_in": 86399,
"scope": "",
"token_type": "bearer"
}
You can use this token by putting it in the Authorization header attached to your GraphQL request. Some queries and mutations require specific features to be enabled on your account, which are documented in the API reference.
If authentication fails, the error response follows the RFC7807 format:
{
"title": "Unsupported grant type",
"status": 400,
"detail": "Unsupported grant type: invalid_grant_type"
}
Example graphql request
The Insights API is a GraphQL API served over HTTPS. For more information about GraphQL visit https://graphql.org.
When making GraphQL queries, you can use HTTP POST or GET methods. A standard POST request should use the application/json content type, and include a JSON-encoded body of the following form:
{
"query": "...",
"variables": { "myVariable": "someValue", ... }
}
GraphQL response status codes differ from REST API status codes. A GraphQL API can return a 200 response code in cases where a REST API would return 4xx or 5xx. The response body will in that case contain some errors (see errors for more details). See the below example for the basic structure of the response:
{
"data": { ... },
"errors": [ ... ]
}
Errors
If there are no errors, the errors field will not be present in the response. When errors do occur, each error includes a message and an extension code:
{
"errors": [
{
"message": "Access denied. Missing feature INSIGHTS_API_CLICK_AND_COST for shop id x.",
"path": ["..."],
"extensions": {
"code": "FORBIDDEN"
}
}
],
"data": null
}
Interactive Explorer
The API includes an interactive GraphQL explorer at https://api.pj.nu/insights/graphql. Open it in a browser to explore the full schema, build queries, and run them in real time.
To authenticate, click the Connection Settings icon (cogwheel) next to the endpoint URL and add an Authorization header with your Bearer token:
Authorization: Bearer <your-access-token>
Generate a token using the authentication request shown above, then paste it in. The explorer uses schema introspection to autocomplete fields and show inline documentation as you build your query.
Downloading reports
Reports are generated asynchronously. The general flow is:
- Call
requestShopOfferInventoryReport(or another report mutation) to queue the report. - Poll
shopReportsuntil the reportstateisCREATED. - Call
createReportLinksto get a signed download URL. - Download and decompress the
.csv.gzfile from the signed URL.
Signed URLs expire after a short period, so download promptly after generating them. Reports are stored for 90 days and can also be viewed in Business Center.
Queries
aggregatedProductClickCostsPerDay
Description
Get a shop's aggregated daily click costs for a group of products.
This query is good for getting a high level summary of how many clicks a shop got on a group of products and the cost of those clicks. It can accept many more products than for example productClickCostsPerDay, but is less detailed in the data it can provide. The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
Response
Arguments
| Name | Description |
|---|---|
dateRange - DateRange!
|
Select a custom date range. |
productIds - [String!]!
|
The product ids to use as filter. The upper limit for how many products you can include is around 100 000, but might be lower if the rest of the request is large. It only makes sense to include products that the shop has or has had in its inventory. |
shopId - ID!
|
The shop id. |
Example
Query
query AggregatedProductClickCostsPerDay(
$dateRange: DateRange!,
$productIds: [String!]!,
$shopId: ID!
) {
aggregatedProductClickCostsPerDay(
dateRange: $dateRange,
productIds: $productIds,
shopId: $shopId
) {
date
productSegmentCosts {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
}
}
Variables
{
"dateRange": DateRange,
"productIds": ["abc123"],
"shopId": "4"
}
Response
{
"data": {
"aggregatedProductClickCostsPerDay": [
{
"date": "2007-12-03",
"productSegmentCosts": [ProductSegmentCost]
}
]
}
}
brandReports
Description
Get all reports for a brand service.
The user must have the "BRAND_INSIGHTS" feature enabled for the brand service.
Response
Returns a BrandReports!
Arguments
| Name | Description |
|---|---|
brandServiceId - ID!
|
The brand service id. |
filter - BrandReportFilterOptions
|
The filter options. |
first - UInt
|
How many edges to fetch from offset. Defaults to 100 (max value). |
offset - UInt
|
The offset. Defaults to 0. |
Example
Query
query BrandReports(
$brandServiceId: ID!,
$filter: BrandReportFilterOptions,
$first: UInt,
$offset: UInt
) {
brandReports(
brandServiceId: $brandServiceId,
filter: $filter,
first: $first,
offset: $offset
) {
edges {
node {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
totalCount
}
}
Variables
{
"brandServiceId": 4,
"filter": BrandReportFilterOptions,
"first": UInt,
"offset": UInt
}
Response
{
"data": {
"brandReports": {
"edges": [BrandReportEdge],
"pageInfo": PageInfo,
"totalCount": UInt
}
}
}
categoryTree
Description
Get the category tree. Use the filter options to only include categories where a brand or a shop has products.
Response
Returns [CategoryNode!]!
Arguments
| Name | Description |
|---|---|
filter - CategoryTreeFilterOptions
|
Filter options. |
market - Market!
|
Market for the category tree. |
Example
Query
query CategoryTree(
$filter: CategoryTreeFilterOptions,
$market: Market!
) {
categoryTree(
filter: $filter,
market: $market
) {
childIds
id
name
parentId
type
}
}
Variables
{"filter": CategoryTreeFilterOptions, "market": "DK"}
Response
{
"data": {
"categoryTree": [
{
"childIds": ["abc123"],
"id": "xyz789",
"name": "xyz789",
"parentId": "xyz789",
"type": "LEAF"
}
]
}
}
clickCosts
Description
Get a shop's total click costs. Choose a calendar month as date range using the month field, or define a custom date range using the date range field.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
Response
Returns a TotalClickCosts!
Example
Query
query ClickCosts(
$categoryIds: [String!],
$dateRange: DateRange,
$promotionId: String,
$segmentIds: [String!],
$shopId: ID!
) {
clickCosts(
categoryIds: $categoryIds,
dateRange: $dateRange,
promotionId: $promotionId,
segmentIds: $segmentIds,
shopId: $shopId
) {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
dateRange {
fromDate
toDate
}
forecast {
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
month
shop {
id
market
name
}
subtotals {
expert {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
homepage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
membership {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
product {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
productSubtotals {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
promotionPage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
}
subtotalsPerDay {
date
subtotals {
expert {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
homepage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
membership {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
product {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
productSubtotals {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
promotionPage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
}
}
updatedAt
}
}
Variables
{
"categoryIds": ["abc123"],
"dateRange": DateRange,
"promotionId": "abc123",
"segmentIds": ["abc123"],
"shopId": 4
}
Response
{
"data": {
"clickCosts": {
"clicks": UInt,
"cost": CostWithDiscount,
"dateRange": DateRangeType,
"forecast": Forecast,
"month": "xyz789",
"shop": ShopWithMarket,
"subtotals": SubtotalClickCosts,
"subtotalsPerDay": [SubtotalClickCostsPerDay],
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
clickCostsBatch
Description
Get total click costs for a list of shops. Supports up to 100 ids Choose a calendar month as date range using the month field, or define a custom date range using the date range field..
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for all shop ids.
Response
Returns [TotalClickCosts!]!
Example
Query
query ClickCostsBatch(
$dateRange: DateRange,
$shopIds: [ID!]!
) {
clickCostsBatch(
dateRange: $dateRange,
shopIds: $shopIds
) {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
dateRange {
fromDate
toDate
}
forecast {
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
month
shop {
id
market
name
}
subtotals {
expert {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
homepage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
membership {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
product {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
productSubtotals {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
promotionPage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
}
subtotalsPerDay {
date
subtotals {
expert {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
homepage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
membership {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
product {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
productSubtotals {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
promotionPage {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
}
}
updatedAt
}
}
Variables
{
"dateRange": DateRange,
"shopIds": ["4"]
}
Response
{
"data": {
"clickCostsBatch": [
{
"clicks": UInt,
"cost": CostWithDiscount,
"dateRange": DateRangeType,
"forecast": Forecast,
"month": "abc123",
"shop": ShopWithMarket,
"subtotals": SubtotalClickCosts,
"subtotalsPerDay": [SubtotalClickCostsPerDay],
"updatedAt": "2007-12-03T10:15:30Z"
}
]
}
}
currentUser
Description
Get info about the current user, including permissions on shops and brands.
Response
Returns a CurrentUser!
Example
Query
query CurrentUser {
currentUser {
brandServices {
brandService {
brand {
id
name
}
id
market
}
permissions
}
id
role
shops {
features
permissions
shop {
id
name
}
}
}
}
Response
{
"data": {
"currentUser": {
"brandServices": [BrandServicePermissions],
"id": "4",
"role": "ADMIN",
"shops": [ShopPermissions]
}
}
}
productClickCosts
Description
Get a shop's click costs per product ordered by popularity (number of clicks). Choose a calendar month as date range using the month field, or define a custom date range using the date range field.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
Response
Returns a ProductClickCosts!
Arguments
| Name | Description |
|---|---|
categoryIds - [String!]
|
The category ids to use as filter |
dateRange - DateRange
|
Select a custom date range. |
first - UInt
|
How many edges to fetch from offset. Defaults to 50 and max value is 100. |
offset - UInt
|
The offset. Defaults to 0. |
productIds - [String!]
|
The product ids to use as filter |
segmentIds - [String!]
|
The segment ids to use as filter |
shopId - ID!
|
The shop id. |
Example
Query
query ProductClickCosts(
$categoryIds: [String!],
$dateRange: DateRange,
$first: UInt,
$offset: UInt,
$productIds: [String!],
$segmentIds: [String!],
$shopId: ID!
) {
productClickCosts(
categoryIds: $categoryIds,
dateRange: $dateRange,
first: $first,
offset: $offset,
productIds: $productIds,
segmentIds: $segmentIds,
shopId: $shopId
) {
edges {
node {
category {
id
market
name
segment
}
clickPrice {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
product {
id
market
name
offers {
id
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
totalCount
updatedAt
}
}
Variables
{
"categoryIds": ["xyz789"],
"dateRange": DateRange,
"first": UInt,
"offset": UInt,
"productIds": ["xyz789"],
"segmentIds": ["xyz789"],
"shopId": "4"
}
Response
{
"data": {
"productClickCosts": {
"edges": [ProductEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
productClickCostsPerDay
Description
Get a shop's daily click costs per product ordered by popularity (number of clicks). Choose a calendar month as date range using the month field, or define a custom date range using the date range field.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
Response
Returns a ProductClickCostsPerDay!
Arguments
| Name | Description |
|---|---|
categoryIds - [String!]
|
The category ids to use as filter |
dateRange - DateRange!
|
Select a custom date range. |
first - UInt
|
How many edges to fetch from offset. Defaults to 50 and max value is 100. |
offset - UInt
|
The offset. Defaults to 0. |
productIds - [String!]
|
The product ids to use as filter |
segmentIds - [String!]
|
The segment ids to use as filter |
shopId - ID!
|
The shop id. |
Example
Query
query ProductClickCostsPerDay(
$categoryIds: [String!],
$dateRange: DateRange!,
$first: UInt,
$offset: UInt,
$productIds: [String!],
$segmentIds: [String!],
$shopId: ID!
) {
productClickCostsPerDay(
categoryIds: $categoryIds,
dateRange: $dateRange,
first: $first,
offset: $offset,
productIds: $productIds,
segmentIds: $segmentIds,
shopId: $shopId
) {
edges {
node {
costs {
category {
id
market
name
segment
}
clickPrice {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
date
}
product {
id
market
name
offers {
id
}
}
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
totalCount
updatedAt
}
}
Variables
{
"categoryIds": ["abc123"],
"dateRange": DateRange,
"first": UInt,
"offset": UInt,
"productIds": ["xyz789"],
"segmentIds": ["xyz789"],
"shopId": 4
}
Response
{
"data": {
"productClickCostsPerDay": {
"edges": [ProductClickCostsPerDayEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
}
}
segments
Description
Get all active segments.
Response
Returns [Segment!]!
Arguments
| Name | Description |
|---|---|
market - Market
|
Example
Query
query Segments($market: Market) {
segments(market: $market) {
id
market
name
}
}
Variables
{"market": "DK"}
Response
{
"data": {
"segments": [
{
"id": 4,
"market": "DK",
"name": "abc123"
}
]
}
}
shopInventoryStats
Description
Get the current inventory statistics for a given shop ID.
The user must have the "INSIGHTS_API_INVENTORY_ANALYSIS" feature enabled for the shop id.
Response
Returns a ShopInventoryStats!
Arguments
| Name | Description |
|---|---|
shopId - ID!
|
The shop ID. |
Example
Query
query ShopInventoryStats($shopId: ID!) {
shopInventoryStats(shopId: $shopId) {
categories {
conditions {
condition
count
}
count
}
noOfCategories
noOfOffers
noOfProducts
offers {
conditions {
condition
count
}
count
}
products {
conditions {
condition
count
}
count
}
}
}
Variables
{"shopId": 4}
Response
{
"data": {
"shopInventoryStats": {
"categories": InventoryStats,
"noOfCategories": 123,
"noOfOffers": 987,
"noOfProducts": 987,
"offers": InventoryStats,
"products": InventoryStats
}
}
}
shopReports
Description
Get all reports for a shop.
The user must have the "INSIGHTS_API" feature enabled for the shop.
Response
Returns a ShopReports!
Arguments
| Name | Description |
|---|---|
filter - ShopReportFilterOptions
|
The filter options. |
first - UInt
|
How many edges to fetch from offset. Defaults to 100 (max value). |
offset - UInt
|
The offset. Defaults to 0. |
shopId - ID!
|
The shop id. |
Example
Query
query ShopReports(
$filter: ShopReportFilterOptions,
$first: UInt,
$offset: UInt,
$shopId: ID!
) {
shopReports(
filter: $filter,
first: $first,
offset: $offset,
shopId: $shopId
) {
edges {
node {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
pageInfo {
hasNextPage
hasPreviousPage
}
totalCount
}
}
Variables
{
"filter": ShopReportFilterOptions,
"first": UInt,
"offset": UInt,
"shopId": "4"
}
Response
{
"data": {
"shopReports": {
"edges": [ShopReportEdge],
"pageInfo": PageInfo,
"totalCount": UInt
}
}
}
Mutations
createReportLinks
Description
Create download links to a created report.
The user must have either the "INSIGHTS_API" feature enabled for the shop, or the "BRAND_INSIGHTS" feature enabled for the brand service ID for the report.
Response
Returns a ReportLinks!
Arguments
| Name | Description |
|---|---|
reportId - ID!
|
The report ID. |
Example
Query
mutation CreateReportLinks($reportId: ID!) {
createReportLinks(reportId: $reportId) {
links {
expiresAt
url
}
}
}
Variables
{"reportId": 4}
Response
{"data": {"createReportLinks": {"links": [ReportLink]}}}
requestBrandInventoryAnalysisReport
Description
Request a product inventory analysis report for a brand service over a specific category to be created. The report will be accessible for 90 days. Brand service ids can be fetched with the currentUser query.
The user must have the "BRAND_INSIGHTS" feature enabled for the brand service to request this report.
The report status can be polled with the query 'brandReports'. When created, reports can be downloaded with the URLs returned by the mutation 'createReportLinks'
Response
Returns a BrandReportInfo!
Arguments
| Name | Description |
|---|---|
brandServiceId - ID!
|
The brand service id. |
categoryId - String!
|
The category id. |
filter - BrandInventoryAnalysisFilterOptions
|
Filter options. |
Example
Query
mutation RequestBrandInventoryAnalysisReport(
$brandServiceId: ID!,
$categoryId: String!,
$filter: BrandInventoryAnalysisFilterOptions
) {
requestBrandInventoryAnalysisReport(
brandServiceId: $brandServiceId,
categoryId: $categoryId,
filter: $filter
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{
"brandServiceId": "4",
"categoryId": "abc123",
"filter": BrandInventoryAnalysisFilterOptions
}
Response
{
"data": {
"requestBrandInventoryAnalysisReport": {
"contentEncoding": "xyz789",
"contentType": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "BRAND_INVENTORY_ANALYSIS"
}
}
}
requestClickCostsPerDayReport
Description
Request a click costs per day report to be created. The report details a shop's click costs per day for the specified time period. The report will be accessible for 90 days.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
The report status can be polled with the query 'shopReports'. When created, reports can be downloaded with the URLs returned by the mutation 'createReportLinks'
Response
Returns a ShopReportInfo!
Arguments
| Name | Description |
|---|---|
categoryIds - [String!]
|
The category ids to use as filter |
dateRange - DateRange!
|
Select a custom date range. Maximum 100 days. |
shopId - ID!
|
The shop id. |
Example
Query
mutation RequestClickCostsPerDayReport(
$categoryIds: [String!],
$dateRange: DateRange!,
$shopId: ID!
) {
requestClickCostsPerDayReport(
categoryIds: $categoryIds,
dateRange: $dateRange,
shopId: $shopId
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{
"categoryIds": ["xyz789"],
"dateRange": DateRange,
"shopId": "4"
}
Response
{
"data": {
"requestClickCostsPerDayReport": {
"contentEncoding": "abc123",
"contentType": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": "4",
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
}
}
requestOfferClickCostsReport
Description
Request an offer click costs report to be created. The report details a shop's click costs per offer for the specified time period. The report will be accessible for 90 days.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
The report status can be polled with the query 'shopReports'. When created, reports can be downloaded with the URLs returned by the mutation 'createReportLinks'
Response
Returns a ShopReportInfo!
Arguments
| Name | Description |
|---|---|
categoryIds - [String!]
|
The category ids to use as filter |
dateRange - DateRange!
|
Select a custom date range. Maximum 100 days. |
shopId - ID!
|
The shop id. |
Example
Query
mutation RequestOfferClickCostsReport(
$categoryIds: [String!],
$dateRange: DateRange!,
$shopId: ID!
) {
requestOfferClickCostsReport(
categoryIds: $categoryIds,
dateRange: $dateRange,
shopId: $shopId
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{
"categoryIds": ["abc123"],
"dateRange": DateRange,
"shopId": 4
}
Response
{
"data": {
"requestOfferClickCostsReport": {
"contentEncoding": "xyz789",
"contentType": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
}
}
requestProductClickCostsReport
Description
Request a product click costs report to be created. The report details a shop's click costs per product for the specified time period. The report will be accessible for 90 days.
The user must have the "INSIGHTS_API_CLICK_AND_COST" feature enabled for the shop.
The report status can be polled with the query 'shopReports'. When created, reports can be downloaded with the URLs returned by the mutation 'createReportLinks'
Response
Returns a ShopReportInfo!
Example
Query
mutation RequestProductClickCostsReport(
$categoryIds: [String!],
$dateRange: DateRange,
$shopId: ID!
) {
requestProductClickCostsReport(
categoryIds: $categoryIds,
dateRange: $dateRange,
shopId: $shopId
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{
"categoryIds": ["xyz789"],
"dateRange": DateRange,
"shopId": "4"
}
Response
{
"data": {
"requestProductClickCostsReport": {
"contentEncoding": "abc123",
"contentType": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
}
}
requestShopInventoryAnalysisReport
Description
Request a product inventory analysis report for a shop over a specific category to be created. The report will be accessible for 90 days.
The user must have the "INSIGHTS_API_INVENTORY_ANALYSIS" feature enabled for the shop.
Response
Returns a ShopReportInfo!
Arguments
| Name | Description |
|---|---|
categoryId - String!
|
The category id. |
filter - ShopInventoryAnalysisFilterOptions
|
Filter options. |
shopId - ID!
|
The shop id. |
Example
Query
mutation RequestShopInventoryAnalysisReport(
$categoryId: String!,
$filter: ShopInventoryAnalysisFilterOptions,
$shopId: ID!
) {
requestShopInventoryAnalysisReport(
categoryId: $categoryId,
filter: $filter,
shopId: $shopId
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{
"categoryId": "abc123",
"filter": ShopInventoryAnalysisFilterOptions,
"shopId": 4
}
Response
{
"data": {
"requestShopInventoryAnalysisReport": {
"contentEncoding": "xyz789",
"contentType": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
}
}
requestShopOfferInventoryReport
Description
Request a shop offer inventory report to be created. The report will be accessible for 90 days.
The user must have the "STATISTICS_FEED" feature enabled for the shop.
The report status can be polled with the query 'shopReports'. When created, reports can be downloaded with the URLs returned by the mutation 'createReportLinks'
Response
Returns a ShopReportInfo!
Arguments
| Name | Description |
|---|---|
filter - ShopOfferInventoryFilterOptions
|
|
shopId - ID!
|
The shop ID. |
Example
Query
mutation RequestShopOfferInventoryReport(
$filter: ShopOfferInventoryFilterOptions,
$shopId: ID!
) {
requestShopOfferInventoryReport(
filter: $filter,
shopId: $shopId
) {
contentEncoding
contentType
createdAt
deletedAt
id
noOfFiles
requestedAt
size
startedAt
state
type
}
}
Variables
{"filter": ShopOfferInventoryFilterOptions, "shopId": 4}
Response
{
"data": {
"requestShopOfferInventoryReport": {
"contentEncoding": "abc123",
"contentType": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
}
}
Types
AggregatedProductClickCostsPerDay
Fields
| Field Name | Description |
|---|---|
date - Date!
|
Date as "yyyy-MM-dd". |
productSegmentCosts - [ProductSegmentCost!]!
|
Example
{
"date": "2007-12-03",
"productSegmentCosts": [ProductSegmentCost]
}
Boolean
Description
The Boolean scalar type represents true or false.
Example
true
Brand
BrandInventoryAnalysisFilterOptions
Fields
| Input Field | Description |
|---|---|
includeCompetitorProducts - Boolean
|
Filter to include all competitor products (not only the subject's products). |
productCondition - [ProductCondition!]
|
Inclusive filter for product conditions. Defaults to ['NEW'] |
stock - [StockStatusType!]
|
Inclusive filter for stock status. |
Example
{
"includeCompetitorProducts": false,
"productCondition": ["ALMOST_NEW"],
"stock": ["BACKORDER"]
}
BrandReportEdge
Fields
| Field Name | Description |
|---|---|
node - BrandReportInfo!
|
The report info node. |
Example
{"node": BrandReportInfo}
BrandReportFilterOptions
Fields
| Input Field | Description |
|---|---|
ids - [ID!]
|
Report ids to filter reports by. |
states - [ReportState!]
|
Report states to filter reports by. |
types - [BrandReportType!]
|
Report types to filter reports by. |
Example
{
"ids": ["4"],
"states": ["CREATED"],
"types": ["BRAND_INVENTORY_ANALYSIS"]
}
BrandReportInfo
Fields
| Field Name | Description |
|---|---|
contentEncoding - String
|
The content encoding. |
contentType - String
|
The content type. |
createdAt - DateTime
|
Timestamp when the report was created. |
deletedAt - DateTime
|
Timestamp when the report was deleted. |
id - ID!
|
The report ID. |
noOfFiles - UInt
|
The number of files. |
requestedAt - DateTime!
|
Timestamp when the report creation was requested. |
size - UInt
|
The report size in bytes. |
startedAt - DateTime
|
Timestamp when the report creation started. |
state - ReportState!
|
The report state. |
type - BrandReportType!
|
The report type. |
Example
{
"contentEncoding": "abc123",
"contentType": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": 4,
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "BRAND_INVENTORY_ANALYSIS"
}
BrandReportType
Values
| Enum Value | Description |
|---|---|
|
|
The brand inventory analysis report. |
Example
"BRAND_INVENTORY_ANALYSIS"
BrandReports
Fields
| Field Name | Description |
|---|---|
edges - [BrandReportEdge!]!
|
The edges, ordered by requestedAt DESC. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
Example
{
"edges": [BrandReportEdge],
"pageInfo": PageInfo,
"totalCount": UInt
}
BrandService
BrandServicePermission
Values
| Enum Value | Description |
|---|---|
|
|
Permission to get inventory analysis data. |
|
|
Permission to get brand market share data. |
|
|
Permission to list reports and create report links. |
Example
"BRAND_INVENTORY_ANALYSIS"
BrandServicePermissions
Fields
| Field Name | Description |
|---|---|
brandService - BrandService!
|
The brand service. |
permissions - [BrandServicePermission!]!
|
Permissions the user has on the brand service. |
Example
{
"brandService": BrandService,
"permissions": ["BRAND_INVENTORY_ANALYSIS"]
}
CategoryNode
Description
The category node.
Fields
| Field Name | Description |
|---|---|
childIds - [String!]!
|
Array of children category ids. For leaf categories the array will be empty. |
id - String!
|
Id of the category. |
name - String!
|
Name of the category. |
parentId - String
|
Id of the category's parent category. Main categories do not have this property. |
type - CategoryType!
|
Category type. Main, sub or leaf. |
Example
{
"childIds": ["abc123"],
"id": "xyz789",
"name": "abc123",
"parentId": "abc123",
"type": "LEAF"
}
CategorySegment
CategoryTreeFilterOptions
CategoryType
Description
The category type.
Values
| Enum Value | Description |
|---|---|
|
|
Product level category. This is the lowest category level and the only category type that contains products. Leaf categories have a main or sub category as parent category and do not have children. |
|
|
Top level category. This is a root node in a top-down visualization. Main categories have sub or leaf categories as children and do not have a parent category. |
|
|
Middle level category. This is a sub category that narrows the scope of its parent. Sub categories have other sub or leaf categories as children and a main or sub category as parent category. |
Example
"LEAF"
ClicksWithCost
Description
Clicks with cost.
Fields
| Field Name | Description |
|---|---|
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
Example
{
"clicks": UInt,
"cost": CostWithDiscount
}
CostItem
Example
{
"currency": "AUD",
"discount": Money,
"discountRate": 123.45,
"exclDiscount": Money,
"inclDiscount": Money
}
CostItems
CostWithDiscount
Description
Cost with discount.
Fields
| Field Name | Description |
|---|---|
costItems - CostItems!
|
The cost for each cost item. |
currency - Currency!
|
The currency. |
discount - Money
|
The discount. |
discountRate - Float
|
The discount rate as permyriad (1/10000) in float. |
exclDiscount - Money!
|
The cost excluding discounts. |
inclDiscount - Money!
|
The cost including discounts. |
Example
{
"costItems": CostItems,
"currency": "AUD",
"discount": Money,
"discountRate": 123.45,
"exclDiscount": Money,
"inclDiscount": Money
}
Currency
Description
The currency (ISO 4217).
Values
| Enum Value | Description |
|---|---|
|
|
Australian dollar. |
|
|
Danish crown. |
|
|
Euro. |
|
|
British pound. |
|
|
Norwegian crown. |
|
|
New Zealand dollar. |
|
|
Swedish crown. |
Example
"AUD"
CurrentUser
Fields
| Field Name | Description |
|---|---|
brandServices - [BrandServicePermissions!]!
|
The list of brand services and permissions the user has access to. |
id - ID!
|
The id of the user. |
role - UserRole!
|
The role of the current user. |
shops - [ShopPermissions!]!
|
The list of shops and permissions the user has access to. |
Example
{
"brandServices": [BrandServicePermissions],
"id": "4",
"role": "ADMIN",
"shops": [ShopPermissions]
}
Date
Description
A date string in format "yyyy-MM-dd".
Example
"2007-12-03"
DateRange
DateRangeType
DateTime
Description
A date-time string at UTC as yyyy-MM-ddTHH:mm:ss.SSSZ.
Example
"2007-12-03T10:15:30Z"
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
Forecast
Fields
| Field Name | Description |
|---|---|
cost - CostWithDiscount!
|
The total cost. |
Example
{"cost": CostWithDiscount}
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
"4"
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
InventoryStats
Fields
| Field Name | Description |
|---|---|
conditions - [InventoryStatsPerProductCondition!]!
|
The product conditions. |
count - Int!
|
The count. |
Example
{
"conditions": [InventoryStatsPerProductCondition],
"count": 123
}
InventoryStatsPerProductCondition
Fields
| Field Name | Description |
|---|---|
condition - ProductCondition!
|
The product condition. |
count - Int!
|
The number of offers with this product condition. |
Example
{"condition": "ALMOST_NEW", "count": 987}
Market
Description
The market (ISO 3166-1 alpha-2 compliant).
Values
| Enum Value | Description |
|---|---|
|
|
Denmark. |
|
|
Finland. |
|
|
France. |
|
|
Great Britain. |
|
|
Norway. |
|
|
New Zealand. |
|
|
Sweden. |
Example
"DK"
Money
Description
A monetary value represented in micros (1/1,000,000th of the currency).
Example
Money
Offer
Fields
| Field Name | Description |
|---|---|
id - String!
|
The offer identifier |
Example
{"id": "abc123"}
PageInfo
Product
ProductClickCosts
Fields
| Field Name | Description |
|---|---|
edges - [ProductEdge!]!
|
A list of edges. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"edges": [ProductEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
ProductClickCostsPerDay
Fields
| Field Name | Description |
|---|---|
edges - [ProductClickCostsPerDayEdge!]!
|
A list of edges. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"edges": [ProductClickCostsPerDayEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
ProductClickCostsPerDayEdge
Fields
| Field Name | Description |
|---|---|
node - ProductClickCostsPerDayNode!
|
The product per day node. |
Example
{"node": ProductClickCostsPerDayNode}
ProductClickCostsPerDayNode
Fields
| Field Name | Description |
|---|---|
costs - [ProductCostsPerDay!]!
|
The costs per day. |
product - Product!
|
The product. |
Example
{
"costs": [ProductCostsPerDay],
"product": Product
}
ProductCondition
Values
| Enum Value | Description |
|---|---|
|
|
The product is both technically and visually almost like new, condition has been verified by the company and has at least a 1-year warranty. |
|
|
The product is new but the packaging is damaged or missing. May be due to the packaging being damaged in transport. |
|
|
The product has been used as an exhibition sample and is therefore not in intact packaging, or the product is completely without packaging. |
|
|
The product is new. |
|
|
The product is reconditioned/renovated. |
|
|
The product has been previously used. |
Example
"ALMOST_NEW"
ProductCostsPerDay
Fields
| Field Name | Description |
|---|---|
category - CategorySegment!
|
The category. |
clickPrice - CostWithDiscount!
|
The price per click. |
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
date - Date!
|
The date as 'yyyy-MM-dd'. |
Example
{
"category": CategorySegment,
"clickPrice": CostWithDiscount,
"clicks": UInt,
"cost": CostWithDiscount,
"date": "2007-12-03"
}
ProductEdge
Fields
| Field Name | Description |
|---|---|
node - ProductNode!
|
The product node. |
Example
{"node": ProductNode}
ProductNode
Fields
| Field Name | Description |
|---|---|
category - CategorySegment!
|
The category. |
clickPrice - CostWithDiscount!
|
The price per click. |
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
product - Product!
|
The product. |
Example
{
"category": CategorySegment,
"clickPrice": CostWithDiscount,
"clicks": UInt,
"cost": CostWithDiscount,
"product": Product
}
ProductSegmentCost
Fields
| Field Name | Description |
|---|---|
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
name - String!
|
The segment name. |
Example
{
"clicks": UInt,
"cost": CostWithDiscount,
"name": "xyz789"
}
ReportLink
ReportLinks
Fields
| Field Name | Description |
|---|---|
links - [ReportLink!]!
|
The report links. |
Example
{"links": [ReportLink]}
ReportState
Values
| Enum Value | Description |
|---|---|
|
|
Report has been created. |
|
|
Report has been deleted. |
|
|
Report could not be created. |
|
|
Report creation is requested. |
|
|
Report creation has started. |
Example
"CREATED"
Segment
Shop
ShopInventoryAnalysisFilterOptions
Fields
| Input Field | Description |
|---|---|
excludeOffersFromNonFeaturedShops - Boolean
|
Filter to exclude offers from non-featured shops. |
excludeOffersWithoutShipping - Boolean
|
Filter to exclude offers without shipping. |
includeCompetitorProducts - Boolean
|
Filter to include all competitor products (not only the subject's products). |
productCondition - [ProductCondition!]
|
Inclusive filter for product conditions. Defaults to ['NEW'] |
stock - [StockStatusType!]
|
Inclusive filter for stock status. |
Example
{
"excludeOffersFromNonFeaturedShops": false,
"excludeOffersWithoutShipping": true,
"includeCompetitorProducts": true,
"productCondition": ["ALMOST_NEW"],
"stock": ["BACKORDER"]
}
ShopInventoryStats
Fields
| Field Name | Description |
|---|---|
categories - InventoryStats!
|
Category statistics. |
noOfCategories - Int!
|
The total number of leaf categories. Use categories.count instead. |
noOfOffers - Int!
|
The total number of offers. Use offers.count instead. |
noOfProducts - Int!
|
The total number of products. Use products.count instead. |
offers - InventoryStats!
|
Offer statistics. |
products - InventoryStats!
|
Product statistics. |
Example
{
"categories": InventoryStats,
"noOfCategories": 123,
"noOfOffers": 987,
"noOfProducts": 123,
"offers": InventoryStats,
"products": InventoryStats
}
ShopOfferInventoryFilterOptions
Fields
| Input Field | Description |
|---|---|
productCondition - [ProductCondition!]
|
Inclusive filter for product conditions. Defaults to ['NEW'] |
Example
{"productCondition": ["ALMOST_NEW"]}
ShopPermission
Values
| Enum Value | Description |
|---|---|
|
|
Permission to get click & cost data. Use features instead of permissions. |
|
|
Permission to get inventory analysis data. Use features instead of permissions. |
|
|
Permission to get shop market share data. Use features instead of permissions. |
|
|
Permission to get the shop offer inventory report. Use features instead of permissions. |
|
|
Permission to list reports and create report links. Use features instead of permissions. |
Example
"CLICK_AND_COST"
ShopPermissions
Fields
| Field Name | Description |
|---|---|
features - [String!]!
|
Features enabled for the shop. |
permissions - [ShopPermission!]!
|
Permissions the user has on the shop. Permissions is replaced by features. |
shop - Shop!
|
The shop. |
Example
{
"features": ["xyz789"],
"permissions": ["CLICK_AND_COST"],
"shop": Shop
}
ShopReportEdge
Fields
| Field Name | Description |
|---|---|
node - ShopReportInfo!
|
The report info node. |
Example
{"node": ShopReportInfo}
ShopReportFilterOptions
Fields
| Input Field | Description |
|---|---|
ids - [ID!]
|
Report ids to filter reports by. |
states - [ReportState!]
|
Report states to filter reports by. |
types - [ShopReportType!]
|
Report types to filter reports by. |
Example
{"ids": [4], "states": ["CREATED"], "types": ["CLICK_COSTS_PER_DAY"]}
ShopReportInfo
Fields
| Field Name | Description |
|---|---|
contentEncoding - String
|
The content encoding. |
contentType - String
|
The content type. |
createdAt - DateTime
|
Timestamp when the report was created. |
deletedAt - DateTime
|
Timestamp when the report was deleted. |
id - ID!
|
The report ID. |
noOfFiles - UInt
|
The number of files. |
requestedAt - DateTime!
|
Timestamp when the report creation was requested. |
size - UInt
|
The report size in bytes. |
startedAt - DateTime
|
Timestamp when the report creation started. |
state - ReportState!
|
The report state. |
type - ShopReportType!
|
The report type. |
Example
{
"contentEncoding": "abc123",
"contentType": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"deletedAt": "2007-12-03T10:15:30Z",
"id": "4",
"noOfFiles": UInt,
"requestedAt": "2007-12-03T10:15:30Z",
"size": UInt,
"startedAt": "2007-12-03T10:15:30Z",
"state": "CREATED",
"type": "CLICK_COSTS_PER_DAY"
}
ShopReportType
Values
| Enum Value | Description |
|---|---|
|
|
The click costs per day report. |
|
|
The offer click costs report. |
|
|
The product click costs report. |
|
|
The shop inventory analysis report. |
|
|
The shop offer inventory report. |
Example
"CLICK_COSTS_PER_DAY"
ShopReports
Fields
| Field Name | Description |
|---|---|
edges - [ShopReportEdge!]!
|
The edges, ordered by requestedAt DESC. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
Example
{
"edges": [ShopReportEdge],
"pageInfo": PageInfo,
"totalCount": UInt
}
ShopWithMarket
StockStatusType
Values
| Enum Value | Description |
|---|---|
|
|
The product is not available at the moment, but accepting orders and it'll be shipped as soon as it becomes available again. |
|
|
The product is not available at the moment, but accepting orders and it'll be shipped as soon as it becomes available again. Use BACKORDER instead. |
|
|
Currently accepting orders for this product and can fulfill the purchase request directly. |
|
|
Currently not accepting orders for this product. |
|
|
Currently accepting orders, but it's not yet released for sale. |
|
|
Unknown stock status. |
Example
"BACKORDER"
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
SubtotalClickCosts
Fields
| Field Name | Description |
|---|---|
expert - ClicksWithCost!
|
The cost for expert clicks. |
homepage - ClicksWithCost!
|
The cost for homepage clicks. |
membership - ClicksWithCost!
|
The cost for membership clicks. |
product - ClicksWithCost!
|
The cost for all product segment clicks. |
productSubtotals - [ProductSegmentCost!]!
|
The product segment subtotal cost. |
promotionPage - ClicksWithCost!
|
The cost for promotion page clicks. |
Example
{
"expert": ClicksWithCost,
"homepage": ClicksWithCost,
"membership": ClicksWithCost,
"product": ClicksWithCost,
"productSubtotals": [ProductSegmentCost],
"promotionPage": ClicksWithCost
}
SubtotalClickCostsPerDay
Fields
| Field Name | Description |
|---|---|
date - Date!
|
Date as "yyyy-MM-dd". |
subtotals - SubtotalClickCosts!
|
The subtotal cost for the day. |
Example
{
"date": "2007-12-03",
"subtotals": SubtotalClickCosts
}
TimeResolution
Description
The time resolution.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
"DAY"
TotalClickCosts
Fields
| Field Name | Description |
|---|---|
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The total cost. |
dateRange - DateRangeType!
|
The date range. |
forecast - Forecast
|
The forecasted costs for the current month. |
month - String
|
The month as 'YYYY-MM'. Use dateRange instead. |
shop - ShopWithMarket!
|
The shop. |
subtotals - SubtotalClickCosts!
|
The subtotal cost. |
subtotalsPerDay - [SubtotalClickCostsPerDay!]!
|
The subtotal cost per day. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"clicks": UInt,
"cost": CostWithDiscount,
"dateRange": DateRangeType,
"forecast": Forecast,
"month": "xyz789",
"shop": ShopWithMarket,
"subtotals": SubtotalClickCosts,
"subtotalsPerDay": [SubtotalClickCostsPerDay],
"updatedAt": "2007-12-03T10:15:30Z"
}
UInt
Description
An unsigned integer.
Example
UInt
UserRole
Values
| Enum Value | Description |
|---|---|
|
|
Admin role. |
|
|
Service role. |
Example
"ADMIN"