Cancellation and Returns by Seller
In this example we show you how to return the total number of cancellations and returns by Seller
less than a minute
What you’ll learn
- How to return the total number of cancellations and returns by Seller
The Query
query {
invoiceAmendmentSummary(
where: {
sellerId: { in: [84, 8, 78] }
sellerAccountType: { eq: retailer }
}
groupBy: [{ column: sellerId }, { column: amendmentLineItemStatus }]
sortBy: [{ direction: DESC, column: sellerId }]
) {
sellerId
amendmentLineItemStatus
amendmentIdDistinctcount
}
}
The Response
{
"data": {
"invoiceAmendmentSummary": [
{
"sellerId": 8,
"amendmentLineItemStatus": "refunded",
"amendmentIdDistinctcount": 1
},
{
"sellerId": 78,
"amendmentLineItemStatus": "cancelled",
"amendmentIdDistinctcount": 1
}
]
}
}