sale Query
Look up a sale by ID.
Arguments
#
Response
#
Returns Sale .
Example
#
query (
$id: ID!
$before: String
$after: String
$first: Int
$last: Int
$before2: String
$after2: String
$first2: Int
$last2: Int
$before3: String
$after3: String
$first3: Int
$last3: Int
$before4: String
$after4: String
$first4: Int
$last4: Int
) {
sale(id: $id) {
id
name
type
value
startDate
endDate
currency
minSpent {
currency
baseAmount
}
minCheckoutItemsQuantity
categories(before: $before, after: $after, first: $first, last: $last) {
totalCount
}
collections(
before: $before2
after: $after2
first: $first2
last: $last2
) {
totalCount
}
products(before: $before3, after: $after3, first: $first3, last: $last3) {
totalCount
}
variants(before: $before4, after: $after4, first: $first4, last: $last4) {
totalCount
}
saleType
}
}
3
{
"id": "aWQ6ODg=",
"before": "YXJyYXljb25uZWN0aW9uOjQ==",
"after": "YXJyYXljb25uZWN0aW9uOjI=",
"first": 42,
"last": 42,
"before2": "YXJyYXljb25uZWN0aW9uOjQ==",
"after2": "YXJyYXljb25uZWN0aW9uOjI=",
"first2": 42,
"last2": 42,
"before3": "YXJyYXljb25uZWN0aW9uOjQ==",
"after3": "YXJyYXljb25uZWN0aW9uOjI=",
"first3": 42,
"last3": 42,
"before4": "YXJyYXljb25uZWN0aW9uOjQ==",
"after4": "YXJyYXljb25uZWN0aW9uOjI=",
"first4": 42,
"last4": 42
}
3
{
"sale": {
"id": "aWQ6Mjg=",
"name": "Acme",
"type": "FIXED",
"value": 10.23,
"startDate": "2022-03-06T08:23:45.000Z",
"endDate": "2022-03-06T08:23:45.000Z",
"currency": "string",
"minSpent": {
"currency": "string",
"baseAmount": "9007199254740993"
},
"minCheckoutItemsQuantity": 42,
"categories": {
"totalCount": 42
},
"collections": {
"totalCount": 42
},
"products": {
"totalCount": 42
},
"variants": {
"totalCount": 42
},
"saleType": "SHIPPING"
}
}
3