---
updatedAt: 2026-07-30T22:32:10.000Z
---

# MCS return order APIs

You can use the MCS return order APIs to simulate return order workflows, including creating, tracking, and canceling returns, without impacting production systems.

> All entity data in the MCS API sandbox is retained for up to 2 days and is automatically cleared afterward. Actions performed in the sandbox do not affect live data or production systems.

## Getting started

Before using the return order APIs, complete the following setup steps:

1. **Obtain sandbox credentials**: Refer to the [Getting started with WFS sandbox guide](/us-marketplace/docs/getting-started-wfs-sandbox) for instructions on obtaining sandbox credentials and verifying API scope access for MCS endpoints.
2. **Create a sales channel**: Set up a test sales channel using the [MCS sales channel management APIs](/us-marketplace/docs/sales-channel-management-apis).
3. **Create test items**: Generate mock items using the [MCS item management APIs](/us-marketplace/docs/item-management-api).
4. **Create and deliver an order**: Create an order using the [MCS order management APIs](/us-marketplace/docs/order-management-apis) and wait for it to reach `DELIVERED` status. You can also use the prefix-based strategy to force this status if needed.

## Base URL

| Environment | URL                                              |
| ----------- | ------------------------------------------------ |
| Sandbox     | <https://sandbox.walmartapis.com/v3/fulfillment> |
| Production  | <https://api.walmart.com/v3/fulfillment>         |

## API Summary

The `orgId` parameter is passed as a query parameter in the endpoint URL, not as a request header. Seller context is derived from the API credentials used in the request.

> The `orgId` parameter is passed as a query parameter in the endpoint URL, not as a request header. Seller context is derived from the API credentials used in the request.

| Operation           | Method | Endpoint                                                                                                                                           | Description                                      |
| ------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| Create return order | POST   | `/orders-fulfillments/return-orders?orgId=`{orgId}                                                                                                 | Create a return for a delivered order            |
| Get return orders   | GET    | `/orders-fulfillments/return-orders?orgId=`{orgId}`&sellerOrderId=`{sellerOrderId}`&returnOrderId=`{returnOrderId}`&buId=`{buId}`&martId=`{martId} | Retrieve return order details with latest status |
| Cancel return order | POST   | `/orders-fulfillments/return-orders/`{returnOrderId}`/cancel?orgId=`{orgId}                                                                        | Cancel a return order before it ships            |

## Create a return order

Creates a return order for a previously fulfilled (delivered) order.

### Endpoint

```shell bash
POST https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders?orgId=<orgId>
```

### Sample request

```curl cURL
curl -X POST "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders?orgId=YOUR_ORG_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "WM_SANDBOX: v2" \
  -H "martId: 202" \
  -H "buId: 0" \
  -d '{
    "header": {
      "headerAttributes": {
        "martId": "202",
        "buId": "0"
      }
    },
    "payload": {
      "sellerOrderId": "1234567890",
      "orderItems": [
        {
          "returnReason": "Item Arrived Damaged",
          "itemDetail": {
            "sku": "SKU-001"
          },
          "qty": {
            "unitOfMeasure": "EA",
            "measurementValue": 1
          }
        }
      ]
    }
  }'
```
```python Python
import requests

url = "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders"

params = {
    "orgId": "YOUR_ORG_ID"
}

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "WM_SANDBOX": "v2",
    "martId": "202",
    "buId": "0"
}

payload = {
    "header": {
        "headerAttributes": {
            "martId": "202",
            "buId": "0"
        }
    },
    "payload": {
        "sellerOrderId": "1234567890",
        "orderItems": [
            {
                "returnReason": "Item Arrived Damaged",
                "itemDetail": {
                    "sku": "SKU-001"
                },
                "qty": {
                    "unitOfMeasure": "EA",
                    "measurementValue": 1
                }
            }
        ]
    }
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

print(response.status_code)
print(response.json())
```

### Request fields

| Field                                     | Type    | Required | Description                                                                                 |
| ----------------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------- |
| `header.headerAttributes.buId`            | string  | Yes      | Business unit ID                                                                            |
| `header.headerAttributes.martId`          | string  | Yes      | Mart ID (for example, `202` for US)                                                         |
| `payload.orderItems`                      | array   | Yes      | List of items to return                                                                     |
| `payload.orderItems.itemDetail.sku`       | string  | Yes      | SKU of the item being returned                                                              |
| `payload.orderItems.qty.measurementValue` | integer | Yes      | Quantity to return. Must be greater than `0` and less than or equal to the ordered quantity |
| `payload.orderItems.qty.unitOfMeasure`    | string  | Yes      | Unit of measure (for example, `EA`)                                                         |
| `payload.orderItems.returnReason`         | string  | Yes      | Reason for the return                                                                       |
| `payload.sellerOrderId`                   | string  | Yes      | Original seller order ID associated with the return                                         |

