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
2 minute read
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
Name | Type |
---|---|
input | RefundRequestCreateMutationInput |
Response
Returns RefundRequestCreateMutationPayload
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 |
200 | line 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. |