# tys.returns.create()

> tys.returns.create()

Source: https://docs.tryyoursize.com/reference/node/returns-create/

*Method* · `@tryyoursize/node`

```ts
create(ret: OutcomeReturnInput, options?: RequestOptions): Promise<OutcomeReturnResult>
```

## Parameters

- **`ret`** (`OutcomeReturnInput`, required)
  - **`id`** (`string`, required): Your return (or RMA) ID.
  - **`order_id`** (`string`, required)
  - **`line_id`** (`string`, required)
  - **`quantity`** (`integer`, required)
  - **`reason`** (`string`, optional): size_too_small, size_too_large, fit_other, style, quality, damaged_or_wrong, changed_mind, other; Shopify's ReturnReason codes (SIZE_TOO_SMALL…) and common returns-platform words are mapped. Empty: unspecified.
  - **`exchange`** (`boolean`, optional): The item was exchanged rather than refunded.
  - **`exchange_size`** (`string`, optional): The size sent in exchange (implies exchange).
  - **`returned_at`** (`string`, required)
- **`options`** (`RequestOptions`, optional)

## Returns

`Promise<OutcomeReturnResult>`: What was recorded.

## Example

**Node.js**

```ts
await tys.returns.create({
  id: "RMA-7",
  order_id: "1001",
  line_id: "1",
  quantity: 1,
  reason: "size_too_small",
  returned_at: new Date().toISOString(),
});
```

**Python**

```python
tys.returns.create({
    "id": "RMA-7", "order_id": "1001", "line_id": "1", "quantity": 1,
    "reason": "size_too_small", "returned_at": datetime.now(timezone.utc).isoformat(),
})
```

**cURL**

```bash
curl -X POST https://api.tryyoursize.com/v1/returns \
  -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \
  -H "TYS-Version: 2026-10-25" \
  -H "Content-Type: application/json" \
  -d '{"id":"RMA-7","order_id":"1001","line_id":"1","quantity":1,"reason":"size_too_small","returned_at":"2026-11-02T09:00:00Z"}'
```

## See also

- [Orders and returns](https://docs.tryyoursize.com/guides/outcomes.md)
- [returns.create (HTTP API)](https://docs.tryyoursize.com/api/reference/operations/createoutcomereturn.md)