### Sample response (200 OK)

```json JSON
{
  "status": "OK",
  "header": {
    "headerAttributes": {
      "martId": "202",
      "buId": "0"
    }
  },
  "payload": {
    "returnOrderId": "300174159283746201",
    "sellerOrderId": "1234567890",
    "originSystemOrderId": "CO-98765",
    "channelName": "Seller_Returns",
    "returnOrderLines": [
      {
        "lineNo": "1",
        "returnReason": "Item Arrived Damaged",
        "returnReasonDesc": "Item arrived damaged",
        "itemDetail": {
          "sku": "SKU-001"
        },
        "qty": {
          "unitOfMeasure": "EA",
          "measurementValue": 1
        },
        "lineQuantityInfo": [
          {
            "status": "MARKET_PLACE_RETURN_INITIATED",
            "statusCode": 1000,
            "statusDescription": "Market Place Return Initiated",
            "statusQuantity": {
              "unitOfMeasure": "EA",
              "measurementValue": 1
            }
          }
        ],
        "imageURL": "image URL",
        "faultCategory": "SELLER",
        "currentTrackingStatuses": [
          {
            "trackingStatus": "RETURN_INITIATED",
            "quantity": {
              "unitOfMeasure": "EA",
              "measurementValue": 1
            },
            "currentTrackingStatusTime": "2026-04-13T10:30:00.000Z"
          }
        ]
      }
    ],
    "returnLineGroups": [
      {
        "groupNo": "1",
        "returnOrderGroupLines": [
          {
            "lineNo": "1",
            "qty": {
              "unitOfMeasure": "EA",
              "measurementValue": 1
            }
          }
        ],
        "labelImageUrl": "labelimage",
        "carrierInfo": {
          "carrierName": "FEDEX",
          "trackingNo": "374159283746",
          "trackingUrl": "https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers=374159283746"
        },
        "shipFrom": {
          "address": {
            "addressLineOne": "123 Main St",
            "city": "Austin",
            "stateOrProvinceCode": "TX",
            "postalCode": "78701",
            "countryCode": "USA"
          },
          "name": {
            "completeName": "John Doe",
            "firstName": "John"
          },
          "phone": "5551234567",
          "email": "john.doe@example.com"
        },
        "shipTo": {
          "address": {
            "addressLineOne": "130 Velocity Way",
            "city": "Shepherdsville",
            "stateOrProvinceCode": "KY",
            "postalCode": "40165",
            "countryCode": "USA"
          },
          "name": {
            "completeName": "KY1 RC",
            "firstName": "KY1 RC"
          },
          "phone": "8009256278",
          "email": "abc@gmail.com"
        }
      }
    ]
  }
}
```

### Response fields

| Field                                                             | Type   | Description                                                  |
| ----------------------------------------------------------------- | ------ | ------------------------------------------------------------ |
| `payload.returnOrderId`                                           | string | Unique 18-digit return order identifier that starts with `3` |
| `payload.sellerOrderId`                                           | string | Original seller order ID                                     |
| `payload.originSystemOrderId`                                     | string | Customer-facing order number from the original order         |
| `payload.channelName`                                             | string | Always returns `Seller_Returns`                              |
| `payload.returnOrderLines`                                        | array  | One entry for each returned item                             |
| `payload.returnOrderLines.currentTrackingStatuses.trackingStatus` | string | Initial return status. Value is `RETURN_INITIATED`           |
| `payload.returnLineGroups.carrierInfo`                            | object | Carrier and tracking details                                 |
| `payload.returnLineGroups.shipFrom`                               | object | Buyer address copied from the original order                 |
| `payload.returnLineGroups.shipTo`                                 | object | Return center address                                        |

## Get return orders

Retrieves return order details, including the latest simulated return status.

### Endpoint

```shell bash
GET https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders?orgId=<orgId>&sellerOrderId=<sellerOrderId>&returnOrderId=<returnOrderId>&buId=<buId>&martId=<martId>
```

