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 and Permissions

In order to authenticate, you can call the endpoint https://auth.pj.nu/oauth2/token. You need to have a gravitee application and send a combination of clientId and clientSecret.

An example request in curl would look like this:

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 user permissions, which you can find documented in the API reference. You can run the "currentUser" query to see which permissions you currently have.

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": [ ... ]
}

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.

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]
      }
    ]
  }
}

brand

Description

Get info about a brand.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Response

Returns a BrandInfo!

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandFilterOptions The filter options.
market - Market! The market.

Example

Query
query Brand(
  $brandId: ID!,
  $filter: BrandFilterOptions,
  $market: Market!
) {
  brand(
    brandId: $brandId,
    filter: $filter,
    market: $market
  ) {
    brandCount
    brands {
      id
      name
    }
    shopCount
    shops {
      id
      name
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandFilterOptions,
  "market": "DK"
}
Response
{
  "data": {
    "brand": {
      "brandCount": UInt,
      "brands": [Brand],
      "shopCount": UInt,
      "shops": [Shop]
    }
  }
}

brandClickDistributionByCategory

Description

Get the distribution of product clicks on a brand's products across categories.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickDistributionByCategoryFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickDistributionByCategory(
  $brandId: ID!,
  $filter: BrandClickDistributionByCategoryFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $toDate: Date!
) {
  brandClickDistributionByCategory(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    toDate: $toDate
  ) {
    distribution {
      amount
      category {
        id
        market
        name
      }
    }
  }
}
Variables
{
  "brandId": "4",
  "filter": BrandClickDistributionByCategoryFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickDistributionByCategory": {
      "distribution": [CategoryDistribution]
    }
  }
}

brandClickDistributionByCategoryOverTime

Description

Get the distribution of product clicks on a brand's products across categories over time.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickDistributionByCategoryOverTimeFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
timeResolution - TimeResolution! The time resolution.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickDistributionByCategoryOverTime(
  $brandId: ID!,
  $filter: BrandClickDistributionByCategoryOverTimeFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $timeResolution: TimeResolution!,
  $toDate: Date!
) {
  brandClickDistributionByCategoryOverTime(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    timeResolution: $timeResolution,
    toDate: $toDate
  ) {
    edges {
      node {
        distribution {
          amount
          category {
            id
            market
            name
          }
        }
        fromDate
        toDate
      }
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandClickDistributionByCategoryOverTimeFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "timeResolution": "DAY",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickDistributionByCategoryOverTime": {
      "edges": [
        BrandClickDistributionByCategoryOverTimeEdge
      ]
    }
  }
}

brandClickDistributionByShop

Description

Get the distribution of product clicks on a brand's products across shops that sell the brand's products.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Response

Returns a BrandClickDistributionByShop!

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickDistributionByShopFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickDistributionByShop(
  $brandId: ID!,
  $filter: BrandClickDistributionByShopFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $toDate: Date!
) {
  brandClickDistributionByShop(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    toDate: $toDate
  ) {
    distribution {
      amount
      shop {
        id
        name
      }
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandClickDistributionByShopFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickDistributionByShop": {
      "distribution": [ShopDistribution]
    }
  }
}

brandClickDistributionByShopOverTime

Description

Get the distribution of product clicks on a brand's products across shops over time.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickDistributionByShopOverTimeFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
timeResolution - TimeResolution! The time resolution.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickDistributionByShopOverTime(
  $brandId: ID!,
  $filter: BrandClickDistributionByShopOverTimeFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $timeResolution: TimeResolution!,
  $toDate: Date!
) {
  brandClickDistributionByShopOverTime(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    timeResolution: $timeResolution,
    toDate: $toDate
  ) {
    edges {
      node {
        distribution {
          amount
          shop {
            id
            name
          }
        }
        fromDate
        toDate
      }
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandClickDistributionByShopOverTimeFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "timeResolution": "DAY",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickDistributionByShopOverTime": {
      "edges": [BrandClickDistributionByShopOverTimeEdge]
    }
  }
}

brandClickMarketShare

Description

Get the market share of product clicks for the brand and its competitors calculated over the subject brand's categories.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Response

Returns a BrandClickMarketShares!

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickMarketShareFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickMarketShare(
  $brandId: ID!,
  $filter: BrandClickMarketShareFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $toDate: Date!
) {
  brandClickMarketShare(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    toDate: $toDate
  ) {
    shares {
      brand {
        id
        name
      }
      share
    }
    subject {
      brand {
        id
        name
      }
      share
    }
  }
}
Variables
{
  "brandId": "4",
  "filter": BrandClickMarketShareFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickMarketShare": {
      "shares": [BrandClickMarketShare],
      "subject": BrandClickMarketShare
    }
  }
}

brandClickMarketShareByCategory

Description

Get the market share for the brand and its competitors calculated over the subject brands categories.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickMarketShareByCategoryFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickMarketShareByCategory(
  $brandId: ID!,
  $filter: BrandClickMarketShareByCategoryFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $toDate: Date!
) {
  brandClickMarketShareByCategory(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    toDate: $toDate
  ) {
    shares {
      category {
        id
        market
        name
      }
      share
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandClickMarketShareByCategoryFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickMarketShareByCategory": {
      "shares": [CategoryMarketShare]
    }
  }
}

