refundRequestCreate

The refundRequestCreate mutation is used as part of both the standard and advanced refund workflows supported by Marketplacer. It is used to start the refund request process

Key Information

Use-Case

Returns (post dispatch) and Cancellations (pre dispatch) are a necessary part of any marketplace platform. In order to initiate either the returns or cancellation process the refundRequestCreate mutation is used.

Further Points of Note

  • Marketplacer offers a Standard and Advanced refunds flow, in both cases the refundRequestCreate mutation is used

Availability

  • Operator API: Yes
  • Seller API: Yes

Example

mutation createARefundRequest{
  refundRequestCreate(
    input: {
      invoiceId: "SW52b2ljZS0xMDM2Mw=="
      lineItems: [
        {
          lineItemId: "VmFyaWFudC0yODgz"
          reason: "Partial Incorrect Item"
					quantity: 1
        }
        {
          custom: "Shipping Fee"
          amountPerItemCents: 500
          quantity: 1
          onlyRemittance: false
        }
      ]
      notes: [{ note: "refundRequestCreate via API" }]
    }
  ) {
    refundRequest {
    id
      status
    }
    errors {
      field
      messages
    }
  }
}

Arguments

NameType
inputRefundRequestCreateMutationInput

Response

Returns RefundRequestCreateMutationPayload


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
200line items must be part of the same invoice for which you are raising a refund request.You have mis-matched the invoice and line item ids.

Further Reading