> ## Documentation Index
> Fetch the complete documentation index at: https://docs-restapi.wplimit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Locations

> Retrieve a paginated list of all locations.

## Query Parameters

<ParamField query="page" type="integer" default="1">
  Page number for pagination
</ParamField>

<ParamField query="per_page" type="integer" default="10">
  Number of locations per page
</ParamField>

<ParamField query="search" type="string">
  Search locations by name or full address (partial match)
</ParamField>

<ParamField query="status" type="string">
  Filter locations by status. Valid values: `active`, `inactive`
</ParamField>

## Example Requests

### Basic Request

```bash theme={null}
GET /wp-json/latepoint-api/v1/locations
X-API-Key: YOUR_API_KEY
```

### Search by Name

```bash theme={null}
GET /wp-json/latepoint-api/v1/locations?search=main
X-API-Key: YOUR_API_KEY
```

### Paginate

```bash theme={null}
GET /wp-json/latepoint-api/v1/locations?page=1&per_page=5
X-API-Key: YOUR_API_KEY
```

## Example Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "2",
      "name": "Location Center",
      "full_address": "123 Main St, New York, NY 10001",
      "status": "active",
      "category_id": "0",
      "order_number": null,
      "selection_image_id": "0",
      "created_at": "2025-09-03 21:50:21",
      "updated_at": "2025-09-03 21:50:21"
    },
    {
      "id": "1",
      "name": "Main Location",
      "full_address": "",
      "status": "active",
      "category_id": "0",
      "order_number": null,
      "selection_image_id": "0",
      "created_at": "2025-04-11 20:03:42",
      "updated_at": "2025-08-18 02:45:49"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 2,
    "total_pages": 1,
    "has_next_page": false,
    "has_previous_page": false
  }
}
```