### Sample request

```curl cURL
curl -X GET "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders?orgId=YOUR_ORG_ID&sellerOrderId=1234567890&returnOrderId=300174159283746201&buId=0&martId=202" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "WM_SANDBOX: v2"
```
```python Python
import requests

url = "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders"

params = {
    "orgId": "YOUR_ORG_ID",
    "sellerOrderId": "1234567890",
    "returnOrderId": "300174159283746201",
    "buId": "0",
    "martId": "202"
}

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "WM_SANDBOX": "v2"
}

response = requests.get(
    url,
    headers=headers,
    params=params
)

print(response.status_code)
print(response.json())
```

### Sample response (200 OK)

The trackingStatus in the response reflects the latest simulated status. The sandbox automatically advances the status over time. For more details refer to Status simulation.

```json JSON
{
  "header": {
    "headerAttributes": {
      "martId": "202",
      "buId": "0",
      "pageCount": 1,
      "totalCount": 1
    }
  },
  "payload": [
    {
      "returnOrderId": "300174159283746201",
      "sellerOrderId": "1234567890",
      "channelName": "Seller_Returns",
      "returnOrderLines": [
        {
          "lineNo": "1",
          "itemDetail": {
            "sku": "SKU-001"
          },
          "qty": {
            "unitOfMeasure": "EA",
            "measurementValue": 1
          },
          "currentTrackingStatuses": [
            {
              "trackingStatus": "RETURN_IN_TRANSIT",
              "quantity": {
                "unitOfMeasure": "EA",
                "measurementValue": 1
              },
              "currentTrackingStatusTime": "2026-04-13T11:00:00.000Z"
            }
          ],
          "dispositionCode": null
        }
      ],
      "returnLineGroups": [
        {
          "groupNo": "1",
          "returnOrderGroupLines": [
            {
              "lineNo": "1",
              "qty": {
                "unitOfMeasure": "EA",
                "measurementValue": 1
              }
            }
          ]
        }
      ]
    }
  ]
}
```

## Cancel return order

Cancels a return order. Only items in `RETURN_INITIATED` status can be canceled.

### Endpoint

```shell bash
POST https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders/<returnOrderId>/cancel?orgId=<orgId>
```

### Sample request

The request requires the `returnOrderId` path parameter and the `orgId` query parameter to identify the return order and associated organization.

```curl cURL
curl -X POST "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders/300174159283746201/cancel?orgId=YOUR_ORG_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "WM_SANDBOX: v2" \
  -H "martId: 202" \
  -H "buId: 0"
```
```python Python
import requests

url = "https://sandbox.walmartapis.com/v3/fulfillment/orders-fulfillments/return-orders/300174159283746201/cancel"

params = {
    "orgId": "YOUR_ORG_ID"
}

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
    "WM_SANDBOX": "v2",
    "martId": "202",
    "buId": "0"
}

response = requests.post(
    url,
    headers=headers,
    params=params
)

print(response.status_code)
print(response.json())
```

### Sample response (202 Accepted)

```json JSON
{
  "status": "CANCELLED",
  "header": {
    "headerAttributes": {
      "martId": "202",
      "buId": "0"
    }
  },
  "payload": {
    "returnOrderId": "300174159283746201"
  }
}
```

## Status simulation

The sandbox automatically advances return order tracking statuses to simulate real-world return lifecycle progression. Status updates are applied each time you call the get return orders API.

### Return status lifecycle

Return orders progress through the following simulated statuses in the sandbox:

```text
RETURN_INITIATED → RETURN_IN_TRANSIT → DELIVERED_AT_RETURN_CENTER → RETURN_RECEIVED
```

### Time-based progression (default)

By default, return statuses advance automatically based on the elapsed time since the return order was created. This behavior is similar to the time-based order status progression used for forward orders.

| Elapsed time   | Return status                 |
| -------------- | ----------------------------- |
| 0–29 minutes   | RETURN\_INITIATED             |
| 30–59 minutes  | RETURN\_IN\_TRANSIT           |
| 60–119 minutes | DELIVERED\_AT\_RETURN\_CENTER |
| 120+ minutes   | RETURN\_RECEIVED              |

### Infix-based progression (deterministic testing)

For deterministic testing, you can force a specific return status by including a supported status keyword in the `customerOrderNo` (`originSystemOrderId`) of the original order.

