Edit Return API
Use this endpoint to apply post-registration edit operations to a return.
Production endpoint URL:
https://returns-api.parcellab.com/prod/editReturnByIdFor details on access, view the overview here:
RMA Actions APISupported Operation
Currently supported:
cancel_exchange
What cancel_exchange Achieves
This operation reverts an exchange-oriented return back to refund-oriented processing.
When successful, it may:
Convert exchange compensation methods to
refundClear uneven-exchange items
Ensure a refund method exists (defaults to
original-payment-methodif missing)Attempt to delete related Shopify draft order
Remove stored Shopify draft-order references from return data
Propagate changes to backend tracking
Tag Shopify order with
parcellab_exchange_cancelled(best effort)
Request
Headers
user
yes
string
Content-Type
yes
string (application/json)
JSON Body
returnId
yes
string
24-character ID
Return to edit.
lang
yes
string
min length 1
Language context.
country
yes
string
min length 1
Country/market context.
operation
yes
string
must be cancel_exchange
Edit operation.
draft
no
string
optional
Set to true for draft config.
operationPayload
no
object
optional
Operation-specific payload.
operationPayload.cancelReason
no
string
optional
Currently accepted, not persisted by this operation.
Example Request
Success Responses (200 OK)
Updated
Skipped
Common reason values:
return_already_closedno_changes_required
Shopify Behavior
For Shopify-connected returns:
If a draft order exists, deletion is attempted.
If draft deletion fails, the operation can still continue and return
shopifyDraftOrder.error.A Shopify order tag (
parcellab_exchange_cancelled) is attempted in best-effort mode (tag failure does not fail the endpoint).
Error Responses
400
Payload schema validation failed.
Missing/invalid request input.
400
Invalid request body format.
Invalid JSON body.
400
Update return failed.
Persisting return changes failed.
400
No modifiers to update is set
No valid state change could be applied.
403
FORBIDDEN
returnId is not accessible in caller context.
404
User not found.
Merchant context not found.
404
Order does not exist.
returnId not found.
500
implementation-defined
Unexpected server error.
Last updated
Was this helpful?