> For the complete documentation index, see [llms.txt](https://docs.parcellab.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parcellab.com/docs/developers/returns/receive-order-data.md).

# Receive Order Data

parcelLab can send return merchandise authorization (RMA) data to your Warehouse Management System (WMS) by webhook or through an API connection. We can also provide a flat `.csv` or `.tsv` file through SFTP.

Webhook and API payloads use the snake\_case field paths below. Flat-file exports contain the same data, but repeated objects such as return labels and articles are flattened into rows or columns as agreed during implementation.

{% hint style="info" %}
The fields shown below are the core RMA export fields. Additional return-registration fields can be included when required by your integration.
{% endhint %}

## RMA Export Fields

| Field                                    | Example                                | Type            | Description                                                                                              |
| ---------------------------------------- | -------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------- |
| **Return details**                       |                                        |                 |                                                                                                          |
| `external_id`                            | `95c35493-41aa-44f8-9154-5a25cbbc1865` | UUID v4         | Unique return registration identifier generated by parcelLab.                                            |
| `reference`                              | `ORDER-123456`                         | string          | Retailer reference for the original order. This value is not guaranteed to be unique.                    |
| `status`                                 | `submitted`                            | string          | Current return registration status.                                                                      |
| `refund_method`                          | `refund`                               | string          | Refund method code selected by the customer. Available codes depend on the Returns Portal configuration. |
| `return_labels[].tracking_number`        | `RET-123456`                           | string or null  | Tracking number or barcode for the return label.                                                         |
| `return_labels[].courier`                | `dhl`                                  | string          | Courier or drop-off code for the return label.                                                           |
| `return_labels[].type`                   | `shipping`                             | string          | Return label type: `shipping` or `custom`.                                                               |
| `return_labels[].is_pickup`              | `false`                                | boolean         | Whether the return label represents a courier pickup.                                                    |
| `return_labels[].delivery_status`        | `Pending`                              | string          | Current shipping stage of the return label.                                                              |
| **Returned article details**             |                                        |                 |                                                                                                          |
| `articles_return[].line_item_id`         | `ITEM-001`                             | string          | Retailer identifier for the line item.                                                                   |
| `articles_return[].sku`                  | `TSHIRT-BLUE-M`                        | string or null  | Stock keeping unit for the line item.                                                                    |
| `articles_return[].return_reason`        | `size:too_small`                       | string or null  | Full configured return-reason path.                                                                      |
| `articles_return[].return_reason_pretty` | `Too small`                            | string or null  | Customer-facing text for the selected return reason.                                                     |
| `articles_return[].problem_description`  | `Sleeves are too short`                | string or null  | Additional problem description supplied for the returned article.                                        |
| `articles_return[].compensation_method`  | `refund`                               | string or null  | Configured compensation method code for the returned article.                                            |
| `articles_return[].return_quantity`      | `1`                                    | integer or null | Quantity of the article being returned.                                                                  |
| **Customer details**                     |                                        |                 |                                                                                                          |
| `customer_first_name`                    | `Bruce`                                | string or null  | Customer's first name.                                                                                   |
| `customer_last_name`                     | `Wayne`                                | string or null  | Customer's last name.                                                                                    |
| `customer_address.address_line`          | `1 Example Street`                     | string          | Street address, including the house number.                                                              |
| `customer_address.address_line_extra`    | `Apartment 4`                          | string or null  | Additional address information, such as an apartment or company name.                                    |
| `customer_address.postal_code`           | `75001`                                | string          | Postal or ZIP code.                                                                                      |
| `customer_address.region_code`           | `IDF`                                  | string or null  | State, province, or region code, when available.                                                         |
| `customer_address.city`                  | `Paris`                                | string          | City.                                                                                                    |
| `customer_address.country_iso3`          | `FRA`                                  | string          | ISO 3166-1 alpha-3 country code.                                                                         |
| `customer_phone`                         | `+33123456789`                         | string or null  | Customer's phone number.                                                                                 |
| `customer_email`                         | `bruce.wayne@example.com`              | string or null  | Customer's email address.                                                                                |

For the complete REST API response schema, see [Return Registrations](/docs/developers/returns/return-registrations.md).

## Sample RMA Export

The following example shows the core fields in the nested webhook and API representation:

```json
{
  "external_id": "95c35493-41aa-44f8-9154-5a25cbbc1865",
  "reference": "ORDER-123456",
  "status": "submitted",
  "refund_method": "refund",
  "return_labels": [
    {
      "tracking_number": "RET-123456",
      "courier": "dhl",
      "type": "shipping",
      "is_pickup": false,
      "delivery_status": "Pending"
    }
  ],
  "articles_return": [
    {
      "line_item_id": "ITEM-001",
      "sku": "TSHIRT-BLUE-M",
      "return_reason": "size:too_small",
      "return_reason_pretty": "Too small",
      "problem_description": "Sleeves are too short",
      "compensation_method": "refund",
      "return_quantity": 1
    }
  ],
  "customer_first_name": "Bruce",
  "customer_last_name": "Wayne",
  "customer_address": {
    "first_name": "Bruce",
    "last_name": "Wayne",
    "address_line": "1 Example Street",
    "address_line_extra": "Apartment 4",
    "postal_code": "75001",
    "region_code": "IDF",
    "city": "Paris",
    "country_iso3": "FRA"
  },
  "customer_phone": "+33123456789",
  "customer_email": "bruce.wayne@example.com"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.parcellab.com/docs/developers/returns/receive-order-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
