> ## 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.

# Single Window Photo Measurement

> Add/edit single window measurement with photo

## Endpoint

```
POST /api/v1/measurements/single_window_photo_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="id" type="integer">
  id
</ParamField>

<ParamField body="user_id" type="integer" required>
  user id
</ParamField>

<ParamField body="client_id" type="integer" required>
  client id
</ParamField>

<ParamField body="room_id" type="integer" required>
  room id
</ParamField>

<ParamField body="measurement_type_id" type="integer" required>
  measurement type id
</ParamField>

<ParamField body="note" type="string">
  note
</ParamField>

<ParamField body="installation_instructions" type="string">
  installation instructions
</ParamField>

<ParamField body="unit_type" type="string" required>
  unit type
</ParamField>

<ParamField body="mount_type" type="string">
  mount type
</ParamField>

<ParamField body="window_name" type="string" required>
  Descriptive name for the window.
</ParamField>

<ParamField body="w_top" type="string">
  w top
</ParamField>

<ParamField body="w_middle" type="string">
  w middle
</ParamField>

<ParamField body="w_bottom" type="string">
  w bottom
</ParamField>

<ParamField body="h_left" type="string">
  h left
</ParamField>

<ParamField body="h_middle" type="string">
  h middle
</ParamField>

<ParamField body="h_right" type="string">
  h right
</ParamField>

<ParamField body="d_sill" type="string">
  d sill
</ParamField>

<ParamField body="left_edge_w" type="string">
  left edge w
</ParamField>

<ParamField body="right_edge_w" type="string">
  right edge w
</ParamField>

<ParamField body="top_edge_to_ceiling_h" type="string">
  top edge to ceiling h
</ParamField>

<ParamField body="bottom_edge_to_floor_h" type="string">
  bottom edge to floor h
</ParamField>

<ParamField body="middle_a_w" type="string">
  middle a w
</ParamField>

<ParamField body="middle_b_w" type="string">
  middle b w
</ParamField>

<ParamField body="middle_c_w" type="string">
  middle c w
</ParamField>

<ParamField body="wall_to_wall_w" type="string">
  wall to wall w
</ParamField>

<ParamField body="floor_to_ceiling_h" type="string">
  floor to ceiling h
</ParamField>

<ParamField body="bottom_trim_to_floor" type="string">
  bottom trim to floor
</ParamField>

<ParamField body="square_feet" type="string">
  square feet
</ParamField>

<ParamField body="for_shutter" type="string">
  for shutter
</ParamField>

<ParamField body="focus_width" type="string">
  focus width
</ParamField>

<ParamField body="focus_width_key" type="string">
  focus width key
</ParamField>

<ParamField body="focus_height" type="string">
  focus height
</ParamField>

<ParamField body="focus_height_key" type="string">
  focus height key
</ParamField>

<ParamField body="offset_value" type="string">
  offset value
</ParamField>

<ParamField body="offset_value_keys" type="string">
  offset value keys
</ParamField>

<ParamField body="measurement_unique_id" type="string">
  Optional ID for Solatech Focus integration.
</ParamField>

<ParamField body="min_value_fields" type="string">
  min value fields
</ParamField>

<ParamField body="total_custom_fields" type="integer">
  total custom fields
</ParamField>

<ParamField body="custom_field" type="object">
  custom field
</ParamField>

## Response

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

<ResponseField name="data" type="array">
  data
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'http://fssportal.com/api/v1/measurements/single_window_photo_add_edit' \
  --header 'X-API-Token: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "id": 0,
    "user_id": 68,
    "client_id": 1856,
    "room_id": 4945,
    "measurement_type_id": 1,
    "note": "",
    "installation_instructions": "",
    "unit_type": "Metrix",
    "mount_type": "",
    "window_name": "test",
    "w_top": "",
    "w_middle": "",
    "w_bottom": "",
    "h_left": "",
    "h_middle": "",
    "h_right": "",
    "d_sill": "",
    "left_edge_w": "",
    "right_edge_w": "",
    "top_edge_to_ceiling_h": "",
    "bottom_edge_to_floor_h": "",
    "middle_a_w": "",
    "middle_b_w": "",
    "middle_c_w": "",
    "wall_to_wall_w": "",
    "floor_to_ceiling_h": "",
    "bottom_trim_to_floor": "",
    "square_feet": "",
    "for_shutter": "",
    "focus_width": "",
    "focus_width_key": "",
    "focus_height": "",
    "focus_height_key": "",
    "offset_value": "",
    "offset_value_keys": "",
    "measurement_unique_id": "",
    "min_value_fields": "",
    "total_custom_fields": 0,
    "custom_field": []
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('http://fssportal.com/api/v1/measurements/single_window_photo_add_edit', {
    method: 'POST',
    headers: {
      'X-API-Token': 'YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "id": 0,
    "user_id": 68,
    "client_id": 1856,
    "room_id": 4945,
    "measurement_type_id": 1,
    "note": "",
    "installation_instructions": "",
    "unit_type": "Metrix",
    "mount_type": "",
    "window_name": "test",
    "w_top": "",
    "w_middle": "",
    "w_bottom": "",
    "h_left": "",
    "h_middle": "",
    "h_right": "",
    "d_sill": "",
    "left_edge_w": "",
    "right_edge_w": "",
    "top_edge_to_ceiling_h": "",
    "bottom_edge_to_floor_h": "",
    "middle_a_w": "",
    "middle_b_w": "",
    "middle_c_w": "",
    "wall_to_wall_w": "",
    "floor_to_ceiling_h": "",
    "bottom_trim_to_floor": "",
    "square_feet": "",
    "for_shutter": "",
    "focus_width": "",
    "focus_width_key": "",
    "focus_height": "",
    "focus_height_key": "",
    "offset_value": "",
    "offset_value_keys": "",
    "measurement_unique_id": "",
    "min_value_fields": "",
    "total_custom_fields": 0,
    "custom_field": []
  })
  });

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

<ResponseExample>
  ```json Success Response theme={null}
  {
    "message": "Measurement added successfully!",
    "data": []
  }
  ```
</ResponseExample>

## Notes

* Authentication is required
