# Change location

Change location data

Endpoint: PUT /locations/{location_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (number, required)
    location ID

## Header parameters:

  - `Accept` (string, required)
    Must be `application/vnd.api.v2+json`

  - `Content-Type` (string, required)
    Must be `application/json`

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Request fields (application/json):

  - `title` (string)
    location name

  - `country_id` (number)
    Country ID (has higher priority then country)

  - `country` (string)
    Country

  - `city_id` (number)
    City ID (has higher priority then city)

  - `city` (string)
    City

  - `address` (string)
    location address

  - `zip` (string)
    Zip code

  - `phones` (array)
    location phone numbers

  - `social` (object)
    location social media

  - `social.telegram` (string)
    Telegram

  - `social.instagram` (string)
    Instagram

  - `social.vk` (string)
    VK (social network)

  - `social.facebook` (string)
    Facebook

  - `social.viber` (string)
    Viber

  - `social.whatsapp` (string)
    WhatsApp

  - `site` (string)
    location website

  - `coordinate_lat` (number)
    Latitude

  - `coordinate_lon` (number)
    Longitude

  - `description` (string)
    Description

  - `business_type_id` (number)
    Business type

  - `short_descr` (string)
    Business category

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)
    Success status (true)

  - `data` (object)

  - `data.id` (number)
    location ID

  - `data.title` (string)
    location name

  - `data.country_id` (number)
    Country ID

  - `data.country` (string)
    Country name

  - `data.city_id` (number)
    City ID

  - `data.city` (string)
    City name

  - `data.timezone_name` (string)
    Timezone name

  - `data.address` (string)
    location address

  - `data.zip` (string)
    Zip code

  - `data.social` (object)
    location social media

  - `data.social.telegram` (string)
    Telegram

  - `data.social.instagram` (string)
    Instagram

  - `data.social.vk` (string)
    VK (social network)

  - `data.social.facebook` (string)
    Facebook

  - `data.social.viber` (string)
    Viber

  - `data.social.whatsapp` (string)
    WhatsApp

  - `data.site` (string)
    location website

  - `data.coordinate_lat` (number)
    Latitude

  - `data.coordinate_lon` (number)
    Longitude

  - `data.description` (string)
    Description

  - `data.business_type_id` (number)
    Business type

  - `data.short_descr` (string)
    Business category

  - `data.phone_confirmation` (boolean)
    Do I need to confirm my phone number via SMS when appointment?

  - `data.group_priority` (integer)
    The higher the priority, the higher the location when displayed in the list of chain locations

  - `data.push_notification_phone_confirm` (any)
    Confirm client number to send push notifications (0/1 or boolean)

  - `data.main_group_id` (number)
    Main location chain ID

  - `data.main_group` (any)
    Main location chain (object or empty array)

  - `data.main_group.id` (number)
    Chain ID

  - `data.main_group.title` (string)
    Chain name

  - `data.access` (object)
    Access rights list

  - `meta` (array)
    Metadata (empty array)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `errors` (object)
    Additional response data.

  - `errors.code` (number)
    Error number.
    Example: 401

  - `errors.message` (string)
    Error message.
    Example: Authentication needed

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `errors` (object)
    Additional response data.

  - `errors.code` (number)
    Error number.
    Example: 404

  - `errors.message` (string)
    Error message.
    Example: Not found

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Not found