brandClickMarketShareOverTime

Description

Get the market share of product clicks for the brand and its competitors over time calculated over the subject brand's categories.

The user must have the "BRAND_MARKET_SHARE" permission on the brand id.

Response

Returns a BrandClickMarketShareOverTime!

Arguments
Name Description
brandId - ID! The brand id.
filter - BrandClickMarketShareOverTimeFilterOptions The filter options.
fromDate - Date! From date as "yyyy-MM-dd".
market - Market! The market.
timeResolution - TimeResolution! The time resolution.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query BrandClickMarketShareOverTime(
  $brandId: ID!,
  $filter: BrandClickMarketShareOverTimeFilterOptions,
  $fromDate: Date!,
  $market: Market!,
  $timeResolution: TimeResolution!,
  $toDate: Date!
) {
  brandClickMarketShareOverTime(
    brandId: $brandId,
    filter: $filter,
    fromDate: $fromDate,
    market: $market,
    timeResolution: $timeResolution,
    toDate: $toDate
  ) {
    edges {
      node {
        fromDate
        shares {
          brand {
            id
            name
          }
          share
        }
        subject {
          brand {
            id
            name
          }
          share
        }
        toDate
      }
    }
  }
}
Variables
{
  "brandId": 4,
  "filter": BrandClickMarketShareOverTimeFilterOptions,
  "fromDate": "2007-12-03",
  "market": "DK",
  "timeResolution": "DAY",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "brandClickMarketShareOverTime": {
      "edges": [BrandClickMarketShareOverTimeEdge]
    }
  }
}

brandInventoryAnalysis

Description

Get a product inventory analysis for a brand over a specific category.

The user must have the role "ADMIN" to be able to perform this query.

Response

Returns a BrandInventoryAnalysis!

Arguments
Name Description
brandId - ID! The brand id.
categoryId - String! The category id.
filter - BrandInventoryFilterOptions Filter options.
first - UInt How many edges to fetch from offset. Defaults to 10 and max value is 1000.
market - Market! The market.
offset - UInt The offset. Defaults to 0.

Example