This behavior is similar to the prefix-based order status strategy used for forward orders. However, return status simulation uses an infix strategy so multiple status keywords can be included in the same order identifier. For example, `DELIVERED-abc-RETURN_INITIATED-TEST-001`).

| Keyword                      | Simulated return status      |
| ---------------------------- | ---------------------------- |
| `RETURN_INITIATED`           | `RETURN_INITIATED`           |
| `RETURN_IN_TRANSIT`          | `RETURN_IN_TRANSIT`          |
| `DELIVERED_AT_RETURN_CENTER` | `DELIVERED_AT_RETURN_CENTER` |
| `RETURN_RECEIVED`            | `RETURN_RECEIVED`            |
| `DISPUTE_EVENT`              | `DISPUTE_EVENT`              |
| `RETURN_CANCELLED`           | `RETURN_CANCELLED`           |

For example, create an order with `customerOrderNo = TEST-RETURN_RECEIVED-001` .

Then create and retrieve a return order for that order. The return immediately reflects the `RETURN_RECEIVED` status regardless of elapsed time.

### Additional status fields

When a return reaches certain statuses, additional fields may be included in the response.

| Return status     | Additional field behavior                                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `RETURN_RECEIVED` | A disposition code of `DISPOSE`, `RTV`, or `RESTOCK` is automatically assigned. The value is deterministic per line item. |

### Cancelation rules

| Current status               | Cancelation supported | Result                             |
| ---------------------------- | --------------------- | ---------------------------------- |
| `RETURN_INITIATED`           | Yes                   | Line status changes to `CANCELLED` |
| `RETURN_IN_TRANSIT`          | No                    | Line is skipped and not canceled   |
| `DELIVERED_AT_RETURN_CENTER` | No                    | Line is skipped and not canceled   |
| `RETURN_RECEIVED`            | No                    | Line is skipped and not canceled   |
| `DISPUTE_EVENT`              | No                    | Line is skipped and not canceled   |

* If all lines are in a non-cancelable status, the API returns a 400 error.
* If some lines are cancelable and others are not, only eligible lines are canceled.

## Errors and behaviors

All error responses follow this structure.

```shell bash
{
  "errors": [
    {
      "code": "500.OS_SERVICE.200",
      "field": null,
      "description": "Order does not exist",
      "info": "Order does not exist",
      "severity": "ERROR",
      "category": "APPLICATION"
    }
  ]
}
```

For a comprehensive list of common sandbox errors, refer to the <Anchor target="_blank" href="/us-marketplace/docs/errors-and-behaviors">Errors and behaviors</Anchor> page.

### Create return order errors

| HTTP | Code                           | Field          | Message                               | Description                                        |
| ---- | ------------------------------ | -------------- | ------------------------------------- | -------------------------------------------------- |
| 400  | INVALID\_WFS\_REQUEST          | martId         | Invalid `martId`                      | `martId` is missing or empty in the request header |
| 400  | 400.WFS.100                    | sku            | Invalid sku                           | SKU does not exist in the original order           |
| 400  | 400                            | itemDetail.sku | Order status not eligible for returns | Original order line is not in `DELIVERED` status   |
| 400  | 500.RETURN\_ORDER\_SERVICE.400 | itemDetail     | `itemDetail` must not be null         | `itemDetail` is missing in `orderItems`            |
| 400  | 500.OS\_SERVICE.200            | —              | Order does not exist                  | `sellerOrderId `does not match any existing order  |
| 400  | 500.509                        | sku            | Requested quantity is not available   | Quantity is ≤ 0 or exceeds ordered quantity        |
| 500  | WFS\_INTERNAL\_SERVER\_ERROR   | —              | Internal server error                 | Unhandled sandbox exception                        |

### Get return order errors

| HTTP | Code                         | Field  | Message               | Description                                                           |
| ---- | ---------------------------- | ------ | --------------------- | --------------------------------------------------------------------- |
| 400  | INVALID\_WFS\_REQUEST        | martId | Invalid martId        | `martId` is missing or empty                                          |
| 400  | 500.OS\_SERVICE.200          | —      | Order does not exist  | `sellerOrderId` doesn't match any order, or `returnOrderId` not found |
| 500  | WFS\_INTERNAL\_SERVER\_ERROR | —      | Internal server error | Unhandled sandbox exception                                           |

### Cancel return order errors

