# Update Location Endpoint

#### Structure

##### Location

<table border="1" id="bkmrk-name-type-descriptio" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`id`</td><td>int</td><td>The id for the location</td><td>No</td></tr><tr><td>`name`</td><td>string</td><td>The name of the location</td><td>No</td></tr><tr><td>`email`</td><td>string</td><td>The email of the location</td><td>No</td></tr><tr><td>`phone`</td><td>string</td><td>The phone number for the location</td><td>No</td></tr><tr><td>`line_1`</td><td>string</td><td>The first line for the location</td><td>No</td></tr><tr><td>`line_2`</td><td>string</td><td>The second line for the location</td><td>No</td></tr><tr><td>`city`</td><td>string</td><td>The city for the location</td><td>No</td></tr><tr><td>`county`</td><td>string</td><td>The county for the location</td><td>No</td></tr><tr><td>`zone`</td><td>string</td><td>The zone code for the location, required for some countries (e.g., US, AU, etc)</td><td>No</td></tr><tr><td>`postcode`</td><td>string</td><td>The postcode for the location, required for some countries (e.g., GB, US, etc)</td><td>No</td></tr><tr><td>`country`</td><td>string</td><td>The country code for the location</td><td>No</td></tr><tr><td>`latitude`</td><td>float</td><td>The latitude for the location</td><td>No</td></tr><tr><td>`longitude`</td><td>float</td><td>The longitude for the location</td><td>No</td></tr><tr><td>`opening_hours`</td><td>object</td><td>See [Opening Hours](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-opening-hours)</td><td>No</td></tr><tr><td>`additional_attributes`</td><td>array</td><td>An array of [Additional Attribute](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-additional-attribute) objects</td><td>No</td></tr></tbody></table>

##### Opening Hours

<table border="1" id="bkmrk-name-type-descriptio-1" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`sunday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`monday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`tuesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`wednesday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`thursday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`friday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`saturday.times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr><tr><td>`overrides`</td><td>object</td><td>See [Overrides](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-overrides)</td><td>No</td></tr></tbody></table>

##### Time

<table border="1" id="bkmrk-name-type-descriptio-2" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`start`</td><td>time</td><td>The start of the time range</td><td>Yes</td></tr><tr><td>`end`</td><td>time</td><td>The end of the time range</td><td>Yes</td></tr></tbody></table>

##### Overrides

<table border="1" id="bkmrk-name-type-descriptio-3" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`date`</td><td>date</td><td>The date the override is for</td><td>Yes</td></tr><tr><td>`label`</td><td>string</td><td>The label for the override</td><td>No</td></tr><tr><td>`times`</td><td>array</td><td>An array of [Time](https://support.aerocommerce.com/books/api/page/update-location-endpoint/update-location-endpoint#bkmrk-time) objects</td><td>No</td></tr></tbody></table>

##### Additional Attribute

<table border="1" id="bkmrk-name-type-descriptio-4" style="border-collapse: collapse; width: 100%; height: 737.907px;"><colgroup><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col><col style="width: 25.0298%;"></col></colgroup><tbody><tr style="height: 29.7969px;"><td style="height: 29.7969px;">**Name**  
</td><td style="height: 29.7969px;">**Type**  
</td><td style="height: 29.7969px;">**Description**  
</td><td style="height: 29.7969px;">**Required**  
</td></tr><tr><td>`key`</td><td>string</td><td>The key of the additional attribute</td><td>Yes</td></tr><tr><td>`value`</td><td>string</td><td>The value of the additional attribute</td><td>Yes</td></tr></tbody></table>

#### Example Request

```
PUT /api/locations/{id|name}
```

```json
{
    "opening_hours": {
        "monday": {
            "times": [
                {
                    "start": "09:00",
                    "end": "12:30"
                },
                {
                    "start": "13:00",
                    "end": "17:00"
                }
            ]
        },
        "overrides": [
            {
                "date": "2025-12-26",
                "label": "Boxing Day",
                "times": []
            }
        ]
    },
}
```

#### Example Response

```json
{
    "location": {
        "id": 1
    }
}
```