Query
query BrandInventoryAnalysis(
  $brandId: ID!,
  $categoryId: String!,
  $filter: BrandInventoryFilterOptions,
  $first: UInt,
  $market: Market!,
  $offset: UInt
) {
  brandInventoryAnalysis(
    brandId: $brandId,
    categoryId: $categoryId,
    filter: $filter,
    first: $first,
    market: $market,
    offset: $offset
  ) {
    edges {
      node {
        category {
          id
          market
          name
        }
        noOfShops
        product {
          brand {
            id
            name
          }
          id
          market
          name
          popularity {
            global
            inCategory
          }
        }
        shopOffers {
          offers {
            id
            lowestPriceDelta {
              currency
              exclShipping
              inclShipping
            }
            originalPrice {
              currency
              exclShipping
              inclShipping
            }
            price {
              currency
              exclShipping
              inclShipping
            }
            productCondition
            stock
          }
          position
          shop {
            id
            isFeatured
            name
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    totalCount
  }
}
Variables
{
  "brandId": "4",
  "categoryId": "xyz789",
  "filter": BrandInventoryFilterOptions,
  "first": UInt,
  "market": "DK",
  "offset": UInt
}
Response
{
  "data": {
    "brandInventoryAnalysis": {
      "edges": [BrandInventoryProductEdge],
      "pageInfo": PageInfo,
      "totalCount": UInt
    }
  }
}

brandReports

Description

Get all reports for a brand service.

The user must have the "BRAND_REPORT" permission on 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": "abc123",
        "name": "abc123",
        "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 "CLICK_AND_COST" permission on the shop id.

Response

Returns a TotalClickCosts!

Arguments
Name Description
categoryIds - [String!] The category ids to use as filter
dateRange - DateRange Select a custom date range. Maximum 190 days.
promotionId - String The promotion id to use as filter
shopId - ID! The shop id.

Example

Query
query ClickCosts(
  $categoryIds: [String!],
  $dateRange: DateRange,
  $promotionId: String,
  $shopId: ID!
) {
  clickCosts(
    categoryIds: $categoryIds,
    dateRange: $dateRange,
    promotionId: $promotionId,
    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": "xyz789",
  "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 "CLICK_AND_COST" permission on all shop ids.

Response

Returns [TotalClickCosts!]!

Arguments
Name Description
dateRange - DateRange Select a custom date range. Maximum 190 days.
shopIds - [ID!]! List of shop ids.

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": "xyz789",
        "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 {
      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 "CLICK_AND_COST" permission on the shop id.

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
shopId - ID! The shop id.

Example

Query
query ProductClickCosts(
  $categoryIds: [String!],
  $dateRange: DateRange,
  $first: UInt,
  $offset: UInt,
  $productIds: [String!],
  $shopId: ID!
) {
  productClickCosts(
    categoryIds: $categoryIds,
    dateRange: $dateRange,
    first: $first,
    offset: $offset,
    productIds: $productIds,
    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"],
  "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 "CLICK_AND_COST" permission on the shop id.

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
shopId - ID! The shop id.

Example

Query
query ProductClickCostsPerDay(
  $categoryIds: [String!],
  $dateRange: DateRange!,
  $first: UInt,
  $offset: UInt,
  $productIds: [String!],
  $shopId: ID!
) {
  productClickCostsPerDay(
    categoryIds: $categoryIds,
    dateRange: $dateRange,
    first: $first,
    offset: $offset,
    productIds: $productIds,
    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": ["xyz789"],
  "dateRange": DateRange,
  "first": UInt,
  "offset": UInt,
  "productIds": ["abc123"],
  "shopId": "4"
}
Response
{
  "data": {
    "productClickCostsPerDay": {
      "edges": [ProductClickCostsPerDayEdge],
      "pageInfo": PageInfo,
      "totalCount": UInt,
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

shopClickMarketShare

Description

Get the share of product clicks for a shop in relation to competing shops.

The user must have the "SHOP_MARKET_SHARE" permission on the shop id.

Response

Returns a ShopClickMarketShares!

Arguments
Name Description
filter - ShopClickMarketShareFilter Filter options.
fromDate - Date! From date as "yyyy-MM-dd".
shopId - ID! The subject's shop id.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query ShopClickMarketShare(
  $filter: ShopClickMarketShareFilter,
  $fromDate: Date!,
  $shopId: ID!,
  $toDate: Date!
) {
  shopClickMarketShare(
    filter: $filter,
    fromDate: $fromDate,
    shopId: $shopId,
    toDate: $toDate
  ) {
    shares {
      share
      shop {
        id
        name
      }
    }
    subject {
      share
      shop {
        id
        name
      }
    }
  }
}
Variables
{
  "filter": ShopClickMarketShareFilter,
  "fromDate": "2007-12-03",
  "shopId": 4,
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "shopClickMarketShare": {
      "shares": [ShopClickMarketShare],
      "subject": ShopClickMarketShare
    }
  }
}

shopClickMarketShareOverTime

Description

Get the share of product clicks for a shop in relation to competing shops over time.

The user must have the "SHOP_MARKET_SHARE" permission on the shop id.

Response

Returns a ShopClickMarketShareOverTime!

Arguments
Name Description
filter - ShopClickMarketShareOverTimeFilter Filter options.
fromDate - Date! From date as "yyyy-MM-dd".
shopId - ID! The subject's shop id.
timeResolution - TimeResolution The time resolution on the market share time series. Defaults to DAY.
toDate - Date! To date as "yyyy-MM-dd".

Example

Query
query ShopClickMarketShareOverTime(
  $filter: ShopClickMarketShareOverTimeFilter,
  $fromDate: Date!,
  $shopId: ID!,
  $timeResolution: TimeResolution,
  $toDate: Date!
) {
  shopClickMarketShareOverTime(
    filter: $filter,
    fromDate: $fromDate,
    shopId: $shopId,
    timeResolution: $timeResolution,
    toDate: $toDate
  ) {
    edges {
      node {
        fromDate
        shares {
          share
          shop {
            id
            name
          }
        }
        subject {
          share
          shop {
            id
            name
          }
        }
        toDate
      }
    }
  }
}
Variables
{
  "filter": ShopClickMarketShareOverTimeFilter,
  "fromDate": "2007-12-03",
  "shopId": "4",
  "timeResolution": "DAY",
  "toDate": "2007-12-03"
}
Response
{
  "data": {
    "shopClickMarketShareOverTime": {
      "edges": [ShopClickMarketShareOverTimeEdge]
    }
  }
}

shopInventoryAnalysis

Description

Get a product inventory analysis for a shop over a specific category.

The user must have the role "ADMIN" to be able to use this query.

Response

Returns a ShopInventoryAnalysis!

Arguments
Name Description
categoryId - String! The category id.
filter - ShopInventoryFilterOptions Filter options.
first - UInt How many edges to fetch from offset. Defaults to 10 and max value is 1000.
offset - UInt The offset. Defaults to 0.
shopId - ID! The shop id.

Example

Query
query ShopInventoryAnalysis(
  $categoryId: String!,
  $filter: ShopInventoryFilterOptions,
  $first: UInt,
  $offset: UInt,
  $shopId: ID!
) {
  shopInventoryAnalysis(
    categoryId: $categoryId,
    filter: $filter,
    first: $first,
    offset: $offset,
    shopId: $shopId
  ) {
    edges {
      node {
        category {
          id
          market
          name
        }
        noOfShops
        product {
          brand {
            id
            name
          }
          id
          market
          name
          popularity {
            global
            inCategory
          }
        }
        shopOffers {
          offers {
            id
            lowestPriceDelta {
              currency
              exclShipping
              inclShipping
            }
            originalPrice {
              currency
              exclShipping
              inclShipping
            }
            price {
              currency
              exclShipping
              inclShipping
            }
            productCondition
            stock
          }
          position
          shop {
            id
            isFeatured
            name
          }
        }
        shopSubject {
          offers {
            id
            lowestPriceDelta {
              currency
              exclShipping
              inclShipping
            }
            originalPrice {
              currency
              exclShipping
              inclShipping
            }
            price {
              currency
              exclShipping
              inclShipping
            }
            productCondition
            stock
          }
          position
          shop {
            id
            isFeatured
            name
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    totalCount
  }
}
Variables
{
  "categoryId": "xyz789",
  "filter": ShopInventoryFilterOptions,
  "first": UInt,
  "offset": UInt,
  "shopId": 4
}
Response
{
  "data": {
    "shopInventoryAnalysis": {
      "edges": [ShopInventoryProductEdge],
      "pageInfo": PageInfo,
      "totalCount": UInt
    }
  }
}

shopInventoryStats

Description

Get the current inventory statistics for a given 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": 987,
      "noOfOffers": 123,
      "noOfProducts": 987,
      "offers": InventoryStats,
      "products": InventoryStats
    }
  }
}

shopReports

Description

Get all reports for a shop.

The user must have the "SHOP_REPORT" permission on the shop id.

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

createProductClickCostsReport

Use the requestProductClickCostsReport mutation instead.
Description

Create a report over 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 role "ADMIN" to be able to create this report.

Response

Returns a Report!

Arguments
Name Description
categoryIds - [String!] The category ids to use as filter
dateRange - DateRange Select a custom date range. Maximum 190 days.
shopId - ID! The shop id.

Example

Query
mutation CreateProductClickCostsReport(
  $categoryIds: [String!],
  $dateRange: DateRange,
  $shopId: ID!
) {
  createProductClickCostsReport(
    categoryIds: $categoryIds,
    dateRange: $dateRange,
    shopId: $shopId
  ) {
    url
  }
}
Variables
{
  "categoryIds": ["xyz789"],
  "dateRange": DateRange,
  "shopId": 4
}
Response
{
  "data": {
    "createProductClickCostsReport": {
      "url": "xyz789"
    }
  }
}

createShopInventoryAnalysisReport

Use the requestShopInventoryAnalysisReport mutation instead.
Description

Create a product inventory analysis report for a shop over a specific category.

The user must have the role "ADMIN" to be able to create this report.

Response

Returns a Report!

Arguments
Name Description
categoryId - String! The category id.
filter - ShopInventoryFilterOptions Filter options.
shopId - ID! The shop id.

Example

Query
mutation CreateShopInventoryAnalysisReport(
  $categoryId: String!,
  $filter: ShopInventoryFilterOptions,
  $shopId: ID!
) {
  createShopInventoryAnalysisReport(
    categoryId: $categoryId,
    filter: $filter,
    shopId: $shopId
  ) {
    url
  }
}
Variables
{
  "categoryId": "xyz789",
  "filter": ShopInventoryFilterOptions,
  "shopId": "4"
}
Response
{
  "data": {
    "createShopInventoryAnalysisReport": {
      "url": "xyz789"
    }
  }
}

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 role "BRAND_INVENTORY_ANALYSIS" to be able to create 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": "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"
    }
  }
}

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 "CLICK_AND_COST" permission on the shop id.

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 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": "PRODUCT_CLICK_COSTS"
    }
  }
}

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 "INVENTORY_ANALYSIS" permission on the shop id.

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": "xyz789",
  "filter": ShopInventoryAnalysisFilterOptions,
  "shopId": "4"
}
Response
{
  "data": {
    "requestShopInventoryAnalysisReport": {
      "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": "PRODUCT_CLICK_COSTS"
    }
  }
}

requestShopOfferInventoryReport

Description

Request a shop offer inventory report to be created. The report will be accessible for 90 days.

The user must have the "SHOP_OFFER_INVENTORY_REPORT" permission on the shop id.

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": "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": "PRODUCT_CLICK_COSTS"
    }
  }
}

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

Fields
Field Name Description
id - ID! ID on the brand.
name - String! Name on the brand.
Example
{"id": 4, "name": "xyz789"}

BrandClickDistributionByCategory

Fields
Field Name Description
distribution - [CategoryDistribution!]! The distribution in DESC amount order.
Arguments
limit - UInt

Limit the distribution (defaults to 10).

Example
{"distribution": [CategoryDistribution]}

BrandClickDistributionByCategoryFilterOptions

Fields
Input Field Description
categoryIds - [String!] The category ids.
shopIds - [ID!] The shop ids.
Example
{"categoryIds": ["abc123"], "shopIds": [4]}

BrandClickDistributionByCategoryOverTime

Fields
Field Name Description
edges - [BrandClickDistributionByCategoryOverTimeEdge!]!
Example
{"edges": [BrandClickDistributionByCategoryOverTimeEdge]}

BrandClickDistributionByCategoryOverTimeEdge

Fields
Field Name Description
node - BrandClickDistributionByCategoryOverTimeNode!
Example
{"node": BrandClickDistributionByCategoryOverTimeNode}

BrandClickDistributionByCategoryOverTimeFilterOptions

Fields
Input Field Description
categoryIds - [String!] The category ids.
shopIds - [ID!] The shop ids.
Example
{"categoryIds": ["xyz789"], "shopIds": [4]}

BrandClickDistributionByCategoryOverTimeNode

Fields
Field Name Description
distribution - [CategoryDistribution!]! The distribution in DESC amount order.
Arguments
limit - UInt

Limit the distribution (defaults to 10).

fromDate - Date! From date as "yyyy-MM-dd".
toDate - Date! To date as "yyyy-MM-dd".
Example
{
  "distribution": [CategoryDistribution],
  "fromDate": "2007-12-03",
  "toDate": "2007-12-03"
}

BrandClickDistributionByShop

Fields
Field Name Description
distribution - [ShopDistribution!]! The distribution in DESC amount order.
Arguments
limit - UInt

Limit the number of shops (defaults to 10).

Example
{"distribution": [ShopDistribution]}

BrandClickDistributionByShopFilterOptions

Fields
Input Field Description
categoryIds - [String!] The category ids.
productIds - [ID!] The product ids.
shopIds - [ID!] The shop ids.
Example
{
  "categoryIds": ["xyz789"],
  "productIds": [4],
  "shopIds": ["4"]
}

BrandClickDistributionByShopOverTime

Fields
Field Name Description
edges - [BrandClickDistributionByShopOverTimeEdge!]!
Example
{"edges": [BrandClickDistributionByShopOverTimeEdge]}

BrandClickDistributionByShopOverTimeEdge

Fields
Field Name Description
node - BrandClickDistributionByShopOverTimeNode!
Example
{"node": BrandClickDistributionByShopOverTimeNode}

BrandClickDistributionByShopOverTimeFilterOptions

Fields
Input Field Description
categoryIds - [String!] The category ids.
productIds - [ID!] The product ids.
shopIds - [ID!] The shop ids.
Example
{
  "categoryIds": ["xyz789"],
  "productIds": ["4"],
  "shopIds": [4]
}

BrandClickDistributionByShopOverTimeNode

Fields
Field Name Description
distribution - [ShopDistribution!]! The distribution in DESC amount order.
Arguments
limit - UInt

Limit the distribution (defaults to 10).

fromDate - Date! From date as "yyyy-MM-dd".
toDate - Date! To date as "yyyy-MM-dd".
Example
{
  "distribution": [ShopDistribution],
  "fromDate": "2007-12-03",
  "toDate": "2007-12-03"
}

BrandClickMarketShare

Fields
Field Name Description
brand - Brand! The brand.
share - Float! The share as per mille 1/1000. Example: the value 0.308 means 30.8 percent.
Example
{"brand": Brand, "share": 123.45}

BrandClickMarketShareByCategory

Fields
Field Name Description
shares - [CategoryMarketShare!]! The shares in DESC share order.
Arguments
limit - UInt

Limit the number of shares (defaults to 10).

Example
{"shares": [CategoryMarketShare]}

BrandClickMarketShareByCategoryFilterOptions

Fields
Input Field Description
brandIds - [ID!] The brand ids.
categoryIds - [String!] The category ids.
Example
{"brandIds": [4], "categoryIds": ["xyz789"]}

BrandClickMarketShareFilterOptions

Fields
Input Field Description
brandIds - [ID!] If set, limits the market share calculation to these brands. It should then include all brands to compare, not only the subject's.
categoryIds - [String!] If set, limits the market share calculation to these categories.
productIds - [String!] If set, limits the market share calculation to these products. It should then include all products to compare, not only the subject's. The upper limit for how many products you can include is around 100000, but might be lower if the rest of the request is large.
Example
{
  "brandIds": ["4"],
  "categoryIds": ["abc123"],
  "productIds": ["abc123"]
}

BrandClickMarketShareOverTime

Fields
Field Name Description
edges - [BrandClickMarketShareOverTimeEdge!]! The edges.
Example
{"edges": [BrandClickMarketShareOverTimeEdge]}

BrandClickMarketShareOverTimeEdge

Fields
Field Name Description
node - BrandClickMarketShareOverTimeNode! The node.
Example
{"node": BrandClickMarketShareOverTimeNode}

BrandClickMarketShareOverTimeFilterOptions

Fields
Input Field Description
brandIds - [ID!] If set, limits the market share calculation to these brands. It should then include all brands to compare, not only the subject's.
categoryIds - [String!] If set, limits the market share calculation to these categories.
productIds - [String!] If set, limits the market share calculation to these products. It should then include all products to compare, not only the subject's. The upper limit for how many products you can include is around 100000, but might be lower if the rest of the request is large.
Example
{
  "brandIds": [4],
  "categoryIds": ["xyz789"],
  "productIds": ["xyz789"]
}

BrandClickMarketShareOverTimeNode

Fields
Field Name Description
fromDate - Date! From date as "yyyy-MM-dd".
shares - [BrandClickMarketShare!]! The shares in DESC share order.
Arguments
limit - UInt

Limit the number of shares (defaults to 10).

subject - BrandClickMarketShare! The brand subject.
toDate - Date! To date as "yyyy-MM-dd".
Example
{
  "fromDate": "2007-12-03",
  "shares": [BrandClickMarketShare],
  "subject": BrandClickMarketShare,
  "toDate": "2007-12-03"
}

BrandClickMarketShares

Fields
Field Name Description
shares - [BrandClickMarketShare!]! The shares in DESC share order.
Arguments
limit - UInt

Limit the number of shares (defaults to 10).

subject - BrandClickMarketShare! The brand subject.
Example
{
  "shares": [BrandClickMarketShare],
  "subject": BrandClickMarketShare
}

BrandFilterOptions

Fields
Input Field Description
categoryIds - [String!] The category ids.
Example
{"categoryIds": ["xyz789"]}

BrandInfo

Fields
Field Name Description
brandCount - UInt! The total number of brands.
brands - [Brand!]! The competitor brands.
shopCount - UInt! The total number of shops.
shops - [Shop!]! The shops that sell the brand's products.
Example
{
  "brandCount": UInt,
  "brands": [Brand],
  "shopCount": UInt,
  "shops": [Shop]
}

BrandInventoryAnalysis

Fields
Field Name Description
edges - [BrandInventoryProductEdge!]! The product edges, ordered by popularity ASC.
pageInfo - PageInfo! The page info.
totalCount - UInt! The total count of edges.
Example
{
  "edges": [BrandInventoryProductEdge],
  "pageInfo": PageInfo,
  "totalCount": UInt
}

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"]
}

