For the complete documentation index, see llms.txt. This page is also available as Markdown.

Process Return Mutations

Process received returns with return registration mutations, including closing a submitted return and recording warehouse receive status.

Use return registration mutations when a warehouse, store, or WMS has received a return and needs to update parcelLab.

There are two mutation endpoints:

Use case
Endpoint
Result

Close and settle one submitted return

POST /v4/returns/return-registrations/{external_id}/mutate/

Closes the return registration and triggers connected refund or exchange processing where configured.

Record receive status only

POST /v4/returns/return-registrations/mutate/

Updates article receive status and tracking receive status. It does not close the return.

The Receive UI in the Returns Portal snippet performs the warehouse receive action in the parcelLab UI. Use this API page when your warehouse, store, or WMS performs the receipt and needs to call parcelLab directly.

Before You Start

You need:

  • An API token with access to the Returns API.

  • The account ID.

  • The return registration external_id.

  • A return registration created from a Returns Portal configuration.

  • The return registration must be in submitted or approved status before it can be closed.

  • Article identifiers, such as line_item_id, for accepted or rejected quantity updates.

Store the external_id returned when creating or submitting the return registration. It is the safest identifier for processing calls because order references and tracking numbers can be reused across repeated test attempts or partial flows.

Resolve the Return Registration

If your system already stores the return registration external_id, use it directly.

If your warehouse or store system only has a return tracking number, first resolve the tracking record and use its identifiersConsignment value as the return registration external_id.

Resolve by tracking number

Example response fields:

Close a Return

Use close_return when the returned goods have been received and the return should be finalized. Closing a return is different from updating article receive status: closing finalizes the return registration, triggers the connected order system where configured, and moves the return toward completion.

Endpoint: POST /v4/returns/return-registrations/{external_id}/mutate/

Operation: returns_return_registrations_mutate_create

Mutate Return Registration

post

Mutate this return registration with one of the available mutations

Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Path parameters
external_idstring · uuidRequired

Unique identifier for this return registration, generated by parcelLab

Body

Update (mutate) a return registration

Responses
200Success
application/json

Represents a return registration

accountintegerRequired

Account, that is linked to this registration.

configinteger · nullableOptional
codestring · max: 255Required

Configuration code of the return configuration

versionstring · nullableOptional
client_keystringRead-onlyRequired

Name of the client, as configured in account setup.

referencestring · max: 255Required

Retailer reference, e.g. the order number, not unique

external_idstring · uuidOptional

Unique identifier for this return registration, generated by parcelLab

external_referencestring · max: 255Optional

Additional identifier (e.g. shop system id) for this return registration, generated by the retailer

sequence_numberstringRead-onlyRequired
statusstring · enumOptional
  • created - Created
  • submitted - Submitted
  • pending_approval - Pending Approval
  • pending_label - Pending Label
  • approved - Approved
  • rejected - Rejected
  • cancelled - Cancelled
  • closed - Closed
  • processing_failed - Processing Failed
  • invalid - Invalid
Possible values:
status_reasonstring · max: 255Optional

Reason for the current status

original_courierstring · max: 255Optional
original_order_idstring · max: 255 · nullableOptional
order_datestring · nullableOptional

Date of the order

order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_total_amountstring · nullableOptional

Total amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_shipping_amountstring · nullableOptional

Total shipping amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Total tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_delivery_datestring · nullableOptional

Date of the order delivery

order_shipping_datestring · nullableOptional

Date of the order shipment

order_payment_methodstring[]Optional

Payment method used for the order, as setup as reference items in the accounts configuration

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

is_gift_returns_portalbooleanRead-onlyRequired
customer_emailany ofRequired

Customers email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
customer_phonestring · max: 255Optional

Customer phone number

customer_salutationstring · max: 255Optional
customer_first_namestring · max: 255Optional
customer_last_namestring · max: 255Optional
customer_country_iso3string · max: 3Optional

ISO 3166-1 alpha-3 code of country

customer_addressany ofRequired
or
object · EmptyOptional
refund_methodstring · max: 255Optional

Refund method selected by customer

tagsstring[]Optional

Order level tags.

verification_code_usedstring · max: 255Optional

Verification code (e.g. zip/email) used for this return registration

created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
post/v4/returns/return-registrations/{external_id}/mutate/

Request Fields

Field
Required
Type
Description

type

yes

string

Use close_return.

status_reason

no

string

Reason recorded for closing the return.

trigger_refund

no

boolean

Whether to issue a monetary refund when closing the return.

release_exchange_items

no

boolean

Whether to release exchange items when closing the return.

refund_shipping_fees

no

boolean

Whether to refund the original order shipping cost.

tracking_number

no

string

Return tracking number used for receive-status synchronization when article status updates are included.

received_by

no

string

Source shown in receive status.

receive_note

no

string

Receive note stored with the return registration and tracking receive status.

article_status_updates

no

array

