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.
Response
Arguments
| Name | Description |
|---|---|
dateRange - DateRange!
|
Select a custom date range. |
productIds - [String!]!
|
The product ids to use as filter. The upper limit for how many products you can include is around 100 000, but might be lower if the rest of the request is large. It only makes sense to include products that the shop has or has had in its inventory. |
shopId - ID!
|
The shop id. |
Example
Query
query AggregatedProductClickCostsPerDay(
$dateRange: DateRange!,
$productIds: [String!]!,
$shopId: ID!
) {
aggregatedProductClickCostsPerDay(
dateRange: $dateRange,
productIds: $productIds,
shopId: $shopId
) {
date
productSegmentCosts {
clicks
cost {
costItems {
memberPrices {
currency
discount
discountRate
exclDiscount
inclDiscount
}
premium {
currency
discount
discountRate
exclDiscount
inclDiscount
}
segment {
currency
discount
discountRate
exclDiscount
inclDiscount
}
}
currency
discount
discountRate
exclDiscount
inclDiscount
}
name
}
}
}
Variables
{
"dateRange": DateRange,
"productIds": ["abc123"],
"shopId": 4
}
Response
{
"data": {
"aggregatedProductClickCostsPerDay": [
{
"date": "2007-12-03",
"productSegmentCosts": [ProductSegmentCost]
}
]
}
}
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.
Response
Returns a BrandClickDistributionByCategory!
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.
Response
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.
Response
Returns a BrandClickDistributionByShopOverTime!
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]
}
}
}
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!
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!]!
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"
}
}
}
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
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!
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"
}
}
}
createReportLinks
Description
Create download links to a created report.
The user must have either the "SHOP_REPORT" permission on the shop id, or the "BRAND_REPORT" on the brand service ID for the report.
Response
Returns a ReportLinks!
Arguments
| Name | Description |
|---|---|
reportId - ID!
|
The report ID. |
Example
Query
mutation CreateReportLinks($reportId: ID!) {
createReportLinks(reportId: $reportId) {
links {
expiresAt
url
}
}
}
Variables
{"reportId": "4"}
Response
{"data": {"createReportLinks": {"links": [ReportLink]}}}
createShopInventoryAnalysisReport
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!
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
BrandClickDistributionByCategory
Fields
| Field Name | Description |
|---|---|
distribution - [CategoryDistribution!]!
|
The distribution in DESC amount order. |
Arguments
|
|
Example
{"distribution": [CategoryDistribution]}
BrandClickDistributionByCategoryFilterOptions
BrandClickDistributionByCategoryOverTime
Fields
| Field Name | Description |
|---|---|
edges - [BrandClickDistributionByCategoryOverTimeEdge!]!
|
Example
{"edges": [BrandClickDistributionByCategoryOverTimeEdge]}
BrandClickDistributionByCategoryOverTimeEdge
Fields
| Field Name | Description |
|---|---|
node - BrandClickDistributionByCategoryOverTimeNode!
|
Example
{"node": BrandClickDistributionByCategoryOverTimeNode}
BrandClickDistributionByCategoryOverTimeFilterOptions
BrandClickDistributionByCategoryOverTimeNode
Fields
| Field Name | Description |
|---|---|
distribution - [CategoryDistribution!]!
|
The distribution in DESC amount order. |
Arguments
|
|
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
|
|
Example
{"distribution": [ShopDistribution]}
BrandClickDistributionByShopFilterOptions
BrandClickDistributionByShopOverTime
Fields
| Field Name | Description |
|---|---|
edges - [BrandClickDistributionByShopOverTimeEdge!]!
|
Example
{"edges": [BrandClickDistributionByShopOverTimeEdge]}
BrandClickDistributionByShopOverTimeEdge
Fields
| Field Name | Description |
|---|---|
node - BrandClickDistributionByShopOverTimeNode!
|
Example
{"node": BrandClickDistributionByShopOverTimeNode}
BrandClickDistributionByShopOverTimeFilterOptions
BrandClickDistributionByShopOverTimeNode
Fields
| Field Name | Description |
|---|---|
distribution - [ShopDistribution!]!
|
The distribution in DESC amount order. |
Arguments
|
|
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"
}
BrandFilterOptions
Fields
| Input Field | Description |
|---|---|
categoryIds - [String!]
|
The category ids. |
Example
{"categoryIds": ["xyz789"]}
BrandInfo
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
|
|
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 |
|---|---|
|
|
The brand inventory analysis report. |
Example
"BRAND_INVENTORY_ANALYSIS"
BrandReports
Fields
| Field Name | Description |
|---|---|
edges - [BrandReportEdge!]!
|
The edges, ordered by requestedAt DESC. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
Example
{
"edges": [BrandReportEdge],
"pageInfo": PageInfo,
"totalCount": UInt
}
BrandService
BrandServicePermission
Values
| Enum Value | Description |
|---|---|
|
|
Permission to get inventory analysis data. |
|
|
Permission to get brand market share data. |
|
|
Permission to list reports and create report links. |
Example
"BRAND_INVENTORY_ANALYSIS"
BrandServicePermissions
Fields
| Field Name | Description |
|---|---|
brandService - BrandService!
|
The brand service. |
permissions - [BrandServicePermission!]!
|
Permissions the user has on the brand service. |
Example
{
"brandService": BrandService,
"permissions": ["BRAND_INVENTORY_ANALYSIS"]
}
Category
CategoryDistribution
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
CategoryTreeFilterOptions
CategoryType
Description
The category type.
Values
| Enum Value | Description |
|---|---|
|
|
Product level category. This is the lowest category level and the only category type that contains products. Leaf categories have a main or sub category as parent category and do not have children. |
|
|
Top level category. This is a root node in a top-down visualization. Main categories have sub or leaf categories as children and do not have a parent category. |
|
|
Middle level category. This is a sub category that narrows the scope of its parent. Sub categories have other sub or leaf categories as children and a main or sub category as parent category. |
Example
"LEAF"
ClicksWithCost
Description
Clicks with cost.
Fields
| Field Name | Description |
|---|---|
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
Example
{
"clicks": UInt,
"cost": CostWithDiscount
}
CostItem
Example
{
"currency": "AUD",
"discount": Money,
"discountRate": 123.45,
"exclDiscount": Money,
"inclDiscount": Money
}
CostItems
CostWithDiscount
Description
Cost with discount.
Fields
| Field Name | Description |
|---|---|
costItems - CostItems!
|
The cost for each cost item. |
currency - Currency!
|
The currency. |
discount - Money
|
The discount. |
discountRate - Float
|
The discount rate as permyriad (1/10000) in float. |
exclDiscount - Money!
|
The cost excluding discounts. |
inclDiscount - Money!
|
The cost including discounts. |
Example
{
"costItems": CostItems,
"currency": "AUD",
"discount": Money,
"discountRate": 987.65,
"exclDiscount": Money,
"inclDiscount": Money
}
Currency
Description
The currency (ISO 4217).
Values
| Enum Value | Description |
|---|---|
|
|
Australian dollar. |
|
|
Danish crown. |
|
|
Euro. |
|
|
British pound. |
|
|
Norwegian crown. |
|
|
New Zealand dollar. |
|
|
Swedish crown. |
Example
"AUD"
CurrentUser
Fields
| Field Name | Description |
|---|---|
brandServices - [BrandServicePermissions!]!
|
The list of brand services and permissions the user has access to. |
id - ID!
|
The id of the user. |
role - UserRole!
|
The role of the current user. |
shops - [ShopPermissions!]!
|
The list of shops and permissions the user has access to. |
Example
{
"brandServices": [BrandServicePermissions],
"id": "4",
"role": "ADMIN",
"shops": [ShopPermissions]
}
Date
Description
A date string in format "yyyy-MM-dd".
Example
"2007-12-03"
DateRange
DateRangeType
DateTime
Description
A date-time string at UTC as yyyy-MM-ddTHH:mm:ss.SSSZ.
Example
"2007-12-03T10:15:30Z"
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
Forecast
Fields
| Field Name | Description |
|---|---|
cost - CostWithDiscount!
|
The total cost. |
Example
{"cost": CostWithDiscount}
ID
Description
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
Example
4
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
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
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 |
|---|---|
|
|
Denmark. |
|
|
Finland. |
|
|
France. |
|
|
Great Britain. |
|
|
Norway. |
|
|
New Zealand. |
|
|
Sweden. |
Example
"DK"
Money
Description
A monetary value represented in micros (1/1,000,000th of the currency).
Example
Money
Offer
Fields
| Field Name | Description |
|---|---|
id - String!
|
The offer identifier |
Example
{"id": "abc123"}
PageInfo
PriceWithShipping
Product
ProductClickCosts
Fields
| Field Name | Description |
|---|---|
edges - [ProductEdge!]!
|
A list of edges. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"edges": [ProductEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
ProductClickCostsPerDay
Fields
| Field Name | Description |
|---|---|
edges - [ProductClickCostsPerDayEdge!]!
|
A list of edges. |
pageInfo - PageInfo!
|
The page info. |
totalCount - UInt!
|
The total count of edges. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"edges": [ProductClickCostsPerDayEdge],
"pageInfo": PageInfo,
"totalCount": UInt,
"updatedAt": "2007-12-03T10:15:30Z"
}
ProductClickCostsPerDayEdge
Fields
| Field Name | Description |
|---|---|
node - ProductClickCostsPerDayNode!
|
The product per day node. |
Example
{"node": ProductClickCostsPerDayNode}
ProductClickCostsPerDayNode
Fields
| Field Name | Description |
|---|---|
costs - [ProductCostsPerDay!]!
|
The costs per day. |
product - Product!
|
The product. |
Example
{
"costs": [ProductCostsPerDay],
"product": Product
}
ProductCondition
Values
| Enum Value | Description |
|---|---|
|
|
The product is both technically and visually almost like new, condition has been verified by the company and has at least a 1-year warranty. |
|
|
The product is new but the packaging is damaged or missing. May be due to the packaging being damaged in transport. |
|
|
The product has been used as an exhibition sample and is therefore not in intact packaging, or the product is completely without packaging. |
|
|
The product is new. |
|
|
The product is reconditioned/renovated. |
|
|
The product has been previously used. |
Example
"ALMOST_NEW"
ProductCostsPerDay
Fields
| Field Name | Description |
|---|---|
category - CategorySegment!
|
The category. |
clickPrice - CostWithDiscount!
|
The price per click. |
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
date - Date!
|
The date as 'yyyy-MM-dd'. |
Example
{
"category": CategorySegment,
"clickPrice": CostWithDiscount,
"clicks": UInt,
"cost": CostWithDiscount,
"date": "2007-12-03"
}
ProductEdge
Fields
| Field Name | Description |
|---|---|
node - ProductNode!
|
The product node. |
Example
{"node": ProductNode}
ProductNode
Fields
| Field Name | Description |
|---|---|
category - CategorySegment!
|
The category. |
clickPrice - CostWithDiscount!
|
The price per click. |
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The cost. |
product - Product!
|
The product. |
Example
{
"category": CategorySegment,
"clickPrice": CostWithDiscount,
"clicks": UInt,
"cost": CostWithDiscount,
"product": Product
}
ProductPopularity
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"}
ReportLink
ReportLinks
Fields
| Field Name | Description |
|---|---|
links - [ReportLink!]!
|
The report links. |
Example
{"links": [ReportLink]}
ReportState
Values
| Enum Value | Description |
|---|---|
|
|
Report has been created. |
|
|
Report has been deleted. |
|
|
Report could not be created. |
|
|
Report creation is requested. |
|
|
Report creation has started. |
Example
"CREATED"
Shop
ShopDistribution
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
|
|
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
|
|
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
|
|
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 |
|---|---|
|
|
Permission to get click & cost data. |
|
|
Permission to get inventory analysis data. |
|
|
Permission to get shop market share data. |
|
|
Permission to get the shop offer inventory 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 |
|---|---|
|
|
The product click costs report. |
|
|
The shop inventory analysis report. |
|
|
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
StockStatusType
Values
| Enum Value | Description |
|---|---|
|
|
The product is not available at the moment, but accepting orders and it'll be shipped as soon as it becomes available again. |
|
|
The product is not available at the moment, but accepting orders and it'll be shipped as soon as it becomes available again. Use BACKORDER instead. |
|
|
Currently accepting orders for this product and can fulfill the purchase request directly. |
|
|
Currently not accepting orders for this product. |
|
|
Currently accepting orders, but it's not yet released for sale. |
|
|
Unknown stock status. |
Example
"BACKORDER"
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
SubtotalClickCosts
Fields
| Field Name | Description |
|---|---|
expert - ClicksWithCost!
|
The cost for expert clicks. |
homepage - ClicksWithCost!
|
The cost for homepage clicks. |
membership - ClicksWithCost!
|
The cost for membership clicks. |
product - ClicksWithCost!
|
The cost for all product segment clicks. |
productSubtotals - [ProductSegmentCost!]!
|
The product segment subtotal cost. |
promotionPage - ClicksWithCost!
|
The cost for promotion page clicks. |
Example
{
"expert": ClicksWithCost,
"homepage": ClicksWithCost,
"membership": ClicksWithCost,
"product": ClicksWithCost,
"productSubtotals": [ProductSegmentCost],
"promotionPage": ClicksWithCost
}
SubtotalClickCostsPerDay
Fields
| Field Name | Description |
|---|---|
date - Date!
|
Date as "yyyy-MM-dd". |
subtotals - SubtotalClickCosts!
|
The subtotal cost for the day. |
Example
{
"date": "2007-12-03",
"subtotals": SubtotalClickCosts
}
TimeResolution
Description
The time resolution.
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
"DAY"
TotalClickCosts
Fields
| Field Name | Description |
|---|---|
clicks - UInt!
|
The number of clicks. |
cost - CostWithDiscount!
|
The total cost. |
dateRange - DateRangeType!
|
The date range. |
forecast - Forecast
|
The forecasted costs for the current month. |
month - String
|
The month as 'YYYY-MM'. Use dateRange instead. |
shop - ShopWithMarket!
|
The shop. |
subtotals - SubtotalClickCosts!
|
The subtotal cost. |
subtotalsPerDay - [SubtotalClickCostsPerDay!]!
|
The subtotal cost per day. |
updatedAt - DateTime!
|
The time and date when the click cost data was last updated. |
Example
{
"clicks": UInt,
"cost": CostWithDiscount,
"dateRange": DateRangeType,
"forecast": Forecast,
"month": "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 role. |
|
|
Service role. |
Example
"ADMIN"