BrandInventoryFilterOptions

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": true,
  "productCondition": ["ALMOST_NEW"],
  "stock": ["BACKORDER"]
}

BrandInventoryProductEdge

Fields
Field Name Description
node - BrandInventoryProductNode! The product node.
Example
{"node": BrandInventoryProductNode}

BrandInventoryProductNode

Fields
Field Name Description
category - Category! The category.
noOfShops - UInt! The number of shops that currently sell the product.
product - InventoryProduct! The product.
shopOffers - [ShopInventoryProductShopOffers!]! Offers grouped by shop, sorted by position ASC.
Arguments
limit - UInt

Limits the number of shop offers.

Example
{
  "category": Category,
  "noOfShops": UInt,
  "product": InventoryProduct,
  "shopOffers": [ShopInventoryProductShopOffers]
}

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": "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": "BRAND_INVENTORY_ANALYSIS"
}

BrandReportType

Values
Enum Value Description

BRAND_INVENTORY_ANALYSIS

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

Fields
Field Name Description
brand - Brand! The brand associated with the brand service.
id - ID! Id of the brand service.
market - Market! The brand service market.
Example
{
  "brand": Brand,
  "id": "4",
  "market": "DK"
}

BrandServicePermission

Values
Enum Value Description

BRAND_INVENTORY_ANALYSIS

