Returns
Approve a customer's return
POST/returns/{returnId}/approve
Scope returns.writeLIVE keys only
Books the return parcel and activates (or, when the customer pays, prepares) the drop-off code. 409 when it is not waiting for review or your wallet cannot cover it.
Request
Path parameters
| Name | In | Type | Description |
|---|---|---|---|
returnIdRequired | path | string | Pattern ^(?:QD-RET-[A-F0-9]{24}|QDRET[A-Z0-9]{3,31})$ |
Send an empty JSON object ({}) as the body.
Response
| Status | Meaning |
|---|---|
200 | Approved |
The body is { "status": "success", "data": … }. Fields of data (ReturnResult):
| Field | Type | Description |
|---|---|---|
returnRequired | Return | An e-commerce return: a reverse parcel linked to the original. The customer's phone and the drop-off code are never returned. |
Errors
Errors use the error envelope { "status": "error", "message", "code"?, "details"? }.
| Status | When |
|---|---|
401 | Missing, invalid, expired or revoked API key. The API key is missing, invalid, expired or revoked. |
403 | The key lacks the scope, or the operation needs a LIVE key. The key lacks the scope, or this call needs a LIVE key (LIVE_KEY_REQUIRED), or the Business owner is not verified (SENDER_VERIFICATION_REQUIRED). |
404 | Not found for this Business and environment. IDs from another Business or environment are always 404. Not found for this Business and environment. IDs from another Business or the other environment are always 404. |
409 | Idempotency key reused with another body, or the resource changed state. The idempotency key was used with a different body, a reference is already taken, or the resource changed state. |
429 | Too many requests. See the RateLimit headers. Too many requests. Wait for Retry-After, then retry with the same idempotency key. |