| HTTP | Code                         | Field | Message                         | Description                                                                     |
| ---- | ---------------------------- | ----- | ------------------------------- | ------------------------------------------------------------------------------- |
| 400  | 500.OS\_SERVICE.200          | —     | Order does not exist            | `returnOrderId` not found                                                       |
| 400  | 400                          | —     | Return order cannot be canceled | No lines in `RETURN_INITIATED `status (all already advanced past initial state) |
| 500  | WFS\_INTERNAL\_SERVER\_ERROR | —     | Internal server error           | Unhandled sandbox exception                                                     |

## Multi-item returns

You can return multiple items in a single request. Each item is validated independently. If any item fails validation, the entire request is rejected with the corresponding error(s).

```json JSON
{
"header": {
"headerAttributes": {
"martId": "202",
"buId": "0"
}
},
"payload": {
"sellerOrderId": "1234567890",
"orderItems": [
{
"returnReason": "Item Arrived Damaged",
"itemDetail": { "sku": "SKU-001" },
"qty": { "unitOfMeasure": "EA", "measurementValue": 2 }
},
{
"returnReason": "Wrong Item Received",
"itemDetail": { "sku": "SKU-002" },
"qty": { "unitOfMeasure": "EA", "measurementValue": 1 }
}
]
}
}
```

## Integration with get fulfillment order status

The Get Fulfillment Order Status API reflects return activity when returns exist for an order.

* Order lines with active returns include additional `orderLineQuantityInfo` entries:

* `PROCESSING_RETURN`: Items in `RETURN_INITIATED` or `RETURN_IN_TRANSIT`

* `RETURNED`: Items in `DELIVERED_AT_RETURN_CENTER` or `RETURN_RECEIVED`

* Partial returns are reflected accurately. For example, if 3 items were delivered and 1 was returned, the response is `DELIVERED: 2` ; `RETURNED: 1`.

* The overall order status aggregates return quantities into its computation.

## Example end-to-end workflow

| Step          | Action                                               | Endpoint                            | Outcome                                        |
| ------------- | ---------------------------------------------------- | ----------------------------------- | ---------------------------------------------- |
| 1             | Create sales channel                                 | `POST /channel-details`             | `orderChannelId` created                       |
| 2             | Create test items                                    | `POST /mcs/item`                    | Test SKUs available                            |
| 3             | Create order                                         | `POST /orders-fulfillments`         | `sellerOrderId: "ORD-001"`                     |
| 4             | Wait for delivery (\~600 min or use DELIVERED infix) | `GET /order-fulfillment/status`     | Order reaches `DELIVERED`                      |
| 5             | Create return                                        | `POST /return-orders?orgId={orgId}` | `returnOrderId: "300..."`                      |
| 6             | Get return (immediate)                               | `GET /return-orders`                | `RETURN_INITIATED`                             |
| 7             | Get return (\~30 min or use infix)                   | `GET /return-orders`                | `RETURN_IN_TRANSIT`                            |
| 8             | Get return (\~60 min or use infix)                   | `GET /return-orders`                | `DELIVERED_AT_RETURN_CENTER`                   |
| 9             | Get return (\~120 min or use infix)                  | `GET /return-orders`                | `RETURN_RECEIVED`, `dispositionCode: "RTV"`    |
| 10 (optional) | Cancel return                                        | `POST /return-orders/{id}/cancel`   | `CANCELLED` (only if still `RETURN_INITIATED`) |

## Related links

* <Anchor target="_blank" href="/us-marketplace/docs/multichannel-solutions-sandbox">WFS MCS sandbox overview</Anchor>
* <Anchor target="_blank" href="/us-marketplace/docs/getting-started-wfs-sandbox">Getting started with MCS sandbox</Anchor>
* <Anchor target="_blank" href="/us-marketplace/docs/multichannel-solutions-apis-in-sandbox">MCS APIs in sandbox</Anchor>
* <Anchor target="_blank" href="/us-marketplace/docs/sales-channel-management-apis">MCS sales channel management APIs</Anchor>
* <Anchor target="_blank" href="/us-marketplace/docs/item-management-api">Item management APIs</Anchor>
* <Anchor target="_blank" href="/us-marketplace/docs/order-management-apis">Order management APIs</Anchor>
* [Order tracking APIs](/us-marketplace/docs/order-tracking-apis)
* <Anchor target="_blank" href="/us-marketplace/docs/errors-and-behaviors">Errors and behaviors</Anchor>
* [MCS sandbox FAQs](/us-marketplace/docs/frequently-asked-questions-faqs)

<br />