Permission to get inventory analysis data.

BRAND_MARKET_SHARE

Permission to get brand market share data.

BRAND_REPORT

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"]
}

Category

Fields
Field Name Description
id - String! The category id.
market - Market! The category market.
name - String! The category name.
Example
{
  "id": "xyz789",
  "market": "DK",
  "name": "abc123"
}

CategoryDistribution

Fields
Field Name Description
amount - Float! The amount as per mille 1/1000. Example: the value 0.308 means 30.8 percent.
category - Category! The category.
Example
{"amount": 123.45, "category": Category}

CategoryMarketShare

Fields
Field Name Description
category - Category! The category.
share - Float! The share as per mille 1/1000. Example: the value 0.308 means 30.8 percent.
Example
{"category": Category, "share": 123.45}

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": ["xyz789"],
  "id": "xyz789",
  "name": "xyz789",
  "parentId": "abc123",
  "type": "LEAF"
}

CategorySegment

Fields
Field Name Description
id - String! The category id.
market - Market! The category market.
name - String! The category name.
segment - String! The category segment.
Example
{
  "id": "abc123",
  "market": "DK",
  "name": "abc123",
  "segment": "abc123"
}

CategoryTreeFilterOptions

Fields
Input Field Description
brandId - ID The brand id.
shopId - ID The shop id.
Example
{
  "brandId": "4",
  "shopId": "4"
}