Accepted or rejected quantities to apply before closing.

Article Status Update Fields

Field
Required
Type
Description

identifier

yes

string

Article identifier to update.

identifier_type

yes

string

Identifier type. Use line_item_id or product_id.

accepted_quantity

no

integer

Quantity accepted by the warehouse or store.

rejected_quantity

no

integer

Quantity rejected by the warehouse or store.

reason

no

string

Reason for rejection or adjustment.

Example close request with accepted quantities
Example response (trimmed)

Check mutations[].result.success in the response. A successful HTTP response can still include a mutation-level result that explains why a requested mutation was not applied.

Record Receive Status Without Closing

Use the batch mutate endpoint only when you want to record receive status without closing the RMA.

The batch endpoint can update receive status and article accepted or rejected quantities for a registration, but it does not close the return or trigger refund or exchange processing.

Endpoint: POST /v4/returns/return-registrations/mutate/

Operation: mutate_batch

Mutate Return Registration (Batch)

post

Return Registrations represent a return request from a customer. There might be multiple return registrations for a single order. There might also be multiple labels for one return registration, if requested by the customer.

A return registration is linked to a configuration bundle (field 'code'), multiple configurations might be available on one account (e.g. country-specific courier configurations).

Return registrations are created by the parcelLab return portal, or by the retailer via the parcelLab API.

Certain fields of the return registration are not mutable via requests on the registration resource, but require 'action' payloads to be submitted (e.g. 'AddLabel') to the 'mutate' action.

Authorizations
AuthorizationstringRequired

Send Authorization: Parcellab-API-Token <encoded-token>.

<encoded-token> = base64(account_id:token) as provided in the portal.

Body

Update (mutate) a return registration

Responses
200Success
application/json

Represents a return registration

accountintegerRequired

Account, that is linked to this registration.

configinteger · nullableOptional
codestring · max: 255Required

Configuration code of the return configuration

versionstring · nullableOptional
client_keystringRead-onlyRequired

Name of the client, as configured in account setup.

referencestring · max: 255Required

Retailer reference, e.g. the order number, not unique

external_idstring · uuidOptional

Unique identifier for this return registration, generated by parcelLab

external_referencestring · max: 255Optional

Additional identifier (e.g. shop system id) for this return registration, generated by the retailer

sequence_numberstringRead-onlyRequired
statusstring · enumOptional
  • created - Created
  • submitted - Submitted
  • pending_approval - Pending Approval
  • pending_label - Pending Label
  • approved - Approved
  • rejected - Rejected
  • cancelled - Cancelled
  • closed - Closed
  • processing_failed - Processing Failed
  • invalid - Invalid
Possible values:
status_reasonstring · max: 255Optional

Reason for the current status

original_courierstring · max: 255Optional
original_order_idstring · max: 255 · nullableOptional
order_datestring · nullableOptional

Date of the order

order_currencystring · max: 3Optional

Currency of the order, e.g. USD, EUR (ISO 4217)

order_total_amountstring · nullableOptional

Total amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_shipping_amountstring · nullableOptional

Total shipping amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_tax_amountstring · nullableOptional

Total tax amount of the original order

Pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
order_delivery_datestring · nullableOptional

Date of the order delivery

order_shipping_datestring · nullableOptional

Date of the order shipment

order_payment_methodstring[]Optional

Payment method used for the order, as setup as reference items in the accounts configuration

language_iso2string · max: 3Optional

ISO 639-1 language code of the recipient, if known, required for localized communication

is_gift_returns_portalbooleanRead-onlyRequired
customer_emailany ofRequired

Customers email address, must be provided, in case email is not known or should be unset, use the literal string '_unset' instead.

string · emailOptional
or
const: _unsetOptionalPossible values:
customer_phonestring · max: 255Optional

Customer phone number

customer_salutationstring · max: 255Optional
customer_first_namestring · max: 255Optional
customer_last_namestring · max: 255Optional
customer_country_iso3string · max: 3Optional

ISO 3166-1 alpha-3 code of country

customer_addressany ofRequired
or
object · EmptyOptional
refund_methodstring · max: 255Optional

Refund method selected by customer

tagsstring[]Optional

Order level tags.

verification_code_usedstring · max: 255Optional

Verification code (e.g. zip/email) used for this return registration

created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
post/v4/returns/return-registrations/mutate/
Example batch receive-status update

Use identifier_type: "external_id" when possible. The batch endpoint also requires tracking_number because it updates the matching return tracking record.

  • Headless Returns Flow explains the full create, submit, label, exchange, and follow-up flow.

  • Return Registrations lists the available return registration API endpoints.

  • Real-time API Connection for Returns describes the inverse flow where parcelLab sends close instructions to your OMS or refund orchestration layer.

  • The older Process Return API documents the Returns API v2 closeById endpoint. Use the v4 mutation endpoints on this page for new return registration integrations.

Last updated

Was this helpful?