refundRequests
The refundRequests query allows you to return a list of refundRequests
2 minute read
Key Information
Use-Case
Marketplacer supports a Refund Request workflow that covers both Cancellations (pre-dispatch) and Returns, (Post dispatch). The core concept of this workflow is the Refund Request (RefundRequest
type in GraphQL). This query allows both Sellers and Operators to query Refund Requests to ascertain (amongst other things) the state of a given Refund Request.
Further Points of Note
N/a
Availability
- Operator API: Yes
- Seller API: Yes (Scoped to Seller refund requests only)
Example
query getCompletedRefundRequests{
refundRequests(
first: 10,
after: null,
filters: {statuses: [REFUNDED] }
){
totalCount
nodes
{
id
invoice{
id
}
lineItems{
id
reason
}
}
pageInfo{
hasNextPage
endCursor
}
}
}
Arguments
Name | Type | Description |
---|---|---|
sellerId | ID | Filter the refund requests down to 1 Seller. This is only of use to the Operator, Sellers using this query already have their result set scoped to their invoices only. |
filters | RefundRequestFilters | A wide range of filter criteria, including but not limited to fields such as: refund request status, seller name, legacy invoice id etc. |
after | String | Pagination cursor for moving through result set - more on pagination here |
before | String | Not in use - backwards pagination not supported |
first | Int | Pagination page size - more on pagination here |
last | Int | Not in use - backwards pagination not supported |
Response
Returns RefundRequestConnection
Error Responses
HTTP Error | Error Message | Meaning | ||
---|---|---|---|---|
401 | Unauthorized | You don’t have access to the endpoint, likely Basic Authentication credentials are missing | ||
401 | API Token has expired | You don’t have access to the endpoint, likely that you are either not supplying an API Key, or the key you are supplying is invalid |