CategoryType

Description

The category type.

Values
Enum Value Description

LEAF

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.

MAIN

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.

SUB

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

Fields
Field Name Description
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
{
  "currency": "AUD",
  "discount": Money,
  "discountRate": 123.45,
  "exclDiscount": Money,
  "inclDiscount": Money
}

CostItems

Fields
Field Name Description
memberPrices - CostItem The member prices CPC costs.
premium - CostItem The premium CPC costs.
segment - CostItem! The segment CPC costs.
Example
{
  "memberPrices": CostItem,
  "premium": CostItem,
  "segment": CostItem
}

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": 987.65,
  "exclDiscount": Money,
  "inclDiscount": Money
}

Currency

Description

The currency (ISO 4217).

Values
Enum Value Description

AUD

Australian dollar.

DKK

Danish crown.

EUR

Euro.

GBP

British pound.

NOK

Norwegian crown.

NZD

New Zealand dollar.

SEK

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

Fields
Input Field Description
fromDate - Date! The from date as 'yyyy-MM-dd'.
toDate - Date! The to date as 'yyyy-MM-dd'.
Example
{
  "fromDate": "2007-12-03",
  "toDate": "2007-12-03"
}

DateRangeType

Fields
Field Name Description
fromDate - Date! The from date as 'yyyy-MM-dd'.
toDate - Date! The to date as 'yyyy-MM-dd'.
Example
{
  "fromDate": "2007-12-03",
  "toDate": "2007-12-03"
}

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

