refundRequests

The refundRequests query allows you to return a list of refundRequests

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

NameTypeDescription
sellerIdIDFilter 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.
filtersRefundRequestFiltersA wide range of filter criteria, including but not limited to fields such as: refund request status, seller name, legacy invoice id etc.
afterStringPagination cursor for moving through result set - more on pagination here
beforeStringNot in use - backwards pagination not supported
firstIntPagination page size - more on pagination here
lastIntNot in use - backwards pagination not supported

Response

Returns RefundRequestConnection


Error Responses

HTTP ErrorError MessageMeaning
401UnauthorizedYou don’t have access to the endpoint, likely Basic Authentication credentials are missing
401API Token has expiredYou 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

Further Reading