# Create a location

Create new location

Endpoint: POST /locations
Version: 1.0.0
Security: BearerPartnerUser

## Security:

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

## 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)
    ID of the country in which the location is located ([method to get a list of countries](#countries))

  - `city_id` (number)
    Identifier of the city in which the location is located ([method to get a list of cities](#cities))

  - `address` (string)
    location address

  - `site` (string)
    location website

  - `coordinate_lat` (number)
    Latitude

  - `coordinate_lot` (number)
    Longitude

  - `business_type_id` (number)
    Business type

  - `short_descr` (string)
    location category

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

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

  - `data` (object)
    data object

  - `data.id` (number)
    location ID

  - `data.title` (string)
    location name

  - `data.short_descr` (string)
    location category

  - `data.logo` (string)
    Path to location logo image

  - `data.active` (number)
    Is the location active (presence of a paid license) (1 - active, 0 - inactive)

  - `data.phone` (string)
    location phone number

  - `data.country_id` (number)
    Identifier of the country in which the location is located

  - `data.schedule` (string)
    location schedule

  - `data.country` (string)
    Name of the country in which the location is located

  - `data.city_id` (number)
    City ID where the location is located

  - `data.city` (string)
    Name of the city where the location is located

  - `data.timezone_name` (string)
    timezone locations

  - `data.address` (string)
    Address where the location is located

  - `data.coordinate_lat` (number)
    Latitude

  - `data.coordinate_lon` (number)
    Longitude

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

  - `data.active_staff_count` (number)
    Number of team members available for appointment

  - `data.app_ios` (string)
    Link to iOS App

  - `data.app_android` (string)
    Link to Android App

  - `data.currency_short_title` (string)
    Abbreviated currency name

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

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

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

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

