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

# Awning Measurement

> Add/edit awning measurements

# Awning Measurement

Add or update awning measurements.

## Endpoint

```
POST /api/v1/measurements/awning_measurement_add_edit
```

<Note>This endpoint requires authentication</Note>

## Headers

<ParamField header="X-API-Token" type="string" required>
  Your API access token. You can also set this globally in the API playground.
</ParamField>

<ParamField header="platform" type="string" required>
  The platform making the request: `WEB`, `IOS`, or `ANDROID`.
</ParamField>

## Request Body

<ParamField body="client_id" type="integer" required>
  Client ID
</ParamField>

<ParamField body="awning_type" type="string">
  Awning type (retractable, stationary)
</ParamField>

<ParamField body="width" type="integer">
  Awning width
</ParamField>

<ParamField body="projection" type="integer">
  Awning projection
</ParamField>

<ParamField body="mount_height" type="integer">
  Mount height
</ParamField>

## Response

<ResponseField name="status" type="string">
  Success status
</ResponseField>

<ResponseField name="data" type="object">
  Response data
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost/fss/public/api/v1/measurements/awning_measurement_add_edit \
    -H "X-API-Token: YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "client_id": 456,
      "awning_type": "retractable",
      "width": 120,
      "projection": 60,
      "mount_height": 96
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('http://localhost/fss/public/api/v1/measurements/awning_measurement_add_edit', {
    method: 'POST',
    headers: {
      'X-API-Token': 'YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      client_id: 456,
      awning_type: 'retractable',
      width: 120,
      projection: 60,
      mount_height: 96
    })
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "status": "success",
    "data": {
      "id": 794,
      "awning_type": "retractable",
      "dimensions": {
        "width": 120,
        "projection": 60,
        "mount_height": 96
      }
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "status": "error",
    "message": "Validation failed"
  }
  ```
</ResponseExample>