InventoryProduct

Fields
Field Name Description
brand - Brand! The brand.
id - ID! The product id.
market - Market! The market.
name - String! The product name.
popularity - ProductPopularity! The product popularity.
Example
{
  "brand": Brand,
  "id": "4",
  "market": "DK",
  "name": "xyz789",
  "popularity": ProductPopularity
}

InventoryShop

Fields
Field Name Description
id - ID! ID on the shop.
isFeatured - Boolean! Is the shop featured?
name - String! Name on the shop.
Example
{
  "id": "4",
  "isFeatured": true,
  "name": "xyz789"
}

InventoryStats

Fields
Field Name Description
conditions - [InventoryStatsPerProductCondition!]! The product conditions.
count - Int! The count.
Example
{
  "conditions": [InventoryStatsPerProductCondition],
  "count": 987
}

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

DK

Denmark.

FI

Finland.

FR

France.

GB

Great Britain.

NO

Norway.

NZ

New Zealand.

SE

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

Description

The page info.

Fields
Field Name Description
hasNextPage - Boolean! Does the current page have a next page.
hasPreviousPage - Boolean! Does the current page have a previous page.
Example
{"hasNextPage": true, "hasPreviousPage": true}

PriceWithShipping

Description

price with shipping.

Fields
Field Name Description
currency - Currency! The currency.
exclShipping - Money! Price excluding shipping cost.
inclShipping - Money Price including shipping cost.
Example
{
  "currency": "AUD",
  "exclShipping": Money,
  "inclShipping": Money
}

Product

Description

Product information.

Fields
Field Name Description
id - ID! The product id.
market - Market! The market.
name - String! The product name.
offers - [Offer!]! Offers related to the product
Example
{
  "id": 4,
  "market": "DK",
  "name": "abc123",
  "offers": [Offer]
}

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

ALMOST_NEW

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.

DAMAGED_PACKAGING

The product is new but the packaging is damaged or missing. May be due to the packaging being damaged in transport.

DEMO

The product has been used as an exhibition sample and is therefore not in intact packaging, or the product is completely without packaging.

NEW

The product is new.

REFURBISHED

The product is reconditioned/renovated.

USED

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
}

ProductPopularity

Fields
Field Name Description
global - UInt The global product popularity.
inCategory - UInt The product popularity within the category.
Example
{"global": UInt, "inCategory": UInt}

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": "abc123"
}

Report

Fields
Field Name Description
url - String! The url to the report.
Example
{"url": "xyz789"}

ReportState

Values
Enum Value Description

CREATED

Report has been created.

DELETED

Report has been deleted.

FAILED

Report could not be created.

REQUESTED

Report creation is requested.

STARTED

Report creation has started.
Example
"CREATED"

Shop

Fields
Field Name Description
id - ID! ID on the shop.
name - String! Name on the shop.
Example
{
  "id": "4",
  "name": "xyz789"
}

ShopClickMarketShare

Fields
Field Name Description
share - Float! The share (as percentage float 0-1).
shop - Shop! The shop.
Example
{"share": 987.65, "shop": Shop}

ShopClickMarketShareFilter

Fields
Input Field Description
categoryIds - [String!] Category ids to include (keep empty or null for not filtering on category ids at all).
shopIds - [ID!] Shop ids to include (keep empty or null for not filtering on shop ids at all).
Example
{
  "categoryIds": ["xyz789"],
  "shopIds": ["4"]
}

ShopClickMarketShareOverTime

Fields
Field Name Description
edges - [ShopClickMarketShareOverTimeEdge!]! The edges.
Example
{"edges": [ShopClickMarketShareOverTimeEdge]}

ShopClickMarketShareOverTimeEdge

Fields
Field Name Description
node - ShopClickMarketShareOverTimeNode! The node.
Example
{"node": ShopClickMarketShareOverTimeNode}

ShopClickMarketShareOverTimeFilter

Fields
Input Field Description
categoryIds - [String!] Category ids to include (keep empty or null for not filtering on category ids at all).
shopIds - [ID!] Shop ids to include (keep empty or null for not filtering on shop ids at all).
Example
{
  "categoryIds": ["abc123"],
  "shopIds": ["4"]
}

ShopClickMarketShareOverTimeNode

Fields
Field Name Description
fromDate - Date! From date as "yyyy-MM-dd".
shares - [ShopClickMarketShare!]! The market shares in share DESC order.
Arguments
limit - UInt

Limit the number of shares (defaults to 10).

subject - ShopClickMarketShare! The shop subject.
toDate - Date! To date as "yyyy-MM-dd".
Example
{
  "fromDate": "2007-12-03",
  "shares": [ShopClickMarketShare],
  "subject": ShopClickMarketShare,
  "toDate": "2007-12-03"
}

ShopClickMarketShares

Fields
Field Name Description
shares - [ShopClickMarketShare!]! The market shares in share DESC order.
Arguments
limit - UInt

