Skip to main content

itemSalesStatistics Query

Description

Retrieves sales statistics for a specific item, showing all orders that include this item with pagination.

query itemSalesStatistics($itemRef: ID!, $page: Int, $limit: Int) {
itemSalesStatistics(itemRef: $itemRef, page: $page, limit: $limit) {
orders {
_id
id
incId
origin
created
modified
orderId
instructions
updated
status
discogsStatus
buyerWasContacted
unreadMessagesCount
path
}
pagination {
limit
count
page
pages
hasMore
}
}
}

Variables

{
"itemRef": "c3decd07a06d175aa195f9a2",
"page": 1,
"limit": 20
}

Response

{
"itemSalesStatistics": {
"orders": [
{
"_id": "77606dc3cf8e384cbaf7aeae",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1710943979504,
"modified": 1763156650375,
"orderId": "example",
"instructions": "example",
"updated": 1719473513527,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"path": "/release/1763553751/release-artist-release-name"
}
],
"pagination": {
"limit": 20,
"count": 10,
"page": 1,
"pages": 1,
"hasMore": true
}
}
}

Arguments

NameTypeDescription
itemRefID!Reference ID of the item to get sales statistics for.
pageIntThe requested page number. Defaults to 1 if not specified.
limitIntNumber of orders per page. You can request a specific page size, and it will be used if it does not exceed the server-enforced maximum. If your requested size exceeds the maximum, the server will enforce the maximum limit.

Returns

ItemSalesStatistics