> For the complete documentation index, see [llms.txt](https://parcelwill-returns.gitbook.io/help-center/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://parcelwill-returns.gitbook.io/help-center/openapi/get-return-addresses.md).

# Get Return Addresses

### Endpoint

```http
GET /open-api/v1/return-addresses
```

### Description

Use this API to get available return addresses for the authenticated shop.

The returned `return_address_id` can be used when calling `POST /open-api/v1/return-labels`.

### Request Example

```bash
curl "$BASE_URL/open-api/v1/return-addresses" \
  -H "X-RETURN-SHOP-DOMAIN: demo.myshopify.com" \
  -H "X-RETURN-ACCESS-TOKEN: your-token"
```

### Success Response

```json
{
  "code": 1000,
  "msg": "success",
  "data": {
    "default_return_address_id": 1252,
    "list": [
      {
        "return_address_id": 1252,
        "address_name": "Main warehouse",
        "name": "Main warehouse",
        "phone": "123456",
        "country_code": "US",
        "country": "United States",
        "province_code": "CA",
        "province": "California",
        "city": "Los Angeles",
        "address": "100 Main St",
        "address_detail": "Suite 2",
        "zip": "90001",
        "full_address": "100 Main St, Suite 2, Los Angeles, California, 90001, United States",
        "is_default": 1,
        "warehouse_id": 99,
        "created_at": 1710000000,
        "updated_at": 1710000100
      }
    ]
  }
}
```

### Response Fields

| Field                       | Description                                                          |
| --------------------------- | -------------------------------------------------------------------- |
| `default_return_address_id` | Default return address ID. Returns `0` if no default address exists. |
| `return_address_id`         | Return address ID                                                    |
| `address_name`              | Address display name                                                 |
| `name`                      | Recipient or warehouse name                                          |
| `phone`                     | Phone number                                                         |
| `country_code`              | Country code                                                         |
| `country`                   | Country name                                                         |
| `province_code`             | Province or state code                                               |
| `province`                  | Province or state name                                               |
| `city`                      | City                                                                 |
| `address`                   | Address line 1                                                       |
| `address_detail`            | Address line 2                                                       |
| `zip`                       | Postal code                                                          |
| `full_address`              | Full formatted address                                               |
| `is_default`                | `1` means default address, `0` means non-default                     |
| `warehouse_id`              | Related warehouse ID. Returns `0` if not linked.                     |
| `created_at`                | Created time, Unix timestamp in seconds                              |
| `updated_at`                | Updated time, Unix timestamp in seconds                              |

### Notes

* Only active return addresses are returned.
* If no active address exists, `list` is empty and `default_return_address_id` is `0`.
* If `return_address_id` is omitted when uploading a label, Return will try to use the default return address.
