Pickup locations are physical addresses where customers can collect their orders instead of having them shipped. Each location has an internal `label`, a customer-facing `name`, and a full postal address.

## List Pickup Locations

```
GET /api/v1/pickup-locations
```

Returns the store's pickup locations, paginated.

### Query Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `limit` | `number` | 50 | Locations per page (1-100) |
| `offset` | `number` | 0 | Locations to skip |

```bash
curl -H "Authorization: Bearer your_api_key" \
  https://your-store.yns.store/api/v1/pickup-locations
```

### Response (200)

```json
{
  "data": [
    {
      "id": "0191abc0-1234-7def-8000-000000000001",
      "label": "Downtown store",
      "name": "Acme Downtown",
      "company": "Acme Inc.",
      "line1": "123 Main St",
      "line2": "Suite 4",
      "city": "Springfield",
      "state": "IL",
      "postalCode": "62701",
      "country": "US",
      "phone": "+1-555-0100",
      "createdAt": "2024-06-15T10:30:00.000Z",
      "updatedAt": "2024-06-15T10:30:00.000Z"
    }
  ],
  "meta": {
    "count": 1,
    "offset": 0,
    "limit": 50
  }
}
```

---

## Get Pickup Location

```
GET /api/v1/pickup-locations/{id}
```

Returns a single pickup location by UUID.

```bash
curl -H "Authorization: Bearer your_api_key" \
  https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001
```

### Response (200)

```json
{
  "id": "0191abc0-1234-7def-8000-000000000001",
  "label": "Downtown store",
  "name": "Acme Downtown",
  "company": "Acme Inc.",
  "line1": "123 Main St",
  "line2": "Suite 4",
  "city": "Springfield",
  "state": "IL",
  "postalCode": "62701",
  "country": "US",
  "phone": "+1-555-0100",
  "createdAt": "2024-06-15T10:30:00.000Z",
  "updatedAt": "2024-06-15T10:30:00.000Z"
}
```

---

## Create Pickup Location

```
POST /api/v1/pickup-locations
```

Creates an in-store pickup location customers can collect orders from.

### Request Body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `label` | `string` | Yes | Internal label for the pickup location |
| `name` | `string` | Yes | Location/recipient name shown to customers |
| `city` | `string` | Yes | City |
| `country` | `string` | Yes | ISO country code |
| `line1` | `string` | Yes | Street address line 1 |
| `postalCode` | `string` | Yes | Postal/ZIP code |
| `phone` | `string` | Yes | Contact phone number |
| `company` | `string` | No | Optional company name |
| `line2` | `string` | No | Optional street address line 2 |
| `state` | `string` | No | Optional state/province |

```bash
curl -X POST \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Downtown store",
    "name": "Acme Downtown",
    "line1": "123 Main St",
    "city": "Springfield",
    "postalCode": "62701",
    "country": "US",
    "phone": "+1-555-0100"
  }' \
  https://your-store.yns.store/api/v1/pickup-locations
```

### Response (201)

Returns the created pickup location (same shape as Get Pickup Location).

---

## Update Pickup Location

```
PATCH /api/v1/pickup-locations/{id}
```

Replaces a pickup location's address fields. All required fields from Create Pickup Location must be supplied.

### Request Body

Same fields as Create Pickup Location.

```bash
curl -X PATCH \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Downtown store",
    "name": "Acme Downtown",
    "line1": "456 Market St",
    "city": "Springfield",
    "postalCode": "62701",
    "country": "US",
    "phone": "+1-555-0100"
  }' \
  https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001
```

### Response (200)

Returns the updated pickup location.

---

## Delete Pickup Location

```
DELETE /api/v1/pickup-locations/{id}
```

Hard-deletes the pickup location by UUID.

```bash
curl -X DELETE \
  -H "Authorization: Bearer your_api_key" \
  https://your-store.yns.store/api/v1/pickup-locations/0191abc0-1234-7def-8000-000000000001
```

### Response (200)

```json
{
  "ok": true,
  "deleted": 1
}
```