# Get a visit

Endpoint: GET /visits/{visit_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

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

## Path parameters:

  - `visit_id` (number, required)

## Header parameters:

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

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

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

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

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

  - `data` (object)
    Object with data

  - `data.attendance` (number)
    Visit status

  - `data.datetime` (string)
    Date of visit

  - `data.comment` (integer)
    A comment

  - `data.records` (array)
    Appointment array

  - `data.records.id` (number)
    Appointment ID

  - `data.records.company_id` (number)
    location ID

  - `data.records.staff_id` (number)
    team member ID

  - `data.records.services` (array)
    Services Array

  - `data.records.events` (array)

  - `data.records.goods_transactions` (array)
    Array of commodity transactions

  - `data.records.staff` (object)
    team member Information

  - `data.records.staff.id` (number)
    team member ID

  - `data.records.staff.name` (string)
    team member name

  - `data.records.staff.specialization` (string)
    team member specialization

  - `data.records.staff.position` (object)
    team member's position

  - `data.records.staff.position.id` (number)
    Job ID

  - `data.records.staff.position.title` (string)
    Job Title

  - `data.records.staff.avatar` (string)
    The path to the file with the team member's avatar

  - `data.records.staff.avatar_big` (string)
    Path to a file with a higher resolution team member avatar

  - `data.records.staff.rating` (number)
    Rating

  - `data.records.staff.votes_count` (number)
    Number of votes that rated the team member

  - `data.records.client` (object)
    Client Information

  - `data.records.client.id` (number)
    Client ID

  - `data.records.client.name` (string)
    Client name

  - `data.records.client.phone` (string)
    Customer phone number

  - `data.records.client.card` (string)
    Client card number

  - `data.records.client.email` (string)
    Client's email address

  - `data.records.client.success_visits_count` (number)
    Number of customer visits, in the "Customer arrived" status

  - `data.records.client.fail_visits_count` (number)
    Number of canceled customer visits

  - `data.records.date` (string)
    Date of visit

  - `data.records.datetime` (string)
    Date of visit in ISO format

  - `data.records.create_date` (string)
    Date the visit was created

  - `data.records.comment` (string)
    Commentary on the visit

  - `data.records.online` (boolean)
    (Read only) Whether the appointment is online or not (false if the appointment was made by an administrator)

  - `data.records.visit_attendance` (number)
    Visit status

  - `data.records.attendance` (number)
    Status of the appointment in the visit

  - `data.records.confirmed` (number)
    Is the appointment verified?

  - `data.records.seance_length` (number)
    Appointment duration in seconds. Includes technical_break_duration. Equal to the sum of services plus the technical break.

  - `data.records.length` (number)
    Appointment duration in seconds. Alias of seance_length. Includes technical_break_duration.

  - `data.records.sms_before` (number)
    Whether to send an SMS reminder to the client (if the client is specified)

  - `data.records.sms_now` (number)
    Did you send SMS when adding an appointment

  - `data.records.sms_now_text` (string)
    SMS text

  - `data.records.email_now` (number)
    Has an email notification been sent?

  - `data.records.notified` (number)
    Flag for confirmation of the appointment by the location administrator, if the client asked to confirm the appointment

  - `data.records.master_request` (number)
    Indicates whether a specific team member was selected for the appointment. Set to false if the "any team member" option was chosen

  - `data.records.api_id` (string)
    External appointment ID

  - `data.records.from_url` (string)
    From which page the transition was made to complete the appointment (website, VK application, etc.)

  - `data.records.review_requested` (number)
    Flag for requesting visit feedback from the client

  - `data.records.activity_id` (number)
    Group event ID

  - `data.records.documents` (array)

  - `data.records.documents.id` (number)
    Document ID

  - `data.records.documents.type_id` (number)
    Document type

  - `data.records.documents.storage_id` (number)
    Inventory ID

  - `data.records.documents.user_id` (number)
    ID of the user who created the document

  - `data.records.documents.company_id` (number)
    location ID

  - `data.records.documents.number` (number)
    Document Number

  - `data.records.documents.comment` (string)
    Document comment

  - `data.records.documents.date_created` (string)
    Document creation date

  - `data.records.documents.category_id` (integer)
    Product category ID

  - `data.records.documents.visit_id` (integer)
    Visit ID

  - `data.records.documents.record_id` (integer)
    Appointment ID

  - `data.records.documents.type_title` (string)
    The name of the entity to which the document belongs

  - `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 403:

  - `403` (unknown)
    Forbidden

## Response 403 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: Access denied.

## 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: {}

