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

Headless Returns Flow

This flow explains the interaction with the parcelLab Returns platform in a headless manner, using a custom user interface instead of the parcelLab plugin.

1) Create Return Registration (from order)

Creating a return registration opens up a returns process and prepares order data for user choices like what items to return and how to be compensated. It can be considered the login to the returns portal.

Providing correct order and user data in the request is considered a secure login and should be treated as such.

Endpoint: POST /v4/returns/return-registrations/lookup-order/

Operation: returns_return_registrations_lookup_order_create

View full documentation for "Create Return Registration (from order)"

Result: ReturnRegistration with an external_id (store this as primary identifier for the whole returns process)

Example request
{
  "account": 161912,
  "code": "de-de",
  "identifier": {
    "reference": "O-123123",
    "identifier": "user@example.com"
  }
}
Example response (trimmed)
{
  "external_id": "95c35493-41aa-44f8-9154-5a25cbbc1865",
  "reference": "O-123123",
  "status": "created",
  "articles_order": [
    {
      "line_item_id": "LI-1",
      "article_name": "T-Shirt",
      "quantity": 1
    }
  ]
}

1b) Register Return (without order lookup)

Use this endpoint when your backend already has all order and customer data and you want to create a return registration directly.

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

Operation: returns_return_registrations_create

View full documentation for "Register Return"

Result: ReturnRegistration created directly from payload data (without order lookup)

Example request
Example response (trimmed)

2) Retrieve Article Info (returnability rules + reasons + compensation)

Retrieve the article-level rules before the customer selects what to return. This includes return reasons, return periods, compensation options, and split-group metadata.

Endpoint: GET /v4/returns/return-registrations/{external_id}/article-info/

Operation: returns_return_registrations_article_info_retrieve

View full documentation for "Retrieve Article Info"

Result: ReturnRegistrationReturnability with returnability rules and current selection state

Example request
Example response (trimmed)

3) Validate Article Info (Return items)

As the customer selects items, quantities, reasons, and compensation, send those choices here to validate and optionally persist (commit: true) them.

Endpoint: PATCH /v4/returns/return-registrations/{external_id}/article-info/

Operation: returns_return_registrations_article_info_partial_update

View full documentation for "Validate Article Info (Return items)"

Result: updated ReturnRegistrationReturnability, including the selection state you submitted

Example request
Example response (trimmed)

4) Retrieve Return Options (courier / drop-off / pickup)

After article selection is valid, retrieve available return methods for this registration. The returned option id is used in the next step.

Endpoint: GET /v4/returns/return-registrations/{external_id}/return-options/

Operation: returns_return_registrations_return_options_retrieve

View full documentation for "Retrieve Return Options"

Result: available return options (couriers/methods) for this registration

Example request
Example response (trimmed)

5) Apply Return Option (generates label + packing slip)

Apply one or more selected return options. This is the step that creates return labels/documents for the registration.

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

Operation: returns_return_registrations_return_options_create

View full documentation for "Apply Return Option"

Result: ReturnOptionResponse with generated label documents

Example request
Example response (trimmed)

6) Submit Return Registration

Finalize the return registration when all required selections and labels are in place. With commit: true, this triggers downstream submission behavior.

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

Operation: returns_return_registrations_submit_create

View full documentation for "Submit Return Registration"

Result: ReturnRegistration in submitted state (or unchanged if submission is skipped by flags)

Example request
Example response (trimmed)

7) Optional: Mutate Return Registration

Use mutate operations for follow-up actions like adding a label, updating items, closing, or canceling after registration creation.

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

Operation: returns_return_registrations_mutate_create

View full documentation for "Mutate Return Registration"

Result: updated ReturnRegistration plus mutation execution results in mutations

Example request
Example response (trimmed)

7a) Optional: Close a Return After Warehouse or Store Receipt

Use close_return when a submitted return has been received and 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.

For the full close request, tracking-number lookup, and batch receive-status examples, see Process Return Mutations.

8) Optional: Retrieve or validate exchange product options

If your return flow supports exchanges, use this endpoint to retrieve available variant options and validate partial exchange selections for selected line items.

Endpoint: POST /v4/returns/return-registrations/{external_id}/exchange-product-options/

Operation: returns_return_registrations_exchange_product_options_create

View full documentation for "Retrieve or validate exchange product options"

Result: map of line_item_id to exchange variant options and availability

Example request
Example response (trimmed)

Last updated

Was this helpful?