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

# Get Location

> Retrieve a specific location by ID

<Note>
  This endpoint retrieves detailed information about a specific location including capacity, inventory levels, and operational details.
</Note>

## Authentication

This endpoint requires a valid API key with `locations:read` permissions.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the location
</ParamField>

## Query Parameters

<ParamField query="expand" type="array">
  Expand related objects. Options: "inventory\_summary", "staff", "upcoming\_shipments"
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique location identifier
</ResponseField>

<ResponseField name="object" type="string">
  Object type, always "location"
</ResponseField>

<ResponseField name="name" type="string">
  Location name
</ResponseField>

<ResponseField name="code" type="string">
  Location code
</ResponseField>

<ResponseField name="type" type="string">
  Location type
</ResponseField>

<ResponseField name="capacity" type="object">
  Capacity information with available space
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://api.stateset.com/v1/locations/loc_0901f083-aa1c-43c5-af5c-0a9d2fc64e30?expand=inventory_summary' \
  --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const location = await stateset.locations.retrieve(
    'loc_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    { expand: ['inventory_summary'] }
  );
  ```

  ```python Python theme={null}
  location = stateset.locations.retrieve(
    'loc_0901f083-aa1c-43c5-af5c-0a9d2fc64e30',
    expand=['inventory_summary']
  )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "loc_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
    "object": "location",
    "name": "West Coast Distribution Center",
    "code": "WH-WEST-01",
    "type": "warehouse",
    "status": "active",
    "created_at": "2024-01-19T16:00:00Z",
    "updated_at": "2024-01-20T08:00:00Z",
    "address": {
      "line1": "1000 Distribution Way",
      "city": "Los Angeles",
      "state": "CA",
      "postal_code": "90001",
      "country": "US",
      "formatted": "1000 Distribution Way, Los Angeles, CA 90001, US"
    },
    "contact": {
      "name": "John Smith",
      "email": "john.smith@warehouse.com",
      "phone": "+1-555-123-4567"
    },
    "capabilities": ["storage", "fulfillment", "returns"],
    "capacity": {
      "total_sqft": 50000,
      "storage_units": 5000,
      "pallet_positions": 2000,
      "available_units": 4850,
      "available_pallets": 1920,
      "utilization_percent": 4.0
    },
    "operating_hours": {
      "monday": { "open": "06:00", "close": "22:00" },
      "tuesday": { "open": "06:00", "close": "22:00" },
      "wednesday": { "open": "06:00", "close": "22:00" },
      "thursday": { "open": "06:00", "close": "22:00" },
      "friday": { "open": "06:00", "close": "22:00" },
      "saturday": { "open": "08:00", "close": "18:00" },
      "sunday": { "closed": true }
    },
    "timezone": "America/Los_Angeles",
    "coordinates": {
      "latitude": 34.0522,
      "longitude": -118.2437
    },
    "inventory_summary": {
      "total_skus": 1250,
      "total_units": 125000,
      "total_value": 2500000,
      "low_stock_alerts": 15,
      "out_of_stock": 3
    },
    "metrics": {
      "orders_fulfilled_today": 45,
      "orders_fulfilled_week": 312,
      "average_fulfillment_time": "2.5 hours",
      "accuracy_rate": 99.7
    }
  }
  ```
</ResponseExample>