Limit the number of shares (defaults to 10).

subject - ShopClickMarketShare! The shop subject.
Example
{
  "shares": [ShopClickMarketShare],
  "subject": ShopClickMarketShare
}

ShopDistribution

Fields
Field Name Description
amount - Float! The amount as per mille 1/1000. Example: the value 0.308 means 30.8 percent.
shop - Shop! The shop.
Example
{"amount": 123.45, "shop": Shop}

ShopInventoryAnalysis

Fields
Field Name Description
edges - [ShopInventoryProductEdge!]! The product edges, ordered by popularity ASC.
pageInfo - PageInfo! The page info.
totalCount - UInt! The total count of edges.
Example
{
  "edges": [ShopInventoryProductEdge],
  "pageInfo": PageInfo,
  "totalCount": UInt
}

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"]
}

ShopInventoryFilterOptions

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": true,
  "excludeOffersWithoutShipping": true,
  "includeCompetitorProducts": true,
  "productCondition": ["ALMOST_NEW"],
  "stock": ["BACKORDER"]
}

ShopInventoryProductEdge

Fields
Field Name Description
node - ShopInventoryProductNode! The product node.
Example
{"node": ShopInventoryProductNode}

ShopInventoryProductNode

Fields
Field Name Description
category - Category! The category.
noOfShops - UInt! The number of shops that currently sell the product.
product - InventoryProduct! The product.
shopOffers - [ShopInventoryProductShopOffers!]! Offers grouped by shop, sorted by position ASC.
Arguments
limit - UInt

Limits the number of shop offers.

shopSubject - ShopInventoryProductSubjectShopOffers! The shop subject.
Example
{
  "category": Category,
  "noOfShops": UInt,
  "product": InventoryProduct,
  "shopOffers": [ShopInventoryProductShopOffers],
  "shopSubject": ShopInventoryProductSubjectShopOffers
}

ShopInventoryProductOffer

Fields
Field Name Description
id - ID! The offer id.
lowestPriceDelta - PriceWithShipping The delta from the lowest offered price.
originalPrice - PriceWithShipping The original price of the offer, in case the price is discounted.
price - PriceWithShipping! The price.
productCondition - ProductCondition! The offers product condition.
stock - StockStatusType! The stock status.
Example
{
  "id": "4",
  "lowestPriceDelta": PriceWithShipping,
  "originalPrice": PriceWithShipping,
  "price": PriceWithShipping,
  "productCondition": "ALMOST_NEW",
  "stock": "BACKORDER"
}

ShopInventoryProductShopOffers

Fields
Field Name Description
offers - [ShopInventoryProductOffer!]! The shop offers, sorted by price ASC.
Arguments
limit - UInt

Limits the number of offers.

position - UInt! The position.
shop - InventoryShop! The shop.
Example
{
  "offers": [ShopInventoryProductOffer],
  "position": UInt,
  "shop": InventoryShop
}

ShopInventoryProductSubjectShopOffers

Fields
Field Name Description
offers - [ShopInventoryProductOffer!]! The shop offers, sorted by price ASC.
Arguments
limit - UInt

Limits the number of offers.

position - UInt The position.
shop - InventoryShop! The shop.
Example
{
  "offers": [ShopInventoryProductOffer],
  "position": UInt,
  "shop": InventoryShop
}

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": 987,
  "noOfOffers": 123,
  "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

CLICK_AND_COST

Permission to get click & cost data.

INVENTORY_ANALYSIS

Permission to get inventory analysis data.

SHOP_MARKET_SHARE

Permission to get shop market share data.

SHOP_OFFER_INVENTORY_REPORT

Permission to get the shop offer inventory report.

SHOP_REPORT

Permission to list reports and create report links.
Example
"CLICK_AND_COST"

ShopPermissions

Fields
Field Name Description
permissions - [ShopPermission!]! Permissions the user has on the shop.
shop - Shop! The shop.
Example
{"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": ["PRODUCT_CLICK_COSTS"]}

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": "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": "PRODUCT_CLICK_COSTS"
}

ShopReportType

Values
Enum Value Description

PRODUCT_CLICK_COSTS

The product click costs report.

SHOP_INVENTORY_ANALYSIS

The shop inventory analysis report.

SHOP_OFFER_INVENTORY

The shop offer inventory report.
Example
"PRODUCT_CLICK_COSTS"

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

Fields
Field Name Description
id - ID! ID on the shop.
market - Market! The shop's market.
name - String! Name on the shop.
Example
{"id": 4, "market": "DK", "name": "abc123"}

StockStatusType

Values
Enum Value Description

BACKORDER

The product is not available at the moment, but accepting orders and it'll be shipped as soon as it becomes available again.

INCOMING

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.

IN_STOCK

Currently accepting orders for this product and can fulfill the purchase request directly.

OUT_OF_STOCK

Currently not accepting orders for this product.

PREORDER

Currently accepting orders, but it's not yet released for sale.

UNKNOWN

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

DAY

MONTH

WEEK

YEAR

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": "abc123",
  "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

Admin role.

SERVICE

Service role.
Example
"ADMIN"