{
  "openapi": "3.1.1",
  "info": {
    "title": "Business Management",
    "version": "1.0.0",
    "termsOfService": "https://alteg.io/en/info/terms/",
    "license": {
      "name": "Altegio API Agreement",
      "url": "/en/api-license-agreement"
    },
    "description": "Full-featured B2B API for business operations.\n\n**Base URL:** `https://api.alteg.io/api`\n\n## ⚠️ Version Status\n\n**V1 will be gradually deprecated.** We recommend using [V2 API](../b2b-v2/openapi.yaml) for new integrations. V1 endpoints are maintained for backward compatibility, but new features will be released in V2 only.\n\n## V1 and V2 parameter aliases\n\nV1 accepts the canonical V2 terminology for query-string and request-body parameters while continuing to support legacy V1 names. This makes it possible to share request-building code between API versions. Common alias families include:\n\n- `location_id`, `company_id`, and `salon_id`\n- `chain_id`, `company_group_id`, and `salon_group_id`\n- `team_member_id`, `staff_id`, and `master_id`\n- `appointment_id` and `record_id`\n- `product_id` and `good_id`\n\nSingular, plural, and camelCase variants are supported where applicable. Send only one name from each alias family. If multiple aliases are supplied, explicitly supplied values are preserved and are not overwritten.\n\n## Authentication\n\nRequires both partner and user authorization:\n```\nAuthorization: Bearer <partner_token>, User <user_token>\n```\n"
  },
  "servers": [
    {
      "url": "https://api.alteg.io/api/v1",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "user": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "BearerPartner": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Bearer {PartnerToken}"
      },
      "BearerPartnerUser": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Bearer {PartnerToken}, User {UserToken}"
      }
    },
    "schemas": {
      "auth_request": {
        "title": "Root Type for auth_request",
        "required": [
          "login",
          "password"
        ],
        "type": "object",
        "properties": {
          "login": {
            "type": "string",
            "description": "Phone number or Email"
          },
          "password": {
            "type": "string",
            "description": "Password"
          }
        },
        "description": "User authorization",
        "example": {
          "login": "testuser@alteg.io",
          "password": "testpass"
        }
      },
      "auth_response": {
        "title": "Root Type for auth_response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Request success status"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "integer",
                "description": "User ID",
                "format": "int32"
              },
              "user_token": {
                "type": "string",
                "description": "User_token of the user"
              },
              "name": {
                "type": "string",
                "description": "Username"
              },
              "phone": {
                "type": "string",
                "description": "User phone"
              },
              "login": {
                "type": "string",
                "description": "User login"
              },
              "email": {
                "type": "string",
                "description": "User mailing address"
              },
              "avatar": {
                "type": "string",
                "description": "Path to the user's avatar file"
              },
              "is_approved": {
                "type": "boolean",
                "description": "Is the user verified in the system"
              },
              "is_email_confirmed": {
                "type": "boolean",
                "description": "Is the user email confirmed"
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata",
            "items": {}
          }
        },
        "description": "User authorization",
        "example": {
          "success": true,
          "data": {
            "id": 123456,
            "user_token": "wec23fh8cDfFV4432fc352456",
            "name": "James Smith",
            "phone": "+13155550175",
            "login": "j.smith",
            "email": "j.smith@example.com",
            "avatar": "https://assets.alteg.io/general/0/01/123456789098765_12345678909876.png",
            "is_approved": true,
            "is_email_confirmed": false
          },
          "meta": []
        }
      },
      "response_success_false_object": {
        "title": "Unsuccessful response status",
        "type": "boolean",
        "description": "Response status.",
        "example": false
      },
      "response_data_null_object": {
        "title": "No data in response",
        "type": [
          "object",
          "null"
        ],
        "description": "Response data.",
        "example": null
      },
      "response_meta_error_unauthorized_object": {
        "title": "Response error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "Authentication needed."
          }
        }
      },
      "401_unauthorized_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_false_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_error_unauthorized_object"
          }
        }
      },
      "response_meta_error_forbidden_object": {
        "title": "Response error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "Access denied."
          }
        }
      },
      "403_forbidden_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_false_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_error_forbidden_object"
          }
        }
      },
      "response_meta_empty_object": {
        "title": "Empty meta object",
        "type": [
          "object",
          "array"
        ],
        "description": "Additional response data (empty object or empty array)",
        "example": {}
      },
      "404_not_found_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_false_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_empty_object"
          }
        }
      },
      "companies_data_types": {
        "title": "Root Type for companies_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "number",
                  "description": "location ID"
                },
                "title": {
                  "type": "string",
                  "description": "location name"
                },
                "public_title": {
                  "type": "string",
                  "description": "Public display name of the location"
                },
                "short_descr": {
                  "type": "string",
                  "description": "location category"
                },
                "logo": {
                  "type": "string",
                  "description": "location logo image address"
                },
                "active": {
                  "type": "integer",
                  "description": "Is the location active (1 = active, 0 = inactive)"
                },
                "phone": {
                  "type": "string",
                  "description": "location phone number"
                },
                "phones": {
                  "type": "array",
                  "description": "Array of location phone numbers",
                  "items": {
                    "type": "string"
                  }
                },
                "email": {
                  "type": "string",
                  "description": "Location email address"
                },
                "country_id": {
                  "type": "number",
                  "description": "Identifier of the country in which the location is located"
                },
                "schedule": {
                  "type": "string",
                  "description": "location schedule"
                },
                "country": {
                  "type": "string",
                  "description": "location country name"
                },
                "city_id": {
                  "type": "number",
                  "description": "City ID where the location is located"
                },
                "city": {
                  "type": "string",
                  "description": "location city name"
                },
                "timezone": {
                  "type": "number",
                  "description": "Timezone offset in hours"
                },
                "timezone_name": {
                  "type": "string",
                  "description": "timezone locations"
                },
                "address": {
                  "type": "string",
                  "description": "Address where the location is located"
                },
                "coordinate_lat": {
                  "type": "number",
                  "description": "Latitude",
                  "format": "float"
                },
                "coordinate_lon": {
                  "type": "number",
                  "description": "Longitude",
                  "format": "float"
                },
                "phone_confirmation": {
                  "type": "boolean",
                  "description": "Do I need to confirm my phone number via SMS when appointment?"
                },
                "active_staff_count": {
                  "type": "number",
                  "description": "Number of team members available for appointment"
                },
                "next_slot": {
                  "type": "string",
                  "description": "Date and time of the next free session in the location (ISO8601). The field will be present only if the GET parameter forBooking=1 is passed",
                  "format": "date-time"
                },
                "app_ios": {
                  "type": "string",
                  "description": "Link to iOS App"
                },
                "app_android": {
                  "type": "string",
                  "description": "Link to app for Android"
                },
                "currency_short_title": {
                  "type": "string",
                  "description": "Abbreviated currency name"
                },
                "reminds_sms_disabled": {
                  "type": "boolean",
                  "description": "SMS reminders disabled"
                },
                "reminds_sms_default": {
                  "type": "integer",
                  "description": "Default SMS reminder setting"
                },
                "group_priority": {
                  "type": "number",
                  "description": "The higher the priority, the higher the location when displayed in the list of chain locations"
                },
                "bookform_group_priority": {
                  "type": "number",
                  "description": "Priority for booking form display"
                },
                "description": {
                  "type": "string",
                  "description": "Full HTML description of the location"
                },
                "photos": {
                  "type": "array",
                  "description": "Array of location photo paths",
                  "items": {
                    "type": "string"
                  }
                },
                "company_photos": {
                  "type": "array",
                  "description": "Array of full location photo URLs",
                  "items": {
                    "type": "string"
                  }
                },
                "booking_widget_promo": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Booking widget promo configuration"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of locations",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1050,
              "title": "La Visage",
              "public_title": "La Visage Beauty",
              "short_descr": "Beauty saloon",
              "logo": "https://app.alteg.io/images/no-master.png",
              "active": 1,
              "phone": "+13155550175",
              "phones": [
                "+13155550175"
              ],
              "email": "info@lavisage.com",
              "country_id": 7,
              "schedule": "",
              "country": "United States",
              "city_id": 181,
              "city": "New York",
              "timezone": -5,
              "timezone_name": "America/New_York",
              "address": "New York, 787 Jackson Drive",
              "coordinate_lat": 40.73061,
              "coordinate_lon": -73.935242,
              "phone_confirmation": true,
              "active_staff_count": 2,
              "next_slot": "2026-03-23T10:10:00-05:00",
              "app_ios": "",
              "app_android": "",
              "currency_short_title": "$",
              "reminds_sms_disabled": false,
              "reminds_sms_default": 1,
              "group_priority": 900,
              "bookform_group_priority": 0,
              "description": "<p>Welcome to La Visage</p>",
              "photos": [],
              "booking_widget_promo": null
            }
          ],
          "meta": []
        }
      },
      "company_create_request_data_types": {
        "title": "Root Type for company_create_request_data_types",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "location name"
          },
          "country_id": {
            "type": "number",
            "description": "ID of the country in which the location is located ([method to get a list of countries](#countries))"
          },
          "city_id": {
            "type": "number",
            "description": "Identifier of the city in which the location is located ([method to get a list of cities](#cities))"
          },
          "address": {
            "type": "string",
            "description": "location address"
          },
          "site": {
            "type": "string",
            "description": "location website"
          },
          "coordinate_lat": {
            "type": "number",
            "description": "Latitude",
            "format": "float"
          },
          "coordinate_lot": {
            "type": "number",
            "description": "Longitude",
            "format": "float"
          },
          "business_type_id": {
            "type": "number",
            "description": "Business type"
          },
          "short_descr": {
            "type": "string",
            "description": "location category"
          }
        },
        "description": "Create a location",
        "example": {
          "title": "James Smith LLC",
          "country_id": 7,
          "city_id": 2,
          "address": "New York, 787 Jackson Drive",
          "site": "james-smith-company.com",
          "coordinate_lat": 40.73061,
          "coordinate_lot": -73.935242,
          "business_type_id": 1,
          "short_descr": "Beauty studio"
        }
      },
      "company_create_response_data_types": {
        "title": "Root Type for company_create_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "location ID"
              },
              "title": {
                "type": "string",
                "description": "location name"
              },
              "short_descr": {
                "type": "string",
                "description": "location category"
              },
              "logo": {
                "type": "string",
                "description": "Path to location logo image"
              },
              "active": {
                "type": "number",
                "description": "Is the location active (presence of a paid license) (1 - active, 0 - inactive)"
              },
              "phone": {
                "type": "string",
                "description": "location phone number"
              },
              "country_id": {
                "type": "number",
                "description": "Identifier of the country in which the location is located"
              },
              "schedule": {
                "type": "string",
                "description": "location schedule"
              },
              "country": {
                "type": "string",
                "description": "Name of the country in which the location is located"
              },
              "city_id": {
                "type": "number",
                "description": "City ID where the location is located"
              },
              "city": {
                "type": "string",
                "description": "Name of the city where the location is located"
              },
              "timezone_name": {
                "type": "string",
                "description": "timezone locations"
              },
              "address": {
                "type": "string",
                "description": "Address where the location is located"
              },
              "coordinate_lat": {
                "type": "number",
                "description": "Latitude",
                "format": "float"
              },
              "coordinate_lon": {
                "type": "number",
                "description": "Longitude",
                "format": "float"
              },
              "phone_confirmation": {
                "type": "boolean",
                "description": "Do I need to confirm my phone number via SMS when appointment?"
              },
              "active_staff_count": {
                "type": "number",
                "description": "Number of team members available for appointment"
              },
              "app_ios": {
                "type": "string",
                "description": "Link to iOS App"
              },
              "app_android": {
                "type": "string",
                "description": "Link to Android App"
              },
              "currency_short_title": {
                "type": "string",
                "description": "Abbreviated currency name"
              }
            },
            "description": "data object"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create a location",
        "example": {
          "success": true,
          "data": {
            "id": 1050,
            "title": "James Smith LLC",
            "short_descr": "Beauty studio",
            "logo": "https://app.alteg.io/images/no-master.png",
            "active": 1,
            "phone": "+13155550175",
            "country_id": 7,
            "schedule": "",
            "country": "United States",
            "city_id": 181,
            "city": "New York",
            "timezone_name": "America/New_York",
            "address": "New York, 787 Jackson Drive",
            "coordinate_lat": 40.73061,
            "coordinate_lon": -73.935242,
            "phone_confirmation": true,
            "active_staff_count": 2,
            "app_ios": "",
            "app_android": "",
            "currency_short_title": "R"
          },
          "meta": []
        }
      },
      "company_get_response_data_types": {
        "title": "Root Type for company_get_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "location ID"
              },
              "title": {
                "type": "string",
                "description": "location name"
              },
              "country_id": {
                "type": "number",
                "description": "Identifier of the country in which the location is located"
              },
              "country": {
                "type": "string",
                "description": "Name of the country in which the location is located"
              },
              "city_id": {
                "type": "number",
                "description": "City ID where the location is located"
              },
              "city": {
                "type": "string",
                "description": "Name of the city where the location is located"
              },
              "timezone_name": {
                "type": "string",
                "description": "timezone locations"
              },
              "address": {
                "type": "string",
                "description": "Address where the location is located"
              },
              "zip": {
                "type": "string",
                "description": "Zip code"
              },
              "social": {
                "type": "object",
                "properties": {
                  "telegram": {
                    "type": "string",
                    "description": "Telegram"
                  },
                  "instagram": {
                    "type": "string",
                    "description": "Instagram"
                  },
                  "vk": {
                    "type": "string",
                    "description": "VK (social network)"
                  },
                  "facebook": {
                    "type": "string",
                    "description": "Facebook"
                  },
                  "viber": {
                    "type": "string",
                    "description": "Viber"
                  },
                  "whatsapp": {
                    "type": "string",
                    "description": "WhatsApp"
                  }
                },
                "description": "location social media"
              },
              "site": {
                "type": "string",
                "description": "location website"
              },
              "coordinate_lat": {
                "type": "number",
                "description": "Latitude",
                "format": "float"
              },
              "coordinate_lon": {
                "type": "number",
                "description": "Longitude",
                "format": "float"
              },
              "phone_confirmation": {
                "type": "boolean",
                "description": "Do I need to confirm the phone by SMS when appointment"
              },
              "active_staff_count": {
                "type": "number",
                "description": "Number of team members available for appointment"
              },
              "next_slot": {
                "type": "string",
                "description": "Date and time of the next free session in the location (ISO8601). The field will be present only if the GET parameter forBooking=1 is passed",
                "format": "date-time"
              },
              "group_priority": {
                "type": "integer",
                "description": "The higher the priority, the higher the location when displayed in the list of chain locations",
                "format": "int32"
              },
              "push_notification_phone_confirm": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "description": "Confirm client number to send push notifications (0/1 or boolean)"
              },
              "main_group_id": {
                "type": "number",
                "description": "Main location chain ID"
              },
              "main_group": {
                "description": "Main location chain (object or empty array)",
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Chain ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Chain name"
                      }
                    }
                  },
                  {
                    "type": "array",
                    "maxItems": 0
                  }
                ]
              },
              "groups": {
                "type": "object",
                "description": "All location chains. Only when show_groups=1 is set",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Chain ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Chain name"
                    }
                  }
                }
              },
              "bookforms": {
                "type": "array",
                "description": "location online booking forms (widgets)",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "appointment form ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "appointment form name"
                    },
                    "is_default": {
                      "type": "number",
                      "description": "Is this appointment form location default"
                    },
                    "url": {
                      "type": "string",
                      "description": "appointment form url"
                    }
                  }
                }
              },
              "online_sales_form_url": {
                "type": "string",
                "description": "appointment form url. Only if bookform_id is set"
              },
              "payment_policy": {
                "type": "object",
                "description": "Currently enabled payment policy for the location",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "none",
                      "deposit",
                      "card_guarantee"
                    ],
                    "description": "Payment policy type: none — disabled, deposit — prepaid deposit, card_guarantee — card guarantee"
                  }
                }
              },
              "access": {
                "type": "object",
                "description": "Access rights list. Only if my=1 is set"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get location",
        "example": {
          "success": true,
          "data": {
            "id": 37532,
            "title": "James Smith LLC",
            "country_id": 7,
            "country": "United States",
            "city_id": 181,
            "city": "New York",
            "timezone_name": "America/New_York",
            "address": "New York, 787 Jackson Drive",
            "zip": "11435",
            "coordinate_lat": 40.73061,
            "coordinate_lon": -73.935242,
            "short_descr": "Beauty studio",
            "social": {
              "facebook": "",
              "instagram": "instagram.com/james_smith_company/",
              "telegram": "",
              "whatsapp": "",
              "viber": ""
            },
            "site": "james-smith-company.com",
            "business_type_id": 1,
            "description": "The <strong>James Smith</strong> location",
            "phone_confirmation": true,
            "active_staff_count": 2,
            "next_slot": "2026-03-23T10:10:00-05:00",
            "group_priority": 900,
            "push_notification_phone_confirm": 1,
            "main_group_id": 9206,
            "main_group": {
              "id": 9206,
              "title": "James Smith LLC main location chain"
            },
            "groups": {
              "9206": {
                "id": 9206,
                "title": "James Smith LLC main location chain"
              },
              "9207": {
                "id": 9207,
                "title": "James Smith LLC extra location chain"
              }
            },
            "bookforms": [
              {
                "id": 19203,
                "title": "James Smith LLC location appointment form",
                "is_default": 0,
                "url": "https://n19203.alteg.io/"
              }
            ],
            "online_sales_form_url": "https://o1.alteg.io",
            "payment_policy": {
              "type": "deposit"
            },
            "access": {}
          },
          "meta": []
        }
      },
      "response_errors_unauthorized_object": {
        "title": "Response error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "code": {
            "type": "number",
            "description": "Error number.",
            "example": 401
          },
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "Authentication needed"
          }
        }
      },
      "401_unauthorized_response_legacy": {
        "type": "object",
        "properties": {
          "errors": {
            "$ref": "#/components/schemas/response_errors_unauthorized_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_error_unauthorized_object"
          }
        }
      },
      "response_errors_not_found_object": {
        "title": "Response error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "code": {
            "type": "number",
            "description": "Error number.",
            "example": 404
          },
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "Not found"
          }
        }
      },
      "response_meta_error_not_found_object": {
        "title": "Response error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "Not found"
          }
        }
      },
      "404_not_found_response_legacy": {
        "type": "object",
        "properties": {
          "errors": {
            "$ref": "#/components/schemas/response_errors_not_found_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_error_not_found_object"
          }
        }
      },
      "company_put_request_data_types": {
        "title": "Root Type for company_put_request_data_types",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "location name"
          },
          "country_id": {
            "type": "number",
            "description": "Country ID (has higher priority then country)"
          },
          "country": {
            "type": "string",
            "description": "Country"
          },
          "city_id": {
            "type": "number",
            "description": "City ID (has higher priority then city)"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "address": {
            "type": "string",
            "description": "location address"
          },
          "zip": {
            "type": "string",
            "description": "Zip code"
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "location phone numbers"
          },
          "social": {
            "type": "object",
            "properties": {
              "telegram": {
                "type": "string",
                "description": "Telegram"
              },
              "instagram": {
                "type": "string",
                "description": "Instagram"
              },
              "vk": {
                "type": "string",
                "description": "VK (social network)"
              },
              "facebook": {
                "type": "string",
                "description": "Facebook"
              },
              "viber": {
                "type": "string",
                "description": "Viber"
              },
              "whatsapp": {
                "type": "string",
                "description": "WhatsApp"
              }
            },
            "description": "location social media"
          },
          "site": {
            "type": "string",
            "description": "location website"
          },
          "coordinate_lat": {
            "type": "number",
            "description": "Latitude",
            "format": "float"
          },
          "coordinate_lon": {
            "type": "number",
            "description": "Longitude",
            "format": "float"
          },
          "description": {
            "type": "string",
            "description": "Description",
            "format": "html"
          },
          "business_type_id": {
            "type": "number",
            "description": "Business type",
            "format": "int32"
          },
          "short_descr": {
            "type": "string",
            "description": "Business category"
          }
        },
        "description": "Change location",
        "example": {
          "title": "James Smith LLC",
          "country": "United States",
          "city": "New York",
          "address": "New York, 787 Jackson Drive",
          "zip": "11435",
          "phones": [
            "12125357710",
            "12125357711"
          ],
          "social": {
            "instagram": "instagram.com/james_smith_company/"
          },
          "site": "james-smith-company.com",
          "coordinate_lat": 40.73061,
          "coordinate_lon": -73.935242,
          "description": "The <strong>James Smith</strong> location",
          "business_type_id": 1,
          "short_descr": "Beauty studio"
        }
      },
      "company_put_response_data_types": {
        "title": "Root Type for company_put_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "location ID"
              },
              "title": {
                "type": "string",
                "description": "location name"
              },
              "country_id": {
                "type": "number",
                "description": "Country ID"
              },
              "country": {
                "type": "string",
                "description": "Country name"
              },
              "city_id": {
                "type": "number",
                "description": "City ID"
              },
              "city": {
                "type": "string",
                "description": "City name"
              },
              "timezone_name": {
                "type": "string",
                "description": "Timezone name"
              },
              "address": {
                "type": "string",
                "description": "location address"
              },
              "zip": {
                "type": "string",
                "description": "Zip code"
              },
              "social": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "telegram": {
                    "type": "string",
                    "description": "Telegram"
                  },
                  "instagram": {
                    "type": "string",
                    "description": "Instagram"
                  },
                  "vk": {
                    "type": "string",
                    "description": "VK (social network)"
                  },
                  "facebook": {
                    "type": "string",
                    "description": "Facebook"
                  },
                  "viber": {
                    "type": "string",
                    "description": "Viber"
                  },
                  "whatsapp": {
                    "type": "string",
                    "description": "WhatsApp"
                  }
                },
                "description": "location social media"
              },
              "site": {
                "type": "string",
                "description": "location website"
              },
              "coordinate_lat": {
                "type": "number",
                "description": "Latitude",
                "format": "float"
              },
              "coordinate_lon": {
                "type": "number",
                "description": "Longitude",
                "format": "float"
              },
              "description": {
                "type": "string",
                "description": "Description",
                "format": "html"
              },
              "business_type_id": {
                "type": "number",
                "description": "Business type",
                "format": "int32"
              },
              "short_descr": {
                "type": "string",
                "description": "Business category"
              },
              "phone_confirmation": {
                "type": "boolean",
                "description": "Do I need to confirm my phone number via SMS when appointment?"
              },
              "group_priority": {
                "type": "integer",
                "description": "The higher the priority, the higher the location when displayed in the list of chain locations",
                "format": "int32"
              },
              "push_notification_phone_confirm": {
                "oneOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "description": "Confirm client number to send push notifications (0/1 or boolean)"
              },
              "main_group_id": {
                "type": "number",
                "description": "Main location chain ID"
              },
              "main_group": {
                "description": "Main location chain (object or empty array)",
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Chain ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Chain name"
                      }
                    }
                  },
                  {
                    "type": "array",
                    "maxItems": 0
                  }
                ]
              },
              "access": {
                "type": "object",
                "additionalProperties": true,
                "description": "Access rights list"
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Change location",
        "example": {
          "success": true,
          "data": {
            "id": 37532,
            "title": "James Smith LLC",
            "country_id": 7,
            "country": "United States",
            "city_id": 181,
            "city": "New York",
            "timezone_name": "America/New_York",
            "address": "New York, 787 Jackson Drive",
            "zip": "11435",
            "coordinate_lat": 40.73061,
            "coordinate_lon": -73.935242,
            "short_descr": "Beauty studio",
            "social": {
              "facebook": "",
              "instagram": "instagram.com/james_smith_company/",
              "telegram": "",
              "whatsapp": "",
              "viber": ""
            },
            "site": "james-smith-company.com",
            "business_type_id": 1,
            "description": "The <strong>James Smith</strong> location",
            "phone_confirmation": true,
            "group_priority": 900,
            "push_notification_phone_confirm": 1,
            "access": {}
          },
          "meta": []
        }
      },
      "service_categories_companyid_request_data_types": {
        "title": "Root Type for service_categories_companyid_request_data_types",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Service category name"
          },
          "api_id": {
            "type": "string",
            "description": "External Category ID"
          },
          "weight": {
            "type": "number",
            "description": "Category weight (used to sort categories when displayed)"
          },
          "staff": {
            "type": "array",
            "description": "List of IDs of team members providing services from the category",
            "items": {
              "type": "number",
              "description": "team member ID"
            }
          }
        },
        "description": "Create service category",
        "example": {
          "title": "Haircut very feminine",
          "api_id": "adw322",
          "weight": 111,
          "staff": [
            5006,
            8901
          ]
        }
      },
      "service_categories_companyid_response_data_types": {
        "title": "Root Type for service_categories_companyid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Category ID"
              },
              "salon_service_id": {
                "type": "number",
                "description": "Category ID for the location on the chain"
              },
              "title": {
                "type": "string",
                "description": "name of category"
              },
              "api_id": {
                "type": "string",
                "description": "External Category ID"
              },
              "weight": {
                "type": "number",
                "description": "Category weight (used to sort categories when displayed)"
              },
              "staff": {
                "type": "array",
                "description": "List of team member IDs providing the service from the category",
                "items": {
                  "type": "number",
                  "description": "team member ID"
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create service category",
        "example": {
          "success": true,
          "data": {
            "id": 3,
            "salon_service_id": 15,
            "title": "Haircut very feminine",
            "api_id": "adw322",
            "weight": 111,
            "staff": [
              5006,
              8901
            ]
          },
          "meta": []
        }
      },
      "services_list_response": {
        "title": "Root Type for services_list_response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of services",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "salon_service_id": {
                  "type": "number",
                  "description": "Service ID for a location on the chain"
                },
                "title": {
                  "type": "string",
                  "description": "Service name"
                },
                "booking_title": {
                  "type": "string",
                  "description": "Service name for booking"
                },
                "category_id": {
                  "type": "number",
                  "description": "Identifier of the category in which the service consists"
                },
                "price_min": {
                  "type": "number",
                  "description": "Minimum price for the service",
                  "format": "float"
                },
                "price_max": {
                  "type": "number",
                  "description": "Maximum price for the service",
                  "format": "float"
                },
                "duration": {
                  "type": "number",
                  "description": "Service duration in seconds, default is 3600",
                  "format": "float"
                },
                "technical_break_duration": {
                  "oneOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Technical break duration in seconds.\n- null = use location default\n- Value in multiples of 300 (5-minute intervals)\n"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount percentage",
                  "format": "float"
                },
                "comment": {
                  "type": "string",
                  "description": "Comment on the service"
                },
                "weight": {
                  "type": "number",
                  "description": "Service weight (used to sort categories when displayed)"
                },
                "active": {
                  "type": "number",
                  "description": "1 - available for online booking, 0 - not available"
                },
                "api_id": {
                  "type": "string",
                  "description": "External Service ID"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of services response",
        "example": {
          "success": true,
          "data": [
            {
              "id": 10279685,
              "salon_service_id": 11486182,
              "title": "Service name",
              "booking_title": "Service name",
              "category_id": 10279684,
              "price_min": 0,
              "price_max": 0,
              "duration": 3600,
              "discount": 0,
              "comment": "",
              "weight": 1,
              "active": 1,
              "api_id": ""
            }
          ],
          "meta": []
        }
      },
      "services_companyid_request_data_types": {
        "title": "Root Type for services_companyid_request_data_types",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Service name"
          },
          "category_id": {
            "type": "number",
            "description": "Service Category ID"
          },
          "price_min": {
            "type": "number",
            "description": "The minimum cost of the service",
            "format": "float"
          },
          "price_max": {
            "type": "number",
            "description": "Maximum cost of the service",
            "format": "float"
          },
          "duration": {
            "type": "number",
            "description": "Service duration, default is 3600 seconds",
            "format": "float"
          },
          "technical_break_duration": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 3600
              },
              {
                "type": "null"
              }
            ],
            "description": "Technical break duration in seconds.\n- If not provided, defaults to null\n- null = use location default (Settings → Appointment Log → Technical Breaks)\n- Must be in multiples of 300 (5-minute intervals)\n- Maximum value is 3600 (1 hour)\n"
          },
          "discount": {
            "type": "number",
            "description": "Service discount",
            "format": "float"
          },
          "comment": {
            "type": "string",
            "description": "Comment on the service"
          },
          "weight": {
            "type": "number",
            "description": "Service weight (used to sort services when displayed)"
          },
          "active": {
            "type": "number",
            "description": "Is the service available for online booking? 1 - available, 0 not available."
          },
          "api_id": {
            "type": "string",
            "description": "External Service ID"
          },
          "staff": {
            "type": "array",
            "description": "team members who provide the service, along with the duration of the service for each team member",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "seance_length": {
                  "type": "number",
                  "description": "The duration of the service (in multiples of 15 minutes)"
                }
              }
            }
          }
        },
        "description": "Create a service",
        "example": {
          "title": "Men's haircut",
          "category_id": 83167,
          "price_min": 1300,
          "price_max": 1300,
          "duration": 3600,
          "discount": 0,
          "comment": "",
          "weight": 6,
          "active": 1,
          "api_id": "00000000042",
          "staff": [
            {
              "id": 5905,
              "seance_length": 2700
            },
            {
              "id": 5907,
              "seance_length": 3600
            },
            {
              "id": 8973,
              "seance_length": 3600
            },
            {
              "id": 13616,
              "seance_length": 3600
            },
            {
              "id": 16681,
              "seance_length": 3600
            },
            {
              "id": 1796,
              "seance_length": 3600
            },
            {
              "id": 34006,
              "seance_length": 3600
            }
          ]
        }
      },
      "services_companyid_response_data_types": {
        "title": "Root Type for services_companyid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "Service ID"
              },
              "salon_service_id": {
                "type": "number",
                "description": "Service ID for a location on the chain"
              },
              "title": {
                "type": "string",
                "description": "Service name"
              },
              "category_id": {
                "type": "number",
                "description": "Identifier of the category in which the service consists"
              },
              "price_min": {
                "type": "number",
                "description": "Minimum price for the service",
                "format": "float"
              },
              "price_max": {
                "type": "number",
                "description": "Maximum price for the service",
                "format": "float"
              },
              "duration": {
                "type": "number",
                "description": "Service duration, default is 3600 seconds",
                "format": "float"
              },
              "technical_break_duration": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Technical break duration in seconds.\n- null = use location default (Settings → Appointment Log → Technical Breaks)\n- Value in multiples of 300 (5-minute intervals)\n- Maximum value is 3600 (1 hour)\n"
              },
              "discount": {
                "type": "number",
                "description": "Discount",
                "format": "float"
              },
              "comment": {
                "type": "string",
                "description": "Comment on the service"
              },
              "weight": {
                "type": "number",
                "description": "Service weight (used to sort categories when displayed)"
              },
              "active": {
                "type": "number",
                "description": "1 - available for online booking, 0 - not available"
              },
              "api_id": {
                "type": "string",
                "description": "External Service ID"
              },
              "staff": {
                "type": "array",
                "description": "List of team members providing the service and session duration",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "seance_length": {
                      "type": "number",
                      "description": "Service duration (multiple of 15 minutes)"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create a service",
        "example": {
          "success": true,
          "data": {
            "id": 83169,
            "salon_service_id": 322888,
            "title": "Men's haircut",
            "category_id": 83167,
            "price_min": 1300,
            "price_max": 1300,
            "duration": 3600,
            "discount": 0,
            "comment": "",
            "weight": 6,
            "active": 1,
            "api_id": "00000000042",
            "staff": [
              {
                "id": 5905,
                "seance_length": 2700
              },
              {
                "id": 5907,
                "seance_length": 3600
              },
              {
                "id": 8973,
                "seance_length": 3600
              },
              {
                "id": 13616,
                "seance_length": 3600
              },
              {
                "id": 16681,
                "seance_length": 3600
              },
              {
                "id": 1796,
                "seance_length": 3600
              },
              {
                "id": 34006,
                "seance_length": 3600
              }
            ]
          },
          "meta": []
        }
      },
      "company_companyid_service_categories_response200_data_types": {
        "title": "Root Type for company_companyid_service_categories_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Category ID"
                },
                "salon_service_id": {
                  "type": "number",
                  "description": "Category ID for the location on the chain"
                },
                "title": {
                  "type": "string",
                  "description": "name of category"
                },
                "api_id": {
                  "type": "string",
                  "description": "External Category ID"
                },
                "weight": {
                  "type": "number",
                  "description": "Category weight (used to sort categories when displayed)"
                },
                "staff": {
                  "type": "array",
                  "description": "List of team member IDs providing the service",
                  "items": {
                    "type": "number",
                    "description": "team member ID"
                  }
                },
                "is_chain": {
                  "type": "boolean",
                  "description": "Whether category belongs to chain"
                }
              }
            }
          },
          "meta": {
            "description": "Metadata (object with total_count or empty array)",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "total_count": {
                    "type": "number",
                    "description": "Number of categories found"
                  }
                }
              },
              {
                "type": "array",
                "maxItems": 0,
                "description": "Empty array when no metadata"
              }
            ]
          }
        },
        "description": "Get a list of service categories",
        "example": {
          "success": true,
          "data": [
            {
              "id": 345,
              "salon_service_id": 353,
              "title": "Haircuts for men",
              "api_id": "adw322",
              "weight": 10,
              "staff": [
                5006,
                8901,
                26514,
                26516,
                26519,
                26520
              ]
            },
            {
              "id": 3456,
              "salon_service_id": 3252,
              "title": "Haircuts for women",
              "api_id": "adw323",
              "weight": 9,
              "staff": [
                5006,
                8901
              ]
            }
          ],
          "meta": {
            "total_count": 2
          }
        }
      },
      "company_companyid_services_serviceid_response200_data_types": {
        "title": "Root Type for company_companyid_services_serviceid_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "description": "Service data object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "Service ID"
              },
              "salon_service_id": {
                "type": "number",
                "description": "Service ID for a location on the chain"
              },
              "title": {
                "type": "string",
                "description": "Service name"
              },
              "category_id": {
                "type": "number",
                "description": "Identifier of the category in which the service consists"
              },
              "price_min": {
                "type": "number",
                "description": "Minimum price for the service",
                "format": "float"
              },
              "price_max": {
                "type": "number",
                "description": "Maximum price for the service",
                "format": "float"
              },
              "discount": {
                "type": "number",
                "description": "Discount",
                "format": "float"
              },
              "comment": {
                "type": "string",
                "description": "Comment on the service"
              },
              "weight": {
                "type": "number",
                "description": "Service weight (used to sort categories when displayed)"
              },
              "active": {
                "type": "number",
                "description": "1 - available for online booking, 0 - not available"
              },
              "api_id": {
                "type": "string",
                "description": "External Service ID"
              },
              "staff": {
                "type": "array",
                "description": "List of team members providing the service and session duration",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of services / specific service",
        "example": {
          "success": true,
          "data": {
            "id": 83169,
            "salon_service_id": 433222,
            "title": "Men's haircut",
            "category_id": 83167,
            "price_min": 1300,
            "price_max": 1300,
            "discount": 0,
            "comment": "",
            "weight": 6,
            "active": 1,
            "api_id": "00000000042",
            "staff": [
              {
                "id": 5905,
                "seance_length": 2700
              },
              {
                "id": 5907,
                "seance_length": 3600
              }
            ],
            "duration": 3600,
            "is_online": true
          },
          "meta": []
        }
      },
      "services_change_companyid_request_data_types": {
        "type": "object",
        "title": "Root Type for services_change_companyid_request_data_types",
        "required": [
          "title",
          "category_id",
          "price_min",
          "price_max",
          "duration",
          "booking_title",
          "is_multi",
          "tax_variant",
          "vat_id",
          "is_need_limit_date",
          "seance_search_start",
          "seance_search_finish",
          "step",
          "seance_search_step"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "Service name"
          },
          "booking_title": {
            "type": "string",
            "description": "Service name for appointment"
          },
          "category_id": {
            "type": "number",
            "description": "ID service category"
          },
          "price_min": {
            "type": "number",
            "description": "Minimum cost of the service",
            "format": "float"
          },
          "price_max": {
            "type": "number",
            "description": "Maximum cost of the service",
            "format": "float"
          },
          "duration": {
            "type": "number",
            "description": "Service duration, default value is 3600"
          },
          "technical_break_duration": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 3600
              },
              {
                "type": "null"
              }
            ],
            "description": "Technical break duration in seconds.\n- If not provided, defaults to null\n- null = use location default (Settings → Appointment Log → Technical Breaks)\n- Must be in multiples of 300 (5-minute intervals)\n- Maximum value is 3600 (1 hour)\n"
          },
          "discount": {
            "type": "number",
            "description": "Service discount",
            "format": "float"
          },
          "comment": {
            "type": "string",
            "description": "Comment on the service"
          },
          "is_multi": {
            "type": "boolean",
            "description": "false - Appointment, true - Event"
          },
          "tax_variant": {
            "type": "number",
            "description": "Bill ID"
          },
          "vat_id": {
            "type": "number",
            "description": "VAT ID"
          },
          "is_need_limit_date": {
            "type": "boolean",
            "description": "The service is available for a limited time"
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "description": "Service availability start date (YYYY-MM-DD)"
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "description": "Service availability end date (YYYY-MM-DD)"
          },
          "seance_search_start": {
            "type": "number",
            "description": "Start of period is the appointment available, in seconds"
          },
          "seance_search_finish": {
            "type": "number",
            "description": "End of period is the appointment available, in seconds"
          },
          "step": {
            "type": "number",
            "description": "Display interval of slots, in seconds"
          },
          "seance_search_step": {
            "type": "number",
            "description": "Search interval of slots, in seconds"
          },
          "weight": {
            "type": "number",
            "description": "Service weight (used to sort services when displayed)"
          },
          "active": {
            "type": "number",
            "description": "1 - available for online booking, 0 - not available"
          },
          "api_id": {
            "type": "string",
            "description": "External Service ID"
          },
          "staff": {
            "type": "array",
            "description": "List of team members providing the service and session duration",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "seance_length": {
                  "type": "number",
                  "description": "Service duration (multiple of 15 minutes)"
                }
              }
            }
          }
        },
        "description": "Change service",
        "example": {
          "title": "Men's haircut",
          "booking_title": "Men's haircut",
          "category_id": 83167,
          "price_min": 1300,
          "price_max": 1300,
          "duration": 3600,
          "discount": 0,
          "tax_variant": 1,
          "vat_id": 3,
          "is_multi": false,
          "is_need_limit_date": true,
          "date_from": "2022-09-19",
          "date_to": "2022-09-30",
          "seance_search_start": 36000,
          "seance_search_finish": 84600,
          "step": 300,
          "seance_search_step": 900,
          "comment": "",
          "weight": 6,
          "active": 1,
          "api_id": "00000000042",
          "staff": [
            {
              "id": 5905,
              "seance_length": 2700
            },
            {
              "id": 5907,
              "seance_length": 3600
            },
            {
              "id": 8973,
              "seance_length": 3600
            },
            {
              "id": 13616,
              "seance_length": 3600
            },
            {
              "id": 16681,
              "seance_length": 3600
            },
            {
              "id": 1796,
              "seance_length": 3600
            },
            {
              "id": 34006,
              "seance_length": 3600
            }
          ]
        }
      },
      "services_change_companyid_response_data_types": {
        "title": "Root Type for services_change_companyid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "Service name"
              },
              "booking_title": {
                "type": "string",
                "description": "Service name for appointment"
              },
              "category_id": {
                "type": "number",
                "description": "ID service category"
              },
              "price_min": {
                "type": "number",
                "description": "Minimum cost of the service",
                "format": "float"
              },
              "price_max": {
                "type": "number",
                "description": "Maximum cost of the service",
                "format": "float"
              },
              "duration": {
                "type": "number",
                "description": "Service duration, default value is 3600"
              },
              "technical_break_duration": {
                "oneOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Technical break duration in seconds.\n- null = use location default\n- Value in multiples of 300 (5-minute intervals)\n"
              },
              "discount": {
                "type": "number",
                "description": "Service discount",
                "format": "float"
              },
              "comment": {
                "type": "string",
                "description": "Comment on the service"
              },
              "is_multi": {
                "type": "boolean",
                "description": "false - Appointment, true - Event"
              },
              "tax_variant": {
                "type": "number",
                "description": "Bill ID"
              },
              "vat_id": {
                "type": "number",
                "description": "VAT ID"
              },
              "is_need_limit_date": {
                "type": "boolean",
                "description": "The service is available for a limited time"
              },
              "date_from": {
                "type": "string",
                "format": "date",
                "description": "Service availability start date (YYYY-MM-DD)"
              },
              "date_to": {
                "type": "string",
                "format": "date",
                "description": "Service availability end date (YYYY-MM-DD)"
              },
              "seance_search_start": {
                "type": "number",
                "description": "Start of period is the appointment available, in seconds"
              },
              "seance_search_finish": {
                "type": "number",
                "description": "End of period is the appointment available, in seconds"
              },
              "step": {
                "type": "number",
                "description": "Display interval of slots, in seconds"
              },
              "seance_search_step": {
                "type": "number",
                "description": "Search interval of slots, in seconds"
              },
              "weight": {
                "type": "number",
                "description": "Service weight (used to sort services when displayed)"
              },
              "active": {
                "type": "number",
                "description": "1 - available for online booking, 0 - not available"
              },
              "api_id": {
                "type": "string",
                "description": "External Service ID"
              },
              "print_title": {
                "type": "string",
                "description": "Service title for printing"
              },
              "service_type": {
                "type": "number",
                "description": "Service type"
              },
              "api_service_id": {
                "type": "number",
                "description": "External API service ID"
              },
              "repeat_visit_days_step": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Repeat visit days step"
              },
              "schedule_template_type": {
                "type": "number",
                "description": "Schedule template type"
              },
              "online_invoicing_status": {
                "type": "number",
                "description": "Online invoicing status"
              },
              "is_abonement_autopayment_enabled": {
                "type": "number",
                "description": "Is membership autopayment enabled (1/0)"
              },
              "autopayment_before_visit_time": {
                "type": "number",
                "description": "Autopayment before visit time"
              },
              "abonement_restriction_value": {
                "type": "number",
                "description": "Membership restriction value"
              },
              "is_chain": {
                "type": "boolean",
                "description": "Is chain service"
              },
              "is_price_managed_only_in_chain": {
                "type": "boolean",
                "description": "Is price managed only in chain"
              },
              "is_comment_managed_only_in_chain": {
                "type": "boolean",
                "description": "Is comment managed only in chain"
              },
              "price_prepaid_amount": {
                "type": "number",
                "description": "Prepaid amount"
              },
              "price_prepaid_percent": {
                "type": "number",
                "description": "Prepaid percent"
              },
              "id": {
                "type": "number",
                "description": "Service ID"
              },
              "salon_service_id": {
                "type": "number",
                "description": "Location service ID"
              },
              "prepaid": {
                "type": "string",
                "description": "Prepaid status (forbidden/optional/required)"
              },
              "capacity": {
                "type": "number",
                "description": "Service capacity"
              },
              "image_group": {
                "type": "array",
                "description": "Image group",
                "items": {
                  "type": "object"
                }
              },
              "dates": {
                "type": "array",
                "description": "Service dates",
                "items": {
                  "type": "object"
                }
              },
              "resources": {
                "type": "array",
                "description": "Service resources",
                "items": {
                  "type": "object"
                }
              },
              "is_online": {
                "type": "boolean",
                "description": "Is available for online booking"
              },
              "staff": {
                "type": "array",
                "description": "List of team members providing the service and session duration",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "seance_length": {
                      "type": "number",
                      "description": "Service duration (multiple of 15 minutes)"
                    },
                    "technological_card_id": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Technological card ID"
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Change service",
        "example": {
          "success": true,
          "data": {
            "title": "Men's haircut",
            "booking_title": "Men's haircut",
            "category_id": 83167,
            "price_min": 1300,
            "price_max": 1300,
            "duration": 3600,
            "discount": 0,
            "tax_variant": 1,
            "vat_id": 3,
            "is_multi": false,
            "is_need_limit_date": true,
            "date_from": "2022-09-19",
            "date_to": "2022-09-30",
            "seance_search_start": 36000,
            "seance_search_finish": 84600,
            "step": 300,
            "seance_search_step": 900,
            "comment": "",
            "weight": 6,
            "active": 1,
            "api_id": "00000000042",
            "staff": [
              {
                "id": 5905,
                "seance_length": 2700
              },
              {
                "id": 5907,
                "seance_length": 3600
              },
              {
                "id": 8973,
                "seance_length": 3600
              },
              {
                "id": 13616,
                "seance_length": 3600
              },
              {
                "id": 16681,
                "seance_length": 3600
              },
              {
                "id": 1796,
                "seance_length": 3600
              },
              {
                "id": 34006,
                "seance_length": 3600
              }
            ]
          },
          "meta": []
        }
      },
      "company_companyid_service_categories_response403_data_types": {
        "title": "Root Type for company_companyid_service_categories_response403_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "string",
            "description": "is null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message"
              }
            },
            "description": "Metadata (error message)"
          }
        },
        "description": "Getting a list of service categories",
        "example": {
          "success": false,
          "meta": {
            "message": "It is necessary to renew the license in the branch with id: {company_id}"
          }
        }
      },
      "company_companyid_service_categories_response404_data_types": {
        "title": "Root Type for company_companyid_service_categories_response403_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "string",
            "description": "is null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message"
              },
              "errors": {
                "type": "array",
                "description": "List of error messages",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Metadata (contains possible error messages)"
          }
        },
        "description": "Getting a list of service categories",
        "example": {
          "success": false,
          "meta": {
            "message": "Possible error messages",
            "errors": [
              {
                "message": "Location not specified."
              },
              {
                "message": "Location not found."
              },
              {
                "message": "Service category does not exist."
              },
              {
                "message": "Team Member not found."
              }
            ]
          }
        }
      },
      "response_success_true_object": {
        "title": "Successful response status",
        "type": "boolean",
        "description": "Response status.",
        "example": true
      },
      "master_service_link": {
        "title": "Object of model \"Service Team Member\"",
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "service_id": {
            "type": "number",
            "description": "ID of service."
          },
          "master_id": {
            "type": "number",
            "description": "ID of team member."
          },
          "length": {
            "type": "number",
            "description": "Duration of service provision by the specified team member in seconds."
          },
          "technological_card_id": {
            "type": "number",
            "description": "ID of technological card."
          },
          "api_id": {
            "type": "string",
            "description": "External API identifier."
          },
          "is_online": {
            "type": "boolean",
            "description": "Whether the service is available for online booking."
          },
          "is_offline_records_allowed": {
            "type": "boolean",
            "description": "Whether offline appointments are allowed for this service-team member link."
          },
          "price": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Custom price for this team member providing the service."
          }
        },
        "example": {
          "service_id": 123,
          "master_id": 123,
          "length": 3600,
          "technological_card_id": 123,
          "api_id": "",
          "is_online": true,
          "is_offline_records_allowed": true,
          "price": null
        }
      },
      "response_meta_validation_exception_object": {
        "title": "Request validation error message",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message.",
            "example": "An error has occurred."
          },
          "errors": {
            "type": "array",
            "description": "Set of a validation error messages.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "422_unprocessable_entity_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_false_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_validation_exception_object"
          }
        }
      },
      "service_title": {
        "title": "Root Type for ServiceTitle",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Service ID",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "Service name"
          }
        },
        "description": "Service name",
        "example": {
          "id": 123456,
          "title": "Service name"
        }
      },
      "service_category_title": {
        "title": "Root Type for ServiceCategoryTitle",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Service Category ID",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "Service category name"
          },
          "services": {
            "type": "array",
            "description": "Services in the category (on request)",
            "items": {
              "$ref": "#/components/schemas/service_title"
            }
          }
        },
        "description": "Service category name",
        "example": {
          "id": 41,
          "title": "Service category",
          "services": [
            {
              "id": 52,
              "title": "Service 1"
            },
            {
              "id": 45,
              "title": "Service 2"
            }
          ]
        }
      },
      "staff_list_response": {
        "title": "Staff List Response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of team members",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Team member ID"
                },
                "api_id": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "External API ID (for integrations)"
                },
                "name": {
                  "type": "string",
                  "description": "Team member name"
                },
                "specialization": {
                  "type": "string",
                  "description": "Team member specialization/title"
                },
                "rating": {
                  "type": "number",
                  "description": "Average rating score"
                },
                "show_rating": {
                  "type": "integer",
                  "description": "Whether to show rating (1 = show, 0 = hide)"
                },
                "user_id": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Linked user account ID"
                },
                "has_access_timetable": {
                  "type": "boolean",
                  "description": "Whether team member has access to timetable management"
                },
                "avatar": {
                  "type": "string",
                  "description": "URL to small avatar image"
                },
                "avatar_big": {
                  "type": "string",
                  "description": "URL to large avatar image"
                },
                "comments_count": {
                  "type": "integer",
                  "description": "Number of comments/reviews"
                },
                "votes_count": {
                  "type": "integer",
                  "description": "Number of rating votes"
                },
                "bookable": {
                  "type": "boolean",
                  "description": "Whether team member is available for online booking"
                },
                "image_group": {
                  "type": "array",
                  "description": "Additional images",
                  "items": {
                    "type": "object"
                  }
                },
                "information": {
                  "type": "string",
                  "description": "Additional information/bio"
                },
                "position_id": {
                  "type": "integer",
                  "description": "Position/role ID"
                },
                "schedule_till": {
                  "type": "string",
                  "format": "date",
                  "description": "Schedule available until date (YYYY-MM-DD)"
                },
                "weight": {
                  "type": "integer",
                  "description": "Sort order weight"
                },
                "fired": {
                  "type": "integer",
                  "description": "Fired status (1 = fired, 0 = active)"
                },
                "status": {
                  "type": "integer",
                  "description": "Status flag (1 = removed, 0 = active)"
                },
                "hidden": {
                  "type": "integer",
                  "description": "Hidden from online booking (1 = hidden, 0 = visible)"
                },
                "user": {
                  "type": "array",
                  "description": "Linked user data",
                  "items": {
                    "type": "object"
                  }
                },
                "prepaid": {
                  "type": "string",
                  "description": "Prepayment requirement (forbidden, allowed, required)"
                },
                "position": {
                  "description": "Position object or empty array if unassigned",
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "title": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "maxItems": 0
                    }
                  ]
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of team members for a location",
        "example": {
          "success": true,
          "data": [
            {
              "id": 2940951,
              "api_id": null,
              "name": "John Smith",
              "specialization": "Hair Stylist",
              "rating": 4.8,
              "show_rating": 1,
              "user_id": null,
              "has_access_timetable": false,
              "avatar": "https://be.cdn.alteg.io/images/no-master-sm.png",
              "avatar_big": "https://be.cdn.alteg.io/images/no-master.png",
              "comments_count": 15,
              "votes_count": 20,
              "bookable": true,
              "image_group": [],
              "information": "Senior stylist with 10 years experience",
              "position_id": 1,
              "schedule_till": "2026-12-31",
              "weight": 100,
              "fired": 0,
              "status": 0,
              "hidden": 0,
              "user": [],
              "prepaid": "forbidden",
              "position": {
                "id": 1,
                "title": "Senior Stylist"
              }
            }
          ],
          "meta": []
        }
      },
      "staff_companyid_request_data_types": {
        "title": "Root Type for staff_companyid_request_data_types",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "team member name"
          },
          "specialization": {
            "type": "string",
            "description": "team member specialization"
          },
          "weight": {
            "type": "number",
            "description": "team member weight. team members are sorted by weight on exit, heavier first"
          },
          "information": {
            "type": "string",
            "description": "team member information (HTML format)"
          },
          "api_id": {
            "type": "string",
            "description": "External team member ID"
          },
          "hidden": {
            "type": "number",
            "description": "Display status in online appointment, 1 - hidden, 0 - not hidden"
          },
          "fired": {
            "type": "number",
            "description": "the team member's dismissal status, 1 - dismissed, 0 - not dismissed"
          },
          "user_id": {
            "type": "number",
            "description": "Linked user ID, 0 - unlink user"
          },
          "has_access_timetable": {
            "type": "boolean",
            "description": "Whether the team member has access to the appointment calendar (can have working hours set).\n\nWhen `true`, the team member can be assigned schedules and appear in booking.\nWhen `false` (default for new team members), schedule-related operations will fail.\n\n**Note:** This may be limited by your subscription plan.\n",
            "example": true
          },
          "is_paid_staff": {
            "type": "boolean",
            "description": "Whether the team member is a paid staff member (optional)"
          },
          "is_included_in_payment_policy": {
            "type": "boolean",
            "description": "Whether the team member is included in the location''s active payment policy scope (optional).\n\nToggling this field requires the `payment_policy_update_access` permission; otherwise the request fails with 403.\nThe field is silently ignored when the `payment_policy` feature is disabled for the location or no active payment policy exists.\n"
          }
        },
        "description": "Add new team member",
        "example": {
          "name": "Basil",
          "specialization": "the hairdresser",
          "weight": 10,
          "information": "Trimming with three hands",
          "api_id": "42",
          "hidden": 0,
          "fired": 0,
          "user_id": 123,
          "has_access_timetable": true,
          "is_paid_staff": false,
          "is_included_in_payment_policy": true
        }
      },
      "company_companyid_staff_staffid_response_data_types": {
        "title": "Root Type for company_companyid_staff_staffid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "description": "Team member data object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "team member ID"
              },
              "name": {
                "type": "string",
                "description": "team member name"
              },
              "company_id": {
                "type": "number",
                "description": "location ID"
              },
              "specialization": {
                "type": "string",
                "description": "team member specialization"
              },
              "position": {
                "description": "Team member's position (object when assigned, null or empty array when unassigned)",
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": true,
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Job ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Job title"
                      }
                    }
                  },
                  {
                    "type": "array",
                    "maxItems": 0,
                    "description": "Empty array when no position assigned"
                  },
                  {
                    "type": "null",
                    "description": "Null when no position assigned"
                  }
                ]
              },
              "avatar": {
                "type": "string",
                "description": "Path to team member avatar file"
              },
              "avatar_big": {
                "type": "string",
                "description": "The path to the team member's avatar file in a higher resolution"
              },
              "fired": {
                "type": "number",
                "description": "Whether the team member was fired, 1 - fired, 0 - not fired"
              },
              "status": {
                "type": "number",
                "description": "Is the team member removed, 1 - removed, 0 - not removed"
              },
              "hidden": {
                "type": "number",
                "description": "Whether the team member is hidden for online appointment, 1 - hidden, 0 - not hidden"
              },
              "user_id": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "team member's linked user ID"
              },
              "is_paid_staff": {
                "type": "boolean",
                "description": "Whether the team member is a paid staff member counted in license price"
              },
              "is_included_in_payment_policy": {
                "type": "boolean",
                "description": "Whether the team member is included in the location''s active payment policy scope.\n\nAlways returned. Defaults to `true` when the `payment_policy` feature is disabled for the location or no active payment policy exists.\n"
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a List of team members / Specific team member",
        "example": {
          "success": true,
          "data": {
            "id": 1001539,
            "name": "team member 1",
            "company_id": 176275,
            "specialization": "team member",
            "position": {
              "id": 1,
              "title": "Administrator"
            },
            "avatar": "https://app.alteg.io/images/no-master-sm.png",
            "avatar_big": "https://app.alteg.io/images/no-master.png",
            "fired": 0,
            "status": 0,
            "hidden": 0,
            "user_id": 12345,
            "is_paid_staff": false,
            "is_included_in_payment_policy": true
          },
          "meta": []
        }
      },
      "company_companyid_staff_staffid_response_data_types_deprecated": {
        "title": "Root Type for company_companyid_staff_staffid_response_data_types_deprecated",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "api_id": {
                  "type": "string",
                  "description": "team member External ID"
                },
                "name": {
                  "type": "string",
                  "description": "team member name"
                },
                "specialization": {
                  "type": "string",
                  "description": "team member socialization"
                },
                "position": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Job ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Job Title"
                        }
                      }
                    },
                    {
                      "type": "array",
                      "maxItems": 0
                    }
                  ],
                  "description": "team member's position (empty array if not set)"
                },
                "show_rating": {
                  "type": "number",
                  "description": "Whether to show the team member's rating (1 - show, 0 - do not show)"
                },
                "rating": {
                  "type": "number",
                  "description": "team member Rating"
                },
                "votes_count": {
                  "type": "number",
                  "description": "Number of votes that rated a team member"
                },
                "user_id": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "team member's linked user ID"
                },
                "avatar": {
                  "type": "string",
                  "description": "Path to team member avatar file"
                },
                "avatar_big": {
                  "type": "string",
                  "description": "The path to the team member's avatar file in a higher resolution"
                },
                "comments_count": {
                  "type": "number",
                  "description": "Number of comments to the team member"
                },
                "weight": {
                  "type": "string",
                  "description": "team member weight. team members are sorted by weight on exit, heavier first"
                },
                "information": {
                  "type": "string",
                  "description": "Additional information about the team member (HTML format)"
                },
                "hidden": {
                  "type": "string",
                  "description": "team member display status in online appointment booking, 1 - hidden, 0 - not hidden"
                },
                "fired": {
                  "type": "string",
                  "description": "the team member's dismissal status, 1 - dismissed, 0 - not dismissed"
                },
                "status": {
                  "type": "string",
                  "description": "team member deletion status, 1 - deleted, 0 - not deleted"
                },
                "image_group": {
                  "oneOf": [
                    {
                      "type": "object"
                    }
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "entity": {
                      "type": "string"
                    },
                    "entity_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "images": {
                      "type": "object",
                      "properties": {
                        "sm": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "path": {
                              "type": "string"
                            },
                            "width": {
                              "type": "string"
                            },
                            "height": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "image_group_id": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "version": {
                              "type": "string"
                            }
                          }
                        },
                        "norm": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "path": {
                              "type": "string"
                            },
                            "width": {
                              "type": "string"
                            },
                            "height": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "image_group_id": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "version": {
                              "type": "string"
                            }
                          }
                        },
                        "origin": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "path": {
                              "type": "string"
                            },
                            "width": {
                              "type": "string"
                            },
                            "height": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            },
                            "image_group_id": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "version": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "description": "Group of images of a team member"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Obsolete. Get a list of team members / specific team member",
        "example": {
          "success": true,
          "data": [
            {
              "id": 17969,
              "name": "Basil",
              "specialization": "the hairdresser",
              "position": {
                "id": 1,
                "title": "Administrator"
              },
              "show_rating": 0,
              "rating": 0,
              "votes_count": 0,
              "user_id": 12345,
              "avatar": "https://app.alteg.io/uploads/masters/sm/20151018220924_4963.jpg",
              "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151018220924_4963.jpg",
              "comments_count": 0,
              "weight": "10",
              "information": "<span><span><span>&nbsp;</span></span></span>",
              "hidden": "0",
              "fired": "0",
              "status": "0",
              "image_group": {
                "id": 72250,
                "entity": "master",
                "entity_id": 26427,
                "images": {
                  "sm": {
                    "id": 186817,
                    "path": "https://app.alteg.io/uploads/masters/sm/9/90/9041171cfdabe4c_20170327202542.jpeg",
                    "width": "100",
                    "height": "100",
                    "type": "jpeg",
                    "image_group_id": 72250,
                    "version": "sm"
                  },
                  "norm": {
                    "id": 186818,
                    "path": "https://app.alteg.io/uploads/masters/norm/a/aa/aa37b29b7eb322d_20170327202542.jpeg",
                    "width": "180",
                    "height": "220",
                    "type": "jpeg",
                    "image_group_id": 72250,
                    "version": "norm"
                  },
                  "origin": {
                    "id": 186819,
                    "path": "https://app.alteg.io/uploads/masters/origin/6/65/654dbeb4ea0bbc3_20170327202542.jpeg",
                    "width": "800",
                    "height": "600",
                    "type": "jpeg",
                    "image_group_id": 72250,
                    "version": "origin"
                  }
                }
              }
            },
            {
              "id": 34006,
              "api_id": "42",
              "name": "Denis",
              "specialization": "the hairdresser",
              "position": {},
              "show_rating": 0,
              "rating": 0,
              "votes_count": 0,
              "user_id": 12345,
              "avatar": "https://app.alteg.io/uploads/masters/sm/20151116091208_4369.jpg",
              "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151116091208_4369.jpg",
              "comments_count": 0,
              "weight": "9",
              "information": "<span><span>&nbsp;</span></span>",
              "hidden": "0",
              "fired": "0",
              "status": "0",
              "image_group": {}
            },
            {
              "id": 13616,
              "name": "Alexander",
              "specialization": "the hairdresser",
              "position": {},
              "show_rating": 0,
              "rating": 4.76921,
              "votes_count": 0,
              "user_id": 12345,
              "avatar": "https://app.alteg.io/uploads/masters/sm/20251112123913_5162.jpg",
              "avatar_big": "https://app.alteg.io/uploads/masters/norm/20251112123913_5162.jpg",
              "comments_count": 26,
              "weight": "8",
              "information": "<span><span><span>&nbsp;</span></span></span>",
              "hidden": "0",
              "fired": "0",
              "status": "0",
              "image_group": {}
            }
          ],
          "meta": []
        }
      },
      "position_compact": {
        "title": "Object of model \"Position\"",
        "description": "Data for an existing position in a chain.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a position."
          },
          "title": {
            "type": "string",
            "description": "Title of a position."
          }
        },
        "example": {
          "id": 123,
          "title": "Position"
        }
      },
      "master_with_position": {
        "title": "Object of model \"Team Member with Position\"",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a team member."
          },
          "name": {
            "type": "string",
            "description": "Name of a team member."
          },
          "company_id": {
            "type": "number",
            "description": "ID of a location, where team member was created."
          },
          "specialization": {
            "type": "string",
            "description": "Specialization of a team member."
          },
          "avatar": {
            "type": "string",
            "description": "Link to the avatar of a team member (small)."
          },
          "avatar_big": {
            "type": "string",
            "description": "Link to the avatar of a team member (original)."
          },
          "position": {
            "type": [
              "object",
              "null"
            ],
            "description": "Position of a team member.",
            "allOf": [
              {
                "$ref": "#/components/schemas/position_compact"
              }
            ]
          },
          "is_paid_staff": {
            "type": "boolean",
            "description": "Whether the team member is a paid staff member counted in license price."
          }
        },
        "example": {
          "id": 123,
          "name": "John Johnson",
          "company_id": 123,
          "specialization": "Master",
          "avatar": "https://app.alteg.io/images/no-master-sm.png",
          "avatar_big": "https://app.alteg.io/images/no-master.png",
          "position": {
            "id": 123,
            "title": "Position"
          },
          "is_paid_staff": false
        }
      },
      "company_companyid_staff_staffid_response403_data_types": {
        "title": "Root Type for company_companyid_staff_staffid_response403_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (false)"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "Metadata (contains an error message)"
          }
        },
        "description": "Get a List of team members / Specific team member",
        "example": {
          "success": false,
          "meta": {
            "message": "It is necessary to renew the license in the branch with id: {company_id}"
          }
        }
      },
      "company_companyid_staff_staffid_response404_data_types": {
        "title": "Root Type for company_companyid_staff_staffid_response404_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (false)"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Metadata (contains an error message)"
          }
        },
        "description": "Get a List of team members / Specific team member",
        "example": {
          "success": false,
          "meta": {
            "message": "Possible error messages",
            "errors": [
              {
                "message": "Location not specified."
              },
              {
                "message": "Team Member not listed"
              },
              {
                "message": "Team Member with ID {staff_id} was not found in branch {company_id}."
              }
            ]
          }
        }
      },
      "staff_position": {
        "description": "Team member's position (object when assigned, null or empty array when unassigned)",
        "oneOf": [
          {
            "type": "object",
            "required": [
              "id",
              "title"
            ],
            "properties": {
              "id": {
                "type": "number",
                "description": "position id"
              },
              "title": {
                "type": "string",
                "description": "job title"
              }
            }
          },
          {
            "type": "array",
            "maxItems": 0,
            "description": "Empty array when no position assigned"
          },
          {
            "type": "null",
            "description": "Null when no position assigned"
          }
        ],
        "example": {
          "id": 123,
          "title": "Job title"
        }
      },
      "company_staff_position_list_data_type": {
        "required": [
          "data",
          "meta",
          "success"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "$ref": "#/components/schemas/staff_position"
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (contains the number of posts found)",
            "items": {
              "type": "object"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          }
        },
        "description": ""
      },
      "position": {
        "title": "Object of model \"Position\"",
        "description": "Data for an existing position in a chain.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a position."
          },
          "chain_id": {
            "type": "number",
            "description": "ID of a chain, where position was created."
          },
          "title": {
            "type": "string",
            "description": "Title of a position."
          },
          "description": {
            "type": "string",
            "description": "Description of a position."
          },
          "services_binding_type": {
            "type": "number",
            "description": "Type of binding of services to a position:  \n`0`: - binding disabled;  \n`2`: - strict binding.\n",
            "enum": [
              0,
              2
            ]
          },
          "rules_required_fields": {
            "type": "array",
            "description": "Fields required to be filled for a team member to be able to be linked to a position.",
            "items": {
              "type": "string"
            }
          },
          "only_chain_appointment": {
            "type": "boolean",
            "description": "Availability of linking a team member to a position only in a chain."
          }
        },
        "example": {
          "id": 123,
          "chain_id": 123,
          "title": "Position",
          "description": "Position description",
          "services_binding_type": 0,
          "rules_required_fields": [
            "employee_name",
            "surname",
            "middle_name",
            "date_admission",
            "date_registration_end",
            "phone_number",
            "citizenship",
            "sex",
            "identity_document",
            "tax_id",
            "number_insurance_certificates"
          ],
          "only_chain_appointment": false
        }
      },
      "clients_companyid_response_deprecated_data_types": {
        "title": "Root Type for clients_companyid_response_deprecated_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Client ID"
                },
                "name": {
                  "type": "string",
                  "description": "Client name"
                },
                "phone": {
                  "type": "string",
                  "description": "Customer phone"
                },
                "email": {
                  "type": "string",
                  "description": "Client Email"
                },
                "categories": {
                  "type": "array",
                  "description": "Client categories",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Category ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "name of category"
                      },
                      "color": {
                        "type": "string",
                        "description": "Category color"
                      }
                    }
                  }
                },
                "gender_id": {
                  "type": "number",
                  "description": "Gender identifier, 0 - unknown, 1 - male, 2 - female"
                },
                "gender": {
                  "type": "string",
                  "description": "Gender name"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount"
                },
                "importance_id": {
                  "type": "integer",
                  "description": "Client priority level (0 - none, 1 - bronze, 2 - silver, 3 - gold)"
                },
                "importance": {
                  "type": "string",
                  "description": "Client priority level name"
                },
                "card": {
                  "type": "number",
                  "description": "Client card number"
                },
                "birth_date": {
                  "type": "string",
                  "description": "Client's date of birth",
                  "format": "date"
                },
                "comment": {
                  "type": "string",
                  "description": "Customer comment"
                },
                "sms_check": {
                  "type": "number",
                  "description": "1 - Happy Birthday by SMS, 0 - do not congratulate"
                },
                "sms_not": {
                  "type": "number",
                  "description": "1 - Exclude the client from SMS mailings, 0 - do not exclude"
                },
                "spent": {
                  "type": "number",
                  "description": "How much money spent in the location at the time of adding"
                },
                "balance": {
                  "type": "number",
                  "description": "Client balance"
                },
                "visits": {
                  "type": "number",
                  "description": "Number of visits"
                },
                "last_change_date": {
                  "type": "string",
                  "description": "Last modified date",
                  "format": "date-time"
                },
                "custom_fields": {
                  "type": "object",
                  "properties": {},
                  "description": "Additional client fields"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "format": "int32"
              },
              "total_count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the page number and number of clients per page)"
          }
        },
        "description": "Obsolete. Get a list of clients",
        "example": {
          "success": true,
          "data": [
            {
              "id": 66,
              "name": "Customer",
              "phone": 13155550177,
              "email": "asdfgh@g.com",
              "categories": [
                {
                  "id": 3,
                  "title": "Black list",
                  "color": "#0f0f0f"
                },
                {
                  "id": 4,
                  "title": "VIP",
                  "color": "#e8d313"
                }
              ],
              "gender_id": 0,
              "gender": "unknown",
              "discount": 10,
              "importance_id": 3,
              "importance": "Gold",
              "card": 123456789,
              "birth_date": "2026-09-21",
              "comment": "test",
              "sms_check": 1,
              "sms_not": 0,
              "spent": 71842,
              "balance": 0,
              "visits": 34,
              "last_change_date": "2026-02-01T12:00:00-0500",
              "custom_fields": {}
            },
            {
              "id": 16,
              "name": "James",
              "phone": 13155550178,
              "email": "",
              "categories": {},
              "gender_id": 0,
              "gender": "unknown",
              "discount": 0,
              "importance_id": 0,
              "importance": "No importance class",
              "card": "",
              "birth_date": null,
              "comment": "",
              "sms_check": 0,
              "sms_not": 0,
              "spent": 0,
              "balance": 0,
              "visits": 3,
              "last_change_date": "2026-04-01T12:00:00-0500",
              "custom_fields": {}
            }
          ],
          "meta": {
            "page": 1,
            "total_count": 8
          }
        }
      },
      "company_companyid_clients_search_request_data_types": {
        "title": "Root Type for company_cpmpanuid_clients_search_request_data_types",
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Page number"
          },
          "page_size": {
            "type": "number",
            "description": "The number of output lines per page. Maximum 200. (Default 25)"
          },
          "fields": {
            "type": "array",
            "description": "Fields to be returned in the response",
            "items": {
              "type": "string"
            }
          },
          "order_by": {
            "type": "string",
            "description": "What field to sort by",
            "enum": [
              "id",
              "name",
              "phone",
              "email",
              "discount",
              "first_visit_date",
              "last_visit_date",
              "sold_amount",
              "visit_count"
            ]
          },
          "order_by_direction": {
            "type": "string",
            "description": "How to sort (ascending / descending)",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          "operation": {
            "type": "string",
            "description": "Type of transaction",
            "enum": [
              "AND",
              "OR"
            ]
          },
          "filters": {
            "type": "array",
            "description": "Filters for searching by customers",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "state": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    }
                  },
                  "description": "Filter type"
                }
              }
            }
          }
        },
        "description": "Get a list of clients",
        "example": {
          "page": 1,
          "page_size": 3,
          "fields": [
            "id",
            "name"
          ],
          "order_by": "name",
          "order_by_direction": "desc",
          "operation": "AND",
          "filters": [
            {
              "type": "id",
              "state": {
                "value": [
                  1,
                  2,
                  3
                ]
              }
            },
            {
              "type": "sold_amount",
              "state": {
                "from": 0,
                "to": 100.77
              }
            },
            {
              "type": "quick_search",
              "state": {
                "value": "James Smith"
              }
            },
            {
              "type": "importance",
              "state": {
                "value": [
                  0,
                  1,
                  2,
                  3
                ]
              }
            },
            {
              "type": "has_mobile_app",
              "state": {
                "value": true
              }
            },
            {
              "type": "category",
              "state": {
                "value": [
                  1,
                  7
                ]
              }
            },
            {
              "type": "has_passteam_card",
              "state": {
                "value": true
              }
            },
            {
              "type": "passteam_card_ids",
              "state": {
                "value": [
                  "111122223333aaaabbbbcccc"
                ]
              }
            },
            {
              "type": "birthday",
              "state": {
                "from": "1990-01-01 00:00:00",
                "to": "2000-01-01 23:59:59"
              }
            },
            {
              "type": "gender",
              "state": {
                "value": [
                  0,
                  1,
                  2
                ]
              }
            },
            {
              "type": "record",
              "state": {
                "staff": {
                  "value": [
                    1,
                    2
                  ]
                },
                "service": {
                  "value": [
                    2,
                    3
                  ]
                },
                "service_category": {
                  "value": [
                    4,
                    5
                  ]
                },
                "status": {
                  "value": [
                    1
                  ]
                },
                "created": {
                  "from": "2026-01-01 00:00:00",
                  "to": "2026-01-01 23:59:59"
                },
                "records_count": {
                  "from": 1,
                  "to": 99999
                },
                "sold_amount": {
                  "from": 1.001,
                  "to": 99999.09
                }
              }
            },
            {
              "type": "client",
              "state": {
                "id": {
                  "value": [
                    1,
                    2,
                    3
                  ]
                },
                "birthday": {
                  "from": "1990-01-01 00:00:00",
                  "to": "2000-01-01 23:59:59"
                }
              }
            },
            {
              "type": "sale",
              "state": {
                "abonement_balance": {
                  "from": 2,
                  "to": 3
                }
              }
            }
          ]
        }
      },
      "company_companyid_clients_search_response_data_types": {
        "title": "Root Type for company_companyid_clients_search_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Client name"
                },
                "id": {
                  "type": "number",
                  "description": "Client ID"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "total_count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of clients found)"
          }
        },
        "description": "Get a list of clients",
        "example": {
          "success": true,
          "data": [
            {
              "name": "James Smith",
              "id": 2
            },
            {
              "name": "Taylor Reed",
              "id": 3
            },
            {
              "name": "James Smith",
              "id": 1
            }
          ],
          "meta": {
            "total_count": 908
          }
        }
      },
      "company_companyid_clients_search_response400_data_types": {
        "title": "Root Type for company_companyid_clients_search_response400_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (false)"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "object",
                "properties": {
                  "filters": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Metadata (contains an error message)"
          }
        },
        "description": "Get a list of clients",
        "example": {
          "success": false,
          "meta": {
            "message": "Invalid filter value",
            "errors": {
              "filters": [
                "Invalid filter state value"
              ]
            }
          }
        }
      },
      "company_companyid_clients_search_response402_data_types": {
        "title": "Root Type for company_companyid_clients_search_response402_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (false)"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "Metadata (contains an error message)"
          }
        },
        "description": "Get a list of clients",
        "example": {
          "success": false,
          "meta": {
            "message": "It is necessary to renew the license in the branch with id: {company_id}"
          }
        }
      },
      "company_companyid_clients_search_response404_data_types": {
        "title": "Root Type for company_companyid_clients_search_response404_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (false)"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Metadata (contains an error message)"
          }
        },
        "description": "Get a list of clients",
        "example": {
          "success": false,
          "meta": {
            "message": "Possible error messages",
            "errors": [
              {
                "message": "Location not specified."
              },
              {
                "filters": [
                  "Invalid filter state value"
                ]
              }
            ]
          }
        }
      },
      "client_comment_file_dto": {
        "title": "Object of model \"File in a client details\"",
        "description": "Data for an existing file in a client details.",
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "description": "Download link for a file in a client details."
          },
          "filename": {
            "type": "string",
            "description": "Original filename for a file in a client details."
          }
        },
        "example": {
          "link": "https://api.alteg.io/client_files/download/123/123/",
          "filename": "file.pdf"
        }
      },
      "user_name_avatar": {
        "title": "Object of model \"User with name and avatar\"",
        "description": "Data for an existing user.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a user."
          },
          "name": {
            "type": "string",
            "description": "Name of a user."
          },
          "avatar": {
            "type": "string",
            "description": "Avatar of a user."
          }
        },
        "example": {
          "id": 123,
          "name": "John Johnson",
          "avatar": "https://api.alteg.io/images/avatar.png"
        }
      },
      "client_comment_container": {
        "title": "Object of model \"Comment for a client\"",
        "description": "Data for an existing comment for a client.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a comment for a client."
          },
          "create_date": {
            "type": "string",
            "description": "Datetime of a comment for a client created.",
            "format": "date-time"
          },
          "update_date": {
            "type": "string",
            "description": "Datetime of a comment for a client last updated.",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "description": "Type of a comment for a client:  \n`default`: - text comment;  \n`file`: - uploaded file.\n",
            "enum": [
              "default",
              "file"
            ]
          },
          "text": {
            "type": "string",
            "description": "Text of a comment for a client (`type` = \"default\", for `type` = \"file\" the text is returned empty)."
          },
          "files": {
            "type": "array",
            "description": "Files in a client details that triggered the comment creation (`type` = \"file\", for `type` = \"default\" the files array is returned empty).",
            "items": {
              "$ref": "#/components/schemas/client_comment_file_dto"
            }
          },
          "user": {
            "type": [
              "object",
              "null"
            ],
            "description": "User created a comment for a client or uploaded files in a client details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/user_name_avatar"
              }
            ]
          }
        },
        "example": {
          "id": 123,
          "create_date": "2026-01-01T12:12:12-05:00",
          "update_date": "2026-01-01T12:12:12-05:00",
          "type": "default",
          "text": "Comment for a client",
          "files": [],
          "user": {
            "id": 123,
            "name": "John Johnson",
            "avatar": "https://api.alteg.io/images/avatar.png"
          }
        }
      },
      "response_meta_count_object": {
        "title": "Meta object with response results count",
        "type": "object",
        "description": "Additional response data.",
        "properties": {
          "count": {
            "type": "number",
            "description": "Response data objects count.",
            "example": 10
          }
        }
      },
      "clients_files_clientid_reaponse_data_types": {
        "title": "Root Type for clients_files_clientid_reaponse_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "File ID"
                },
                "client_id": {
                  "type": "number",
                  "description": "Client ID"
                },
                "name": {
                  "type": "string",
                  "description": "File name with extension"
                },
                "description": {
                  "type": "string",
                  "description": "File Description"
                },
                "date_create": {
                  "type": "string",
                  "description": "File upload date in ISO8601 format",
                  "format": "date-time"
                },
                "extension": {
                  "type": "string",
                  "description": "File name extension"
                },
                "mime": {
                  "type": "string",
                  "description": "MIME file type"
                },
                "link": {
                  "type": "string",
                  "description": "File download link"
                },
                "user_name": {
                  "type": "string",
                  "description": "The name of the user who uploaded the file"
                },
                "user_avatar": {
                  "type": "string",
                  "description": "Avatar of the user who uploaded the file"
                },
                "size": {
                  "type": "string",
                  "description": "Formatted file size string"
                },
                "can_edit": {
                  "type": "boolean",
                  "description": "Is there a right to change and delete the file? true - there is a right, false - there is no right"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of files)"
          }
        },
        "description": "Sample Request to Get a List of Client Files",
        "example": {
          "success": true,
          "data": [
            {
              "id": 123,
              "client_id": 123456,
              "name": "test.txt",
              "description": "",
              "date_create": "2026-01-01T12:00:00-0500",
              "extension": "txt",
              "mime": "text/plain",
              "link": "/client_files/download/456/123/",
              "user_name": "Victor Sitnikov",
              "user_avatar": "/images/no-master.png",
              "size": "9 B",
              "can_edit": false
            },
            {
              "id": 789,
              "client_id": 123456,
              "name": "photo.jpg",
              "description": "",
              "date_create": "2026-01-30T12:30:00-0500",
              "extension": "jpg",
              "mime": "image/jpeg",
              "link": "/client_files/download/456/789/",
              "user_name": "Victor Sitnikov",
              "user_avatar": "/images/no-master.png",
              "size": "96.65 KB",
              "can_edit": true
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "client_visits_history_goods_transaction_good": {
        "title": "The object of the model \"Sold product in the history of customer visits\"",
        "description": "Data of the product sold.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Product ID."
          },
          "title": {
            "type": "string",
            "description": "Name of product."
          },
          "amount": {
            "type": "number",
            "description": "Number of products sold."
          },
          "unit": {
            "type": "string",
            "description": "Unit of measure for the product sold."
          },
          "cost_per_unit": {
            "type": "number",
            "description": "Unit price without discount."
          },
          "first_cost": {
            "type": "number",
            "description": "Price of the whole product without discount."
          },
          "discount_percent": {
            "type": "number",
            "description": "Percent discount."
          },
          "cost_to_pay": {
            "type": "number",
            "description": "Price of the product including the discount."
          },
          "paid_sum": {
            "type": "number",
            "description": "Price of the product including the discount."
          },
          "payment_status": {
            "type": "string",
            "description": "Visit payment status:  \n  `not_paid` - the visit is not paid, no payments were made for the visit;  \n  `paid_not_full` - the visit is partially paid;  \n  `paid_full` - the visit is paid in full, there is no overpayment;  \n  `paid_over` - there is an overpayment for the visit.\n",
            "enum": [
              "not_paid",
              "paid_not_full",
              "paid_full",
              "paid_over"
            ]
          }
        },
        "example": {
          "id": 123,
          "title": "My product",
          "amount": -1,
          "unit": "PCS.",
          "cost_per_unit": 1000,
          "first_cost": -1000,
          "discount_percent": 0,
          "cost_to_pay": 1000,
          "paid_sum": 1000,
          "payment_status": "paid_full"
        }
      },
      "company_minimal": {
        "title": "Model object \"Location, minimum information\"",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of the location location."
          },
          "title": {
            "type": "string",
            "description": "Name of location."
          }
        },
        "example": {
          "id": 123,
          "title": "My branch office."
        }
      },
      "client_visits_history_goods_transaction": {
        "title": "The object of the model \"Sale of goods in the history of visits to the client\"",
        "description": "Product sales data.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Identifier of the transaction for the sale of products."
          },
          "comment": {
            "type": "string",
            "description": "A comment."
          },
          "date": {
            "type": "string",
            "description": "Date of sale.",
            "format": "date-time"
          },
          "visit_id": {
            "type": "number",
            "description": "Visit ID. Equals `0` if there is no connection to the visit."
          },
          "record_id": {
            "type": "number",
            "description": "Appointment ID. Equals `0` if there is no link to the appointment."
          },
          "goods": {
            "type": "array",
            "description": "List of products sold.",
            "items": {
              "$ref": "#/components/schemas/client_visits_history_goods_transaction_good"
            }
          },
          "staff": {
            "type": "object",
            "description": "team member who sold the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/master_with_position"
              }
            ]
          },
          "company": {
            "type": "object",
            "description": "Minimum information about the store where the product was sold.",
            "allOf": [
              {
                "$ref": "#/components/schemas/company_minimal"
              }
            ]
          }
        },
        "example": {
          "id": 123,
          "comment": "Comment to the sale of products",
          "date": "2026-01-31T12:34:56-05:00",
          "visit_id": 0,
          "record_id": 0,
          "goods": [
            {
              "id": 123,
              "title": "My product",
              "amount": -1,
              "unit": "PCS.",
              "cost_per_unit": 1000,
              "first_cost": -1000,
              "discount_percent": 0,
              "cost_to_pay": 1000,
              "paid_sum": 1000,
              "payment_status": "paid_full"
            }
          ],
          "staff": {
            "id": 123,
            "name": "James Smith",
            "company_id": 123,
            "specialization": "Master",
            "avatar": "https://app.alteg.io/images/no-master-sm.png",
            "avatar_big": "https://app.alteg.io/images/no-master.png",
            "position": {
              "id": 123,
              "title": "team member"
            }
          },
          "company": {
            "id": 123,
            "title": "My branch office."
          }
        }
      },
      "client_visits_history_record_service_consumable": {
        "title": "Model object \"Consumable in service\"",
        "description": "Consumable data.",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Consumable name."
          },
          "amount": {
            "type": "number",
            "description": "Quantity of the item in the unit of measure selected by the user."
          },
          "cost_per_unit": {
            "type": "number",
            "description": "Cost per item."
          },
          "unit": {
            "type": "string",
            "description": "Name of the item`s unit of measurement."
          }
        },
        "example": {
          "title": "My consumable",
          "amount": 1,
          "cost_per_unit": 1000,
          "unit": "PCS."
        }
      },
      "client_visits_history_record_service": {
        "title": "Model object \"Service in customer`s history appointment\"",
        "description": "Service data.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Service identifier."
          },
          "title": {
            "type": "string",
            "description": "Name of service."
          },
          "first_cost": {
            "type": "number",
            "description": "Price of service without discount."
          },
          "discount_percent": {
            "type": "number",
            "description": "Percent discount."
          },
          "cost_to_pay": {
            "type": "number",
            "description": "The cost of the service including the discount."
          },
          "paid_sum": {
            "type": "number",
            "description": "The amount that was paid by the customer."
          },
          "payment_status": {
            "type": "string",
            "description": "Visit payment status:  \n  `not_paid` - the visit is not paid, no payments were made for the visit;  \n  `paid_not_full` - the visit is partially paid;  \n  `paid_full` - the visit is paid in full, there is no overpayment;  \n  `paid_over` - there is an overpayment for the visit.\n",
            "enum": [
              "not_paid",
              "paid_not_full",
              "paid_full",
              "paid_over"
            ]
          },
          "consumables": {
            "type": "array",
            "description": "Product consumables attached to this service.",
            "items": {
              "$ref": "#/components/schemas/client_visits_history_record_service_consumable"
            }
          }
        },
        "example": {
          "id": 123,
          "title": "My service",
          "first_cost": 1000,
          "discount_percent": 0,
          "cost_to_pay": 1000,
          "paid_sum": 1000,
          "payment_status": "paid_full",
          "consumables": [
            {
              "title": "My consumable",
              "amount": 1,
              "cost_per_unit": 1000,
              "unit": "PCS."
            }
          ]
        }
      },
      "tips_reduce": {
        "title": "Model object \"Presence of tip without amount\"",
        "type": "object",
        "description": "Information about the availability of tips to the team member. The model is used when the current user is not the team member of the appointment.",
        "properties": {
          "has_tips": {
            "type": "boolean",
            "description": "Is there a tip in this appointment."
          },
          "sum": {
            "type": [
              "number",
              "null"
            ],
            "description": "The tip amount is not counted and is `null`."
          }
        },
        "example": {
          "has_tips": false,
          "sum": null
        }
      },
      "tips_reduce_with_full_info": {
        "title": "Total tip model object",
        "type": "object",
        "description": "Information about the amount of all tips to the team member. Used if the current user is the team member of this appointment.",
        "properties": {
          "has_tips": {
            "type": "boolean",
            "description": "Is there a tip in this appointment."
          },
          "sum": {
            "type": [
              "number",
              "null"
            ],
            "description": "Amount of tip."
          }
        },
        "example": {
          "has_tips": false,
          "sum": 1000
        }
      },
      "comer": {
        "title": "Visitor model object",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Visitor ID."
          },
          "title": {
            "type": "string",
            "description": "Visitor name."
          },
          "slug": {
            "type": "string",
            "description": "visitor type:  \n  `person` - person;  \n  `pet` - pet;  \n  `vehicle` - a vehicle.\n",
            "enum": [
              "person",
              "pet",
              "vehicle"
            ]
          }
        },
        "example": {
          "id": 123,
          "title": "James Smith",
          "slug": "person"
        }
      },
      "client_visits_history_record": {
        "title": "The object of the model \"Appointment in the history of visits to the client\"",
        "description": "Client appointment data.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Appointment ID."
          },
          "comment": {
            "type": "string",
            "description": "A comment."
          },
          "date": {
            "type": "string",
            "description": "Date of appointment.",
            "format": "date-time"
          },
          "visit_id": {
            "type": "number",
            "description": "Visit ID."
          },
          "attendance": {
            "type": "number",
            "description": "Appointment status in visit"
          },
          "services": {
            "type": "array",
            "description": "Services in appointment.",
            "items": {
              "$ref": "#/components/schemas/client_visits_history_record_service"
            }
          },
          "staff": {
            "type": "object",
            "description": "team member who provided the service.",
            "allOf": [
              {
                "$ref": "#/components/schemas/master_with_position"
              }
            ]
          },
          "company": {
            "type": "object",
            "description": "Minimum information about the store where the item was sold.",
            "allOf": [
              {
                "$ref": "#/components/schemas/company_minimal"
              }
            ]
          },
          "tips": {
            "type": "object",
            "description": "Tipping data. Different models are used depending on whether the current user is the team member in the appointment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/tips_reduce"
              },
              {
                "$ref": "#/components/schemas/tips_reduce_with_full_info"
              }
            ]
          },
          "comer": {
            "type": "object",
            "description": "Visitor data. If the visitor is not specified, then the field is not displayed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/comer"
              }
            ]
          }
        },
        "example": {
          "id": 123,
          "comment": "Comment to post",
          "date": "2026-01-31T12:34:56-05:00",
          "visit_id": 123,
          "attendance": 1,
          "services": [
            {
              "id": 123,
              "title": "My service",
              "first_cost": 1000,
              "discount_percent": 0,
              "cost_to_pay": 1000,
              "paid_sum": 1000,
              "payment_status": "paid_full",
              "consumables": [
                {
                  "title": "My consumable",
                  "amount": 1,
                  "cost_per_unit": 1000,
                  "unit": "PCS."
                }
              ]
            }
          ],
          "staff": {
            "id": 123,
            "name": "James Smith",
            "company_id": 123,
            "specialization": "Master",
            "avatar": "https://app.alteg.io/images/no-master-sm.png",
            "avatar_big": "https://app.alteg.io/images/no-master.png",
            "position": {
              "id": 123,
              "title": "team member"
            }
          },
          "company": {
            "id": 123,
            "title": "My branch office."
          },
          "tips": {
            "has_tips": false,
            "sum": null
          },
          "comer": {
            "id": 123,
            "title": "James Smith",
            "slug": "person"
          }
        }
      },
      "client_visits_history": {
        "title": "Customer History Model Object",
        "description": "Data on customer visits, including appointments and product sales.",
        "type": "object",
        "properties": {
          "goods_transactions": {
            "type": "array",
            "description": "List of product sales transactions.",
            "items": {
              "$ref": "#/components/schemas/client_visits_history_goods_transaction"
            }
          },
          "records": {
            "type": "array",
            "description": "List of customer appointments.",
            "items": {
              "$ref": "#/components/schemas/client_visits_history_record"
            }
          }
        },
        "example": {
          "goods_transactions": [
            {
              "id": 123,
              "comment": "Comment to the sale of goods",
              "date": "2026-01-31T12:34:56-05:00",
              "visit_id": 0,
              "record_id": 0,
              "goods": [
                {
                  "id": 123,
                  "title": "My product",
                  "amount": -1,
                  "unit": "PCS.",
                  "cost_per_unit": 1000,
                  "first_cost": -1000,
                  "discount_percent": 0,
                  "cost_to_pay": 1000,
                  "paid_sum": 1000,
                  "payment_status": "paid_full"
                }
              ],
              "staff": {
                "id": 123,
                "name": "James Smith",
                "company_id": 123,
                "specialization": "Master",
                "avatar": "https://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "https://app.alteg.io/images/no-master.png",
                "position": {
                  "id": 123,
                  "title": "team member"
                }
              },
              "company": {
                "id": 123,
                "title": "My branch office."
              }
            }
          ],
          "records": [
            {
              "id": 123,
              "comment": "Comment to post",
              "date": "2026-01-31T12:34:56-05:00",
              "visit_id": 123,
              "attendance": 1,
              "services": [
                {
                  "id": 123,
                  "title": "My service",
                  "first_cost": 1000,
                  "discount_percent": 0,
                  "cost_to_pay": 1000,
                  "paid_sum": 1000,
                  "payment_status": "paid_full",
                  "consumables": [
                    {
                      "title": "My consumable",
                      "amount": 1,
                      "cost_per_unit": 1000,
                      "unit": "PCS."
                    }
                  ]
                }
              ],
              "staff": {
                "id": 123,
                "name": "James Smith",
                "company_id": 123,
                "specialization": "Master",
                "avatar": "https://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "https://app.alteg.io/images/no-master.png",
                "position": {
                  "id": 123,
                  "title": "team member"
                }
              },
              "company": {
                "id": 123,
                "title": "My branch office."
              },
              "tips": {
                "has_tips": false,
                "sum": null
              },
              "comer": {
                "id": 123,
                "title": "James Smith",
                "slug": "person"
              }
            }
          ]
        }
      },
      "response_meta_date_paginator_object": {
        "title": "An object of date-based pagination information.",
        "description": "Page navigation information containing information about the current, next, and previous pages.\nThe data is sorted and paginated by date in descending order.\n",
        "type": "object",
        "properties": {
          "dateCursor": {
            "type": "object",
            "description": "Pagination information.",
            "properties": {
              "previous": {
                "type": "object",
                "description": "Information about the previous page.",
                "properties": {
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Up to which date, inclusive, the data on the previous page is filtered.",
                    "format": "date"
                  },
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "From what date the data on the previous page is filtered.",
                    "format": "date"
                  },
                  "count": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Number of items on the previous page."
                  }
                }
              },
              "current": {
                "type": "object",
                "description": "Information about the current page.",
                "properties": {
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Up to which date, inclusive, the data on the current page is filtered.",
                    "format": "date"
                  },
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "From what date the data on the current page is filtered.",
                    "format": "date"
                  },
                  "count": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Number of items on the current page."
                  }
                }
              },
              "next": {
                "type": "object",
                "description": "Information about the previous page.",
                "properties": {
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Up to which date, inclusive, the data on the next page is filtered.",
                    "format": "date"
                  },
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "From what date the data on the next page is filtered.",
                    "format": "date"
                  },
                  "count": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Number of items on the next page."
                  }
                }
              }
            }
          }
        },
        "example": {
          "dateCursor": {
            "previous": {
              "to": "2022-01-31",
              "from": "2022-01-20",
              "count": 7
            },
            "current": {
              "to": "2022-01-19",
              "from": "2022-01-15",
              "count": 25
            },
            "next": {
              "to": "2022-01-14",
              "from": "2022-01-05",
              "count": 25
            }
          }
        }
      },
      "company_company_id_users_response_data_types": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Response status."
          },
          "data": {
            "type": "array",
            "description": "Response data.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "User ID"
                },
                "name": {
                  "type": "string",
                  "description": "User name"
                },
                "phone": {
                  "type": "string",
                  "description": "User phone"
                },
                "email": {
                  "type": "string",
                  "description": "User email"
                },
                "information": {
                  "type": "string",
                  "description": "User information"
                },
                "is_approved": {
                  "type": "boolean",
                  "description": "Whether the user accepted the invitation to manage the location"
                },
                "is_non_deletable": {
                  "type": "boolean",
                  "description": "Whether the user is non-deletable"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "number",
                "description": "Number of users found"
              }
            },
            "description": "Additional response data."
          }
        },
        "description": "Get location users",
        "example": {
          "success": true,
          "data": [
            {
              "id": 10,
              "name": "Bob",
              "phone": "+13155550184",
              "email": "test@gmail.com",
              "information": "manager",
              "is_approved": false,
              "is_non_deletable": false
            },
            {
              "id": 11,
              "name": "Oliver",
              "phone": "+13155550185",
              "email": "test@gmail.com",
              "information": "Administrator",
              "is_approved": true,
              "is_non_deletable": true
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "company_users_deprecated_response_data_types": {
        "title": "Root Type for company_users_deprecated_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "User ID"
                },
                "firstname": {
                  "type": "string",
                  "description": "Username"
                },
                "login": {
                  "type": "string",
                  "description": "user login for authorization in the system (for authorization, you can also use the phone and email fields as a login)"
                },
                "email": {
                  "type": "string",
                  "description": "User mailing address"
                },
                "phone": {
                  "type": "string",
                  "description": "User phone"
                },
                "information": {
                  "type": "string",
                  "description": "User information"
                },
                "access": {
                  "type": "object",
                  "properties": {
                    "stat_access": {
                      "type": "boolean",
                      "description": "true - there is access to analytics, false - no access"
                    },
                    "schedule_edit_access": {
                      "type": "boolean",
                      "description": "true - there is access to the team member's work schedule in the log, false - no access"
                    },
                    "client_phones_access": {
                      "type": "boolean",
                      "description": "true - there is access to phone numbers in the list of clients, false - no access"
                    },
                    "clients_access": {
                      "type": "boolean",
                      "description": "true - there is access to the client base, false - no access"
                    },
                    "settings_access": {
                      "type": "boolean",
                      "description": "true - there is access to the settings section, false - no access"
                    },
                    "edit_records_access": {
                      "type": "boolean",
                      "description": "true - there is access to change records, false - no access"
                    },
                    "timetable_access": {
                      "type": "boolean",
                      "description": "true - there is access to the appointment log, false - no access"
                    },
                    "billing_access": {
                      "type": "boolean",
                      "description": "true - there is access to billing (balance menu section), false - no access"
                    },
                    "users_access": {
                      "type": "boolean",
                      "description": "true - there is access to user management, false - no access"
                    },
                    "excel_access": {
                      "type": "boolean",
                      "description": "1 - there is access to unloading the list of clients in Excel, 0 - no access"
                    },
                    "finances_access": {
                      "type": "boolean",
                      "description": "true - there is access to finances, false - no access"
                    },
                    "storages_access": {
                      "type": "boolean",
                      "description": "true - there is access to the inventory, false - no access"
                    },
                    "send_sms": {
                      "type": "boolean",
                      "description": "true - there is access to SMS distribution to clients, false - no access"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "0 - if the user can view the schedule and records of all team members, otherwise only the team member whose ID is specified"
                    }
                  },
                  "description": "Object of user access rights to system modules"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get location users",
        "example": {
          "success": true,
          "data": [
            {
              "id": 224348,
              "firstname": "James",
              "login": "j.smith",
              "email": "j.smith@example.com",
              "phone": "+13155550175",
              "information": "Test user",
              "access": {
                "stat_access": true,
                "schedule_edit_access": false,
                "client_phones_access": false,
                "clients_access": false,
                "settings_access": false,
                "edit_records_access": false,
                "timetable_access": true,
                "billing_access": false,
                "users_access": false,
                "excel_access": false,
                "finances_access": false,
                "storages_access": false,
                "send_sms": true,
                "master_id": 0
              }
            },
            {
              "id": 11,
              "firstname": "James",
              "login": "j.smith",
              "email": "j.smith@example.com",
              "phone": "+13155550175",
              "information": "Test user",
              "access": {
                "stat_access": true,
                "schedule_edit_access": true,
                "client_phones_access": true,
                "clients_access": true,
                "settings_access": true,
                "edit_records_access": true,
                "timetable_access": true,
                "billing_access": true,
                "users_access": false,
                "excel_access": true,
                "finances_access": true,
                "storages_access": true,
                "send_sms": true,
                "master_id": 0
              }
            }
          ],
          "meta": []
        }
      },
      "user_permissions_response_data_types": {
        "title": "Root Type for user_permissions_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "timetable": {
                "type": "object",
                "properties": {
                  "timetable_access": {
                    "type": "boolean",
                    "description": "true - there is access to the appointment log, false - no access"
                  },
                  "master_id": {
                    "type": "number",
                    "description": "0 - if the user can view the schedule and records of all team members, otherwise only the team member whose ID is specified"
                  },
                  "position_id": {
                    "type": "number",
                    "description": "0 - if the user can view the schedule and records of all team members, otherwise only the position whose ID is specified"
                  },
                  "last_days_count": {
                    "type": "number",
                    "description": "0 - do not restrict access to schedule history and records"
                  },
                  "schedule_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to the team member's work schedule in the log, false - no access"
                  },
                  "timetable_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to the phone number in the appointment log, false - no access"
                  },
                  "timetable_transferring_record_access": {
                    "type": "boolean",
                    "description": "true - there is access to transferring records, false - no access"
                  },
                  "timetable_statistics_access": {
                    "type": "boolean",
                    "description": "true - there is access to view statistics, false - no access"
                  },
                  "timetable_waiting_list_access": {
                    "type": "boolean",
                    "description": "true - there is access to waiting list, false - no access"
                  }
                },
                "description": "Appointment log"
              },
              "record_form": {
                "type": "object",
                "properties": {
                  "record_form_access": {
                    "type": "boolean",
                    "description": "true - there is access to the appointment form, false - no access"
                  },
                  "record_form_client_access": {
                    "type": "boolean",
                    "description": "true - there is access to customer data, false - no access"
                  },
                  "records_autocomplete_access": {
                    "type": "boolean",
                    "description": "true - there is access to the drop-down list with customer data, false - no access"
                  },
                  "create_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to create appointments, false - no access to Create appointments"
                  },
                  "edit_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to change records, false - no access"
                  },
                  "edit_records_attendance_access": {
                    "type": "boolean",
                    "description": "true - there is access to records with visit status \"customer arrived\", false - no access"
                  },
                  "records_services_cost_access": {
                    "type": "boolean",
                    "description": "true - there is access to change the cost of services, false - no access"
                  },
                  "records_services_discount_access": {
                    "type": "boolean",
                    "description": "true - there is access to change discounts for services, false - no access"
                  },
                  "record_edit_full_paid_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit the paid post, false - no access"
                  },
                  "delete_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete the appointment, false - no access"
                  },
                  "delete_customer_came_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete records with the \"client has arrived\" status, false - no access"
                  },
                  "delete_paid_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete paid appointments, false - no access"
                  },
                  "records_goods_access": {
                    "type": "boolean",
                    "description": "true - there is access to product sales, false - no access"
                  },
                  "records_goods_create_transaction_access": {
                    "type": "boolean",
                    "description": "true - there is access to create commodity transactions, false - no access"
                  },
                  "records_goods_create_last_days_count": {
                    "type": "number",
                    "description": "-1 - access to create commodity transactions for all time, >= 0 - access to create commodity transactions for the specified number of days in the past"
                  },
                  "records_goods_edit_transaction_access": {
                    "type": "boolean",
                    "description": "true - there is access to editing commodity transactions, false - no access"
                  },
                  "records_goods_edit_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to editing commodity transactions for all time, >= 0 - access to editing commodity transactions for the specified number of days in the past''"
                  },
                  "records_goods_cost_access": {
                    "type": "boolean",
                    "description": "true - there is access to change the cost of products, false - no access"
                  },
                  "records_goods_discount_access": {
                    "type": "boolean",
                    "description": "true - there is access to change product discounts, false - no access"
                  },
                  "records_finances_access": {
                    "type": "boolean",
                    "description": "true - there is access to payment, false - no access"
                  },
                  "records_finances_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to making payments in records for the whole time, >= 0 - access to making payments in records for the specified number of days in the past"
                  },
                  "records_finances_pay_from_deposits_access": {
                    "type": "boolean",
                    "description": "true - there is access to making payments in records from the client's personal account, false - no access"
                  },
                  "records_group_id_access": {
                    "type": "boolean",
                    "description": "true - there is access to client data over the chain, false - no access"
                  },
                  "records_group_id": {
                    "type": "number",
                    "description": "ID of the chain to which there is access to customer data"
                  },
                  "record_form_client_add_access": {
                    "type": "boolean",
                    "description": "true - there is access to add clients from appointment form, false - no access"
                  },
                  "records_autocomplete_phone_access": {
                    "type": "boolean",
                    "description": "true - there is access to phone autocomplete in appointment form, false - no access"
                  },
                  "assistants_management_access": {
                    "type": "boolean",
                    "description": "true - there is access to manage assistants, false - no access"
                  },
                  "assistants_reward_share_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit assistant reward share, false - no access"
                  },
                  "records_edit_last_days_count": {
                    "type": "number",
                    "description": "-1 - access to edit appointments for all time, >= 0 - access to edit appointments for the specified number of days in the past"
                  },
                  "records_edit_date_and_master_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment date and team member, false - no access"
                  },
                  "records_edit_duration_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment duration, false - no access"
                  },
                  "records_edit_comment_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment comment, false - no access"
                  },
                  "records_edit_services_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment services, false - no access"
                  },
                  "records_consumables_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment consumables, false - no access"
                  },
                  "record_edit_full_paid_client_came_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit fully paid appointments with client arrived status, false - no access"
                  },
                  "record_edit_full_paid_client_confirm_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit fully paid appointments with client confirmed status, false - no access"
                  },
                  "custom_fields_client_values_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to read client custom field values, false - no access"
                  },
                  "custom_fields_client_values_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit client custom field values, false - no access"
                  },
                  "custom_fields_record_values_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to read appointment custom field values, false - no access"
                  },
                  "custom_fields_record_values_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit appointment custom field values, false - no access"
                  }
                },
                "description": "Appointment window"
              },
              "finances": {
                "type": "object",
                "properties": {
                  "finances_access": {
                    "type": "boolean",
                    "description": "true - there is access to finances, false - no access"
                  },
                  "finances_accounts_ids": {
                    "type": "array",
                    "description": "array of IDs to selected checkouts",
                    "items": {
                      "type": "object"
                    }
                  },
                  "finances_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to view funds movements, false - no access"
                  },
                  "finances_last_days_count": {
                    "type": "number",
                    "description": "-1 - access to view funds movements for the whole time, >= 0 - access to view funds movements for the specified number of days in the past"
                  },
                  "finances_create_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to create transactions, false - no access"
                  },
                  "finances_create_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to create transactions for all time, >= 0 - access to create transactions for the specified number of days in the past"
                  },
                  "finances_edit_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to editing transactions, false - no access"
                  },
                  "finances_edit_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to editing transactions for all time, >= 0 - access to editing transactions for the specified number of days in the past"
                  },
                  "finances_delete_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete transactions, false - no access"
                  },
                  "finances_transactions_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading cash flows in Excel, false - no access"
                  },
                  "finances_expenses_ids": {
                    "type": "array",
                    "description": "true - there is access to transfers between location accounts, false - no access",
                    "items": {
                      "type": "object"
                    }
                  },
                  "finances_accounts_access": {
                    "type": "boolean",
                    "description": "true - there is access to accounts and location accounts, false - no access"
                  },
                  "finances_accounts_limited_access": {
                    "type": "boolean",
                    "description": "true - there is limited access to accounts, false - no access"
                  },
                  "finances_accounts_banalce_access": {
                    "type": "boolean",
                    "description": "true - there is access to the balance, false - no access"
                  },
                  "finances_suppliers_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to counterparties, false - no access"
                  },
                  "finances_suppliers_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create counterparties, false - no access"
                  },
                  "finances_suppliers_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change counterparties, false - no access"
                  },
                  "finances_suppliers_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to deleting counterparties, false - no access"
                  },
                  "finances_suppliers_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to export to Excel, false - no access"
                  },
                  "finances_expenses_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to the payment item, false - no access"
                  },
                  "expenses_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to the payment item, false - no access"
                  },
                  "finances_expenses_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create a payment item, false - no access"
                  },
                  "expenses_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create a payment item, false - no access"
                  },
                  "finances_expenses_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change the payment item, false - no access"
                  },
                  "expenses_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change the payment item, false - no access"
                  },
                  "finances_expenses_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to deleting a payment item, false - no access"
                  },
                  "expenses_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to deleting a payment item, false - no access"
                  },
                  "finances_kkm_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to operations with KKM, false - no access"
                  },
                  "kkm_transactions_accounts_access": {
                    "type": "boolean",
                    "description": "true - there is access to operations with KKM, false - no access"
                  },
                  "finances_kkm_settings_read_access": {
                    "type": "boolean",
                    "description": "true - access to KKM settings, false - no access"
                  },
                  "kkm_settings_reed_access": {
                    "type": "boolean",
                    "description": "true - access to KKM settings, false - no access"
                  },
                  "finances_kkm_settings_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change KKM, false - no access"
                  },
                  "kkm_settings_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change KKM, false - no access"
                  },
                  "finances_settings_invoicing_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to online payments, false - no access"
                  },
                  "finances_settings_invoicing_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change online payments, false - no access"
                  },
                  "settings_invoicing_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to online payments, false - no access"
                  },
                  "settings_invoicing_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change online payments, false - no access"
                  },
                  "finances_options_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to payment settings, false - no access"
                  },
                  "options_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to read payment options, false - no access"
                  },
                  "finances_options_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change payment settings, false - no access"
                  },
                  "options_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change payment settings, false - no access"
                  },
                  "finances_salary_schemes_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll schemes, false - no access"
                  },
                  "finances_salary_calc_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll, false - no access"
                  },
                  "finances_salary_not_limitation_today_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll, false - access to payroll for the current day"
                  },
                  "finances_payroll_calculation_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll, false - no access"
                  },
                  "finances_payroll_calculation_create_not_limitation_today_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll, false - access to payroll for the current day"
                  },
                  "finances_salary_access_master_checkbox": {
                    "type": "boolean",
                    "description": "true - only a specific team member has access to payroll, false - full access"
                  },
                  "finances_salary_access_master_id": {
                    "type": "number",
                    "description": "ID of the team member to whom you have access to payroll"
                  },
                  "get_salary_access_master_id": {
                    "type": "number",
                    "description": "ID of the team member to whom you have access to payroll"
                  },
                  "finances_salary_master_not_limitation_today_access": {
                    "type": "boolean",
                    "description": "true - do not restrict to the current day, false - access only for today"
                  },
                  "finances_payroll_calculation_create_by_master_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll for a specific team member, false - no restrictions"
                  },
                  "calculation_create_by_master_not_limitation_today_access": {
                    "type": "boolean",
                    "description": "true - there is access to payroll, false - no access"
                  },
                  "finances_period_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the report for the period, false - no access"
                  },
                  "finances_period_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to uploading a report for the period to Excel, false - no access"
                  },
                  "finances_year_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the annual report, false - no access"
                  },
                  "finances_year_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to exporting the annual report to Excel, false - no access"
                  },
                  "finances_print_check_access": {
                    "type": "boolean",
                    "description": "true - there is access to receipt printing, false - no access"
                  },
                  "finances_z_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the daily location account report, false - no access"
                  },
                  "finances_z_report_no_limit_today_access": {
                    "type": "boolean",
                    "description": "true - there is access to the location account report, false - access to the location account report for the current day"
                  },
                  "finances_z_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to export to Excel, false - no access"
                  }
                },
                "description": "Section Finance"
              },
              "clients": {
                "type": "object",
                "properties": {
                  "clients_access": {
                    "type": "boolean",
                    "description": "true - there is access to the client base, false - no access"
                  },
                  "client_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to phone numbers in the list of clients, false - no access"
                  },
                  "clients_phones_email_access": {
                    "type": "boolean",
                    "description": "true - there is access to phone numbers and emails in the list of clients, false - no access"
                  },
                  "clients_card_phone_access": {
                    "type": "boolean",
                    "description": "true - there is access to phones in the client card, false - no access"
                  },
                  "clients_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete clients, false - no access"
                  },
                  "clients_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading the list of clients in Excel, false - no access"
                  },
                  "excel_access": {
                    "type": "boolean",
                    "description": "1 - there is access to unloading the list of clients in Excel, 0 - no access"
                  },
                  "client_comments_list_access": {
                    "type": "boolean",
                    "description": "true - there is access to view comments, false - no access"
                  },
                  "client_comments_add_access": {
                    "type": "boolean",
                    "description": "true - there is access to add comments, false - no access"
                  },
                  "client_comments_own_edit_access": {
                    "type": "boolean",
                    "description": "true - you have access to change/delete your comments, false - no access"
                  },
                  "client_comments_other_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to change/delete other people's comments, false - no access"
                  },
                  "client_files_list_access": {
                    "type": "boolean",
                    "description": "true - there is access to view and download files, false - no access"
                  },
                  "client_files_upload_access": {
                    "type": "boolean",
                    "description": "true - there is access to upload files, false - no access"
                  },
                  "client_files_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete files, false - no access"
                  },
                  "clients_visit_master_id": {
                    "type": "number",
                    "description": "ID of the team member by which you can see the clients who visited the team member, 0 - no restrictions"
                  },
                  "get_visit_master_id": {
                    "type": "number",
                    "description": "ID of the team member by which you can see the clients who visited the team member, 0 - no restrictions"
                  },
                  "clients_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to client phones, false - no access"
                  },
                  "clients_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit clients, false - no access"
                  },
                  "clients_deposits_access": {
                    "type": "boolean",
                    "description": "true - there is access to client accounts, false - no access"
                  },
                  "clients_deposits_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create client accounts, false - no access"
                  },
                  "clients_deposits_history_access": {
                    "type": "boolean",
                    "description": "true - there is access to client account history, false - no access"
                  },
                  "clients_deposits_topup_access": {
                    "type": "boolean",
                    "description": "true - there is access to top up client accounts, false - no access"
                  },
                  "clients_loyalty_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to read client loyalty data, false - no access"
                  },
                  "clients_loyalty_settings_access": {
                    "type": "boolean",
                    "description": "true - there is access to client loyalty settings, false - no access"
                  },
                  "clients_card_comment_access": {
                    "type": "boolean",
                    "description": "true - there is access to view client card comments, false - no access"
                  },
                  "clients_card_comment_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit client card comments, false - no access"
                  },
                  "clients_surname_middle_name_access": {
                    "type": "boolean",
                    "description": "true - there is access to view client surname and middle_name, false - no access"
                  },
                  "clients_surname_patronymic_access": {
                    "type": "boolean",
                    "description": "true - there is access to view client surname and legacy middle-name field, false - no access"
                  },
                  "clients_surname_middle_name_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit client surname and middle_name, false - no access"
                  },
                  "clients_surname_patronymic_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit client surname and legacy middle-name field, false - no access"
                  },
                  "clients_show_attendance_history_access": {
                    "type": "boolean",
                    "description": "true - there is access to show client attendance history, false - no access"
                  }
                },
                "description": "Section Clients"
              },
              "dashboard": {
                "type": "object",
                "properties": {
                  "dashboard_access": {
                    "type": "boolean",
                    "description": "true - there is access to the overview section, false - no access"
                  },
                  "dash_access": {
                    "type": "boolean",
                    "description": "true - there is access to the summary section, false - no access"
                  },
                  "dash_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to display phone numbers in the summary, false - no access"
                  },
                  "dash_records_access": {
                    "type": "boolean",
                    "description": "true - there is access to view the list of records, false - no access"
                  },
                  "dash_records_last_days_count": {
                    "type": "number",
                    "description": "-1 - access to view the list of records for all time, >= 0 - access to view the list of records for the specified number of days in the past"
                  },
                  "dash_records_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unload the list of records in Excel, false - no access"
                  },
                  "dash_records_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to display phone numbers in appointments, false - no access"
                  },
                  "dash_message_access": {
                    "type": "boolean",
                    "description": "true - there is access to view message details, false - no access"
                  },
                  "dash_message_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unload message details in Excel, false - no access"
                  },
                  "dash_message_phones_access": {
                    "type": "boolean",
                    "description": "true - there is access to show phone numbers in messages, false - no access"
                  },
                  "dash_reviews_access": {
                    "type": "boolean",
                    "description": "true - there is access to view reviews, false - no access"
                  },
                  "dash_reviews_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete reviews, false - no access"
                  },
                  "dashboard_calls_access": {
                    "type": "boolean",
                    "description": "true - there is access to the calls section, false - no access"
                  },
                  "dashboard_calls_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading Excel calls, false - no access"
                  },
                  "dashboard_calls_phones_access": {
                    "type": "boolean",
                    "description": "true - clients have access to view the phone number, false - no access"
                  },
                  "security_access": {
                    "type": "boolean",
                    "description": "true - there is access to security settings, false - no access"
                  },
                  "security_2fa_access": {
                    "type": "boolean",
                    "description": "true - there is access to 2FA security settings, false - no access"
                  },
                  "security_data_changes_access": {
                    "type": "boolean",
                    "description": "true - there is access to view data changes in security log, false - no access"
                  },
                  "security_employee_changes_access": {
                    "type": "boolean",
                    "description": "true - there is access to view employee changes in security log, false - no access"
                  },
                  "security_export_import_access": {
                    "type": "boolean",
                    "description": "true - there is access to export/import security logs, false - no access"
                  },
                  "security_logins_access": {
                    "type": "boolean",
                    "description": "true - there is access to view login history in security log, false - no access"
                  }
                },
                "description": "Section Overview"
              },
              "notification": {
                "type": "object",
                "properties": {
                  "notification": {
                    "type": "boolean",
                    "description": "true - access to Notifications, false - no access"
                  },
                  "web_push": {
                    "type": "boolean",
                    "description": "true - there is access to show Push notifications about posts in the Web version, false - no access"
                  },
                  "web_phone_push": {
                    "type": "boolean",
                    "description": "true - there is access to show Push notifications about calls in the Web version, false - no access"
                  },
                  "notification_sms_ending_license": {
                    "type": "boolean",
                    "description": "true - there is access to send SMS notifications about imminent license expiration, false - no access"
                  },
                  "notification_sms_low_balance": {
                    "type": "boolean",
                    "description": "true - there is access to send SMS notifications about low balance, false - no access"
                  },
                  "notification_email_ending_license": {
                    "type": "boolean",
                    "description": "true - there is access to send Email notifications about imminent license expiration, false - no access"
                  }
                },
                "description": "Notification settings"
              },
              "loyalty": {
                "type": "object",
                "properties": {
                  "loyalty_access": {
                    "type": "boolean",
                    "description": "true - there is access to loyalty, false - no access"
                  },
                  "has_loyalty_access": {
                    "type": "boolean",
                    "description": "true - there is access to loyalty, false - no access"
                  },
                  "loyalty_cards_manual_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to manual replenishment/withdrawal from loyalty cards, false - no access"
                  },
                  "has_loyalty_cards_manual_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to manual replenishment/withdrawal from loyalty cards, false - no access"
                  },
                  "loyalty_certificate_and_abonement_manual_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to payment with a certificate and a membership without a code, false - no access"
                  },
                  "loyalty_abonement_balance_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit membership balance, false - no access"
                  },
                  "loyalty_abonement_history_access": {
                    "type": "boolean",
                    "description": "true - there is access to membership history, false - no access"
                  },
                  "loyalty_abonement_period_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit membership period, false - no access"
                  },
                  "loyalty_cards_issue_and_removal_access": {
                    "type": "boolean",
                    "description": "true - there is access to issue and remove loyalty cards, false - no access"
                  },
                  "loyalty_certificate_balance_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit gift card balance, false - no access"
                  },
                  "loyalty_certificate_period_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit gift card period, false - no access"
                  }
                },
                "description": "Section Loyalty"
              },
              "storages": {
                "type": "object",
                "properties": {
                  "storages_access": {
                    "type": "boolean",
                    "description": "true - there is access to the inventory, false - no access"
                  },
                  "storages_ids": {
                    "type": "array",
                    "description": "true - there is access to the selected warehouses, false - no access",
                    "items": {
                      "type": "object"
                    }
                  },
                  "storages_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to view product movements, false - no access"
                  },
                  "storages_last_days_count": {
                    "type": "number",
                    "description": "-1 - access to view product movements for all time, >= 0 - access to view product movements for the specified number of days in the past"
                  },
                  "storages_move_goods_access": {
                    "type": "boolean",
                    "description": "true - there is access to moving products between warehouses, false - no access"
                  },
                  "storages_create_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to create commodity transactions, false - no access"
                  },
                  "storages_create_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to the creation of commodity transactions for the entire time, >= 0 - access to the creation of commodity transactions for the specified number of days in the past"
                  },
                  "storages_create_transactions_buy_access": {
                    "type": "boolean",
                    "description": "true - there is access to registering the arrival of products, false - no access"
                  },
                  "storages_create_transactions_sale_access": {
                    "type": "boolean",
                    "description": "true - there is access to registration of sales of products, false - no access"
                  },
                  "storages_edit_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to editing commodity transactions, false - no access"
                  },
                  "storages_edit_last_days_count": {
                    "type": "number",
                    "description": "-1 - there is access to editing commodity transactions for the whole time, >= 0 - access to editing commodity transactions for the specified number of days in the past"
                  },
                  "storages_edit_transactions_buy_access": {
                    "type": "boolean",
                    "description": "true - there is access to registering the arrival of products, false - no access"
                  },
                  "storages_edit_transactions_sale_access": {
                    "type": "boolean",
                    "description": "true - there is access to registration of sales of products, false - no access"
                  },
                  "storages_delete_transactions_access": {
                    "type": "boolean",
                    "description": "true - there is access to deleting commodity transactions, false - no access"
                  },
                  "storages_transactions_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading product movements in Excel, false - no access"
                  },
                  "storages_transactions_types": {
                    "type": "array",
                    "description": "true - there is access to unloading product movements in Excel, false - no access",
                    "items": {
                      "type": "object"
                    }
                  },
                  "storages_inventory_access": {
                    "type": "boolean",
                    "description": "true - there is access to the inventory, false - no access"
                  },
                  "storages_inventory_create_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to create and edit inventory, false - no access"
                  },
                  "storages_inventory_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to deleting inventory, false - no access"
                  },
                  "storages_inventory_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading inventory in Excel, false - no access"
                  },
                  "storages_remnants_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the stock balance report, false - no access"
                  },
                  "storages_remnants_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading balances in Excel, false - no access"
                  },
                  "storages_sales_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the sales report, false - no access"
                  },
                  "storages_sales_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to download sales report in Excel, false - no access"
                  },
                  "storages_consumable_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the consumable write-off report, false - no access"
                  },
                  "storages_consumable_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to downloading a report on writing off consumables in Excel, false - no access"
                  },
                  "storages_write_off_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the write-off report, false - no access"
                  },
                  "storages_write_off_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to unloading a report on the write-off of products in Excel, false - no access"
                  },
                  "storages_turnover_report_access": {
                    "type": "boolean",
                    "description": "true - there is access to the turnover report, false - no access"
                  },
                  "storages_turnover_report_excel_access": {
                    "type": "boolean",
                    "description": "true - there is access to download the turnover report in Excel, false - no access"
                  },
                  "storages_goods_crud_access": {
                    "type": "boolean",
                    "description": "true - there is access to product management, false - no access"
                  },
                  "storages_goods_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create products, false - no access"
                  },
                  "storages_goods_update_access": {
                    "type": "boolean",
                    "description": "true - there is access to change products, false - no access"
                  },
                  "storages_goods_title_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to the name, Article, Barcode, false - no access"
                  },
                  "storages_goods_category_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to categories, false - no access"
                  },
                  "storages_goods_selling_price_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to sell prices, false - no access"
                  },
                  "storages_goods_cost_price_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to the cost, false - no access"
                  },
                  "storages_goods_units_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to units of measurement, false - no access"
                  },
                  "storages_goods_critical_balance_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to critical balances, Desired balance, false - no access"
                  },
                  "storages_goods_masses_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to the mass, false - no access"
                  },
                  "storages_goods_comment_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to comments, false - no access"
                  },
                  "storages_goods_archive_access": {
                    "type": "boolean",
                    "description": "true - there is access to archiving and restoring products, false - no access"
                  },
                  "storages_goods_delete_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete products, false - no access"
                  },
                  "storages_limited_access": {
                    "type": "boolean",
                    "description": "true - there is limited access to inventory, false - no access"
                  },
                  "storages_goods_prime_cost_view_access": {
                    "type": "boolean",
                    "description": "true - there is access to view product prime cost, false - no access"
                  }
                },
                "description": "Section Inventory"
              },
              "settings": {
                "type": "object",
                "properties": {
                  "settings_access": {
                    "type": "boolean",
                    "description": "true - there is access to the settings section, false - no access"
                  },
                  "settings_basis_access": {
                    "type": "boolean",
                    "description": "true - there is access to the General section, false - no access"
                  },
                  "settings_information_access": {
                    "type": "boolean",
                    "description": "true - there is access to the Information section, false - no access"
                  },
                  "users_access": {
                    "type": "boolean",
                    "description": "true - there is access to user management, false - no access"
                  },
                  "delete_users_access": {
                    "type": "boolean",
                    "description": "true - there is access to delete users, false - no access"
                  },
                  "create_users_access": {
                    "type": "boolean",
                    "description": "true - there is access to adding users, false - no access"
                  },
                  "edit_users_access": {
                    "type": "boolean",
                    "description": "true - there is access to user rights management, false - no access"
                  },
                  "limited_users_access": {
                    "type": "boolean",
                    "description": "true - there is access to rights management within its own set of rights, false - no access"
                  },
                  "settings_services_access": {
                    "type": "boolean",
                    "description": "true - there is access to the Services section, false - no access"
                  },
                  "settings_services_create_access": {
                    "type": "boolean",
                    "description": "true - there is access to create services, false - no access"
                  },
                  "services_edit": {
                    "type": "boolean",
                    "description": "true - there is access to editing services, false - no access"
                  },
                  "settings_services_edit_title_access": {
                    "type": "boolean",
                    "description": "true - there is access to service names and a name for online booking, false - no access"
                  },
                  "settings_services_relation_category_access": {
                    "type": "boolean",
                    "description": "true - there is access to service categories, false - no access"
                  },
                  "settings_services_edit_price_access": {
                    "type": "boolean",
                    "description": "true - there is access to service prices, false - no access"
                  },
                  "settings_services_edit_image_access": {
                    "type": "boolean",
                    "description": "true - there is access to image uploads and changes, false - no access"
                  },
                  "settings_services_edit_online_seance_date_time_access": {
                    "type": "boolean",
                    "description": "true - there is access to displaying services in the widget, false - no access"
                  },
                  "settings_services_edit_online_pay_access": {
                    "type": "boolean",
                    "description": "true - there is access to online payment for the service, false - no access"
                  },
                  "settings_services_edit_services_related_resource_access": {
                    "type": "boolean",
                    "description": "true - there is access to the service resources, false - no access"
                  },
                  "settings_positions_read": {
                    "type": "boolean",
                    "description": "true - there is access to the position section, false - no access"
                  },
                  "settings_positions_create": {
                    "type": "boolean",
                    "description": "true - there is access to create posts, false - no access"
                  },
                  "settings_positions_delete": {
                    "type": "boolean",
                    "description": "true - there is access to delete posts, false - no access"
                  },
                  "edit_master_service_and_duration": {
                    "type": "boolean",
                    "description": "true - there is access to change team member services and their duration, false - no access"
                  },
                  "tech_card_edit": {
                    "type": "boolean",
                    "description": "true - there is access to change the technological map, false - no access"
                  },
                  "services_delete": {
                    "type": "boolean",
                    "description": "true - there is access to delete services, false - no access"
                  },
                  "settings_master_access": {
                    "type": "boolean",
                    "description": "true - there is access to the team members section, false - no access"
                  },
                  "master_create": {
                    "type": "boolean",
                    "description": "true - there is access to create team members, false - no access"
                  },
                  "master_edit": {
                    "type": "boolean",
                    "description": "true - there is access to edit team members, false - no access"
                  },
                  "master_delete": {
                    "type": "boolean",
                    "description": "true - there is access to delete team members, false - no access"
                  },
                  "settings_master_dismiss_access": {
                    "type": "boolean",
                    "description": "true - there is access to dismiss team members, false - no access"
                  },
                  "schedule_edit": {
                    "type": "boolean",
                    "description": "true - there is access to editing the work schedule, false - no access"
                  },
                  "settings_notifications_access": {
                    "type": "boolean",
                    "description": "true - there is access to the Sms notification section, false - no access"
                  },
                  "settings_email_notifications_access": {
                    "type": "boolean",
                    "description": "true - there is access to the Email notification section, false - no access"
                  },
                  "settings_template_notifications_access": {
                    "type": "boolean",
                    "description": "true - there is access to the Notification types section, false - no access"
                  },
                  "webhook_read_access": {
                    "type": "boolean",
                    "description": "true - there is access to change WebHook settings, false - no access"
                  },
                  "settings_clients_labels_access": {
                    "type": "boolean",
                    "description": "true - there is access to client tags/labels settings, false - no access"
                  },
                  "settings_close_docs_access": {
                    "type": "boolean",
                    "description": "true - there is access to close documents, false - no access"
                  },
                  "settings_user_notifications_access": {
                    "type": "boolean",
                    "description": "true - there is access to user notifications settings, false - no access"
                  },
                  "is_salon_tips_manager": {
                    "type": "boolean",
                    "description": "true - user is a tips manager, false - not a tips manager"
                  }
                },
                "description": "Section Settings"
              },
              "security": {
                "type": "object",
                "properties": {
                  "security_access": {
                    "type": "boolean",
                    "description": "true - there is access to security settings, false - no access"
                  },
                  "security_2fa_access": {
                    "type": "boolean",
                    "description": "true - there is access to 2FA security settings, false - no access"
                  },
                  "security_data_changes_access": {
                    "type": "boolean",
                    "description": "true - there is access to view data changes in security log, false - no access"
                  },
                  "security_employee_changes_access": {
                    "type": "boolean",
                    "description": "true - there is access to view employee changes in security log, false - no access"
                  },
                  "security_export_import_access": {
                    "type": "boolean",
                    "description": "true - there is access to export/import security logs, false - no access"
                  },
                  "security_logins_access": {
                    "type": "boolean",
                    "description": "true - there is access to view login history in security log, false - no access"
                  }
                },
                "description": "Section Security"
              },
              "comers": {
                "type": "object",
                "properties": {
                  "comers_access": {
                    "type": "boolean",
                    "description": "true - there is access to visitors section, false - no access"
                  },
                  "comers_info_vehicle_view_access": {
                    "type": "boolean",
                    "description": "true - there is access to view vehicle information for visitors, false - no access"
                  },
                  "comers_info_vehicle_edit_access": {
                    "type": "boolean",
                    "description": "true - there is access to edit vehicle information for visitors, false - no access"
                  }
                },
                "description": "Section Visitors"
              },
              "other": {
                "type": "object",
                "properties": {
                  "stat_access": {
                    "type": "boolean",
                    "description": "true - there is access to analytics, false - no access"
                  },
                  "analytics_constructor_access": {
                    "type": "boolean",
                    "description": "true - there is access to analytics constructor, false - no access"
                  },
                  "billing_access": {
                    "type": "boolean",
                    "description": "true - there is access to billing (balance menu section), false - no access"
                  },
                  "billing_invoices_access": {
                    "type": "boolean",
                    "description": "true - there is access to billing invoices, false - no access"
                  },
                  "send_sms": {
                    "type": "boolean",
                    "description": "true - there is access to SMS distribution to clients, false - no access"
                  },
                  "auth_enable_check_ip": {
                    "type": "boolean",
                    "description": "true - there is access to the location only from IP addresses (v4, v6), false - no access"
                  },
                  "auth_list_allowed_ip": {
                    "type": "array",
                    "description": "list of IP addresses",
                    "items": {
                      "type": "object"
                    }
                  },
                  "salon_to_salon_group_add_access": {
                    "type": "boolean",
                    "description": "true - there is access to add locations to location groups, false - no access"
                  },
                  "is_salon_tips_manager": {
                    "type": "boolean",
                    "description": "true - user is a tips manager, false - not a tips manager"
                  }
                },
                "description": "Access to analytics, billing, SMS mailings and enabling access to a location by IP address"
              },
              "online_record": {
                "type": "object",
                "properties": {
                  "online_record_access": {
                    "type": "boolean",
                    "description": "true - there is access to online booking, false - no access"
                  },
                  "online_record_privacy_policy_access": {
                    "type": "boolean",
                    "description": "true - there is access to privacy policy settings for online booking, false - no access"
                  }
                },
                "description": "Section Online Booking"
              },
              "security_access": {
                "type": "boolean",
                "description": "true - there is access to security settings, false - no access"
              },
              "security_2fa_access": {
                "type": "boolean",
                "description": "true - there is access to 2FA security settings, false - no access"
              },
              "security_data_changes_access": {
                "type": "boolean",
                "description": "true - there is access to view data changes in security log, false - no access"
              },
              "security_employee_changes_access": {
                "type": "boolean",
                "description": "true - there is access to view employee changes in security log, false - no access"
              },
              "security_export_import_access": {
                "type": "boolean",
                "description": "true - there is access to export/import security logs, false - no access"
              },
              "security_logins_access": {
                "type": "boolean",
                "description": "true - there is access to view login history in security log, false - no access"
              }
            },
            "description": "Object with access rights categories"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of rights",
        "example": {
          "success": true,
          "data": {
            "timetable": {
              "timetable_access": true,
              "master_id": 1000238,
              "position_id": 0,
              "last_days_count": 1000,
              "schedule_edit_access": true,
              "timetable_phones_access": true,
              "timetable_transferring_record_access": true,
              "timetable_statistics_access": true,
              "timetable_waiting_list_access": false
            },
            "record_form": {
              "record_form_access": true,
              "record_form_client_access": true,
              "records_autocomplete_access": true,
              "create_records_access": true,
              "edit_records_access": true,
              "edit_records_attendance_access": true,
              "records_services_cost_access": true,
              "records_services_discount_access": true,
              "record_edit_full_paid_access": true,
              "delete_records_access": true,
              "delete_customer_came_records_access": true,
              "delete_paid_records_access": true,
              "records_goods_access": true,
              "records_goods_create_transaction_access": true,
              "records_goods_create_last_days_count": -1,
              "records_goods_edit_transaction_access": true,
              "records_goods_edit_last_days_count": -1,
              "records_goods_cost_access": true,
              "records_goods_discount_access": true,
              "records_finances_access": true,
              "records_finances_last_days_count": -1,
              "records_finances_pay_from_deposits_access": true,
              "records_group_id_access": true,
              "records_group_id": 134178,
              "record_form_client_add_access": true,
              "records_autocomplete_phone_access": true,
              "assistants_management_access": true,
              "assistants_reward_share_edit_access": true,
              "records_edit_last_days_count": -1,
              "records_edit_date_and_master_access": true,
              "records_edit_duration_access": true,
              "records_edit_comment_access": true,
              "records_edit_services_access": true,
              "records_consumables_edit_access": true,
              "record_edit_full_paid_client_came_access": true,
              "record_edit_full_paid_client_confirm_access": true,
              "custom_fields_client_values_read_access": true,
              "custom_fields_client_values_edit_access": true,
              "custom_fields_record_values_read_access": true,
              "custom_fields_record_values_edit_access": true
            },
            "finances": {
              "finances_access": true,
              "finances_accounts_ids": [],
              "finances_transactions_access": true,
              "finances_last_days_count": -1,
              "finances_create_transactions_access": true,
              "finances_create_last_days_count": -1,
              "finances_edit_transactions_access": true,
              "finances_edit_last_days_count": -1,
              "finances_delete_transactions_access": true,
              "finances_transactions_excel_access": true,
              "finances_expenses_ids": [],
              "finances_accounts_access": true,
              "finances_accounts_limited_access": false,
              "finances_accounts_banalce_access": true,
              "finances_suppliers_read_access": true,
              "finances_suppliers_create_access": true,
              "finances_suppliers_update_access": true,
              "finances_suppliers_delete_access": true,
              "finances_suppliers_excel_access": true,
              "finances_expenses_read_access": true,
              "expenses_read_access": true,
              "finances_expenses_create_access": true,
              "expenses_create_access": true,
              "finances_expenses_update_access": true,
              "expenses_update_access": true,
              "finances_expenses_delete_access": true,
              "expenses_delete_access": true,
              "finances_kkm_transactions_access": true,
              "kkm_transactions_accounts_access": true,
              "finances_kkm_settings_read_access": true,
              "kkm_settings_reed_access": true,
              "finances_kkm_settings_update_access": true,
              "kkm_settings_update_access": true,
              "finances_settings_invoicing_read_access": true,
              "settings_invoicing_read_access": true,
              "finances_settings_invoicing_update_access": true,
              "settings_invoicing_update_access": true,
              "finances_options_read_access": true,
              "options_read_access": true,
              "finances_options_update_access": true,
              "options_update_access": true,
              "finances_salary_schemes_access": true,
              "finances_salary_calc_access": true,
              "finances_salary_not_limitation_today_access": true,
              "finances_payroll_calculation_create_access": true,
              "finances_payroll_calculation_create_not_limitation_today_access": true,
              "finances_salary_access_master_checkbox": true,
              "finances_salary_access_master_id": 1000237,
              "get_salary_access_master_id": 1000237,
              "finances_salary_master_not_limitation_today_access": true,
              "finances_payroll_calculation_create_by_master_access": true,
              "calculation_create_by_master_not_limitation_today_access": true,
              "finances_period_report_access": true,
              "finances_period_report_excel_access": true,
              "finances_year_report_access": true,
              "finances_year_report_excel_access": true,
              "finances_print_check_access": true,
              "finances_z_report_access": true,
              "finances_z_report_no_limit_today_access": true,
              "finances_z_report_excel_access": true
            },
            "clients": {
              "clients_access": true,
              "client_phones_access": true,
              "clients_phones_email_access": true,
              "clients_card_phone_access": true,
              "clients_delete_access": true,
              "clients_excel_access": true,
              "excel_access": true,
              "client_comments_list_access": true,
              "client_comments_add_access": true,
              "client_comments_own_edit_access": true,
              "client_comments_other_edit_access": true,
              "client_files_list_access": true,
              "client_files_upload_access": true,
              "client_files_delete_access": true,
              "clients_visit_master_id": 0,
              "get_visit_master_id": 0,
              "clients_phones_access": true,
              "clients_edit_access": true,
              "clients_deposits_access": true,
              "clients_deposits_create_access": true,
              "clients_deposits_history_access": true,
              "clients_deposits_topup_access": true,
              "clients_loyalty_read_access": true,
              "clients_loyalty_settings_access": true,
              "clients_card_comment_access": true,
              "clients_card_comment_edit_access": true,
              "clients_surname_middle_name_access": true,
              "clients_surname_middle_name_edit_access": true,
              "clients_show_attendance_history_access": true
            },
            "dashboard": {
              "dashboard_access": true,
              "dash_access": true,
              "dash_phones_access": true,
              "dash_records_access": true,
              "dash_records_last_days_count": -1,
              "dash_records_excel_access": true,
              "dash_records_phones_access": true,
              "dash_message_access": true,
              "dash_message_excel_access": true,
              "dash_message_phones_access": true,
              "dash_reviews_access": true,
              "dash_reviews_delete_access": true,
              "dashboard_calls_access": true,
              "dashboard_calls_excel_access": true,
              "dashboard_calls_phones_access": true
            },
            "notification": {
              "notification": true,
              "web_push": true,
              "web_phone_push": true,
              "notification_sms_ending_license": true,
              "notification_sms_low_balance": true,
              "notification_email_ending_license": true
            },
            "loyalty": {
              "loyalty_access": true,
              "has_loyalty_access": true,
              "loyalty_cards_manual_transactions_access": true,
              "has_loyalty_cards_manual_transactions_access": true,
              "loyalty_certificate_and_abonement_manual_transactions_access": true,
              "loyalty_abonement_balance_edit_access": true,
              "loyalty_abonement_history_access": true,
              "loyalty_abonement_period_edit_access": true,
              "loyalty_cards_issue_and_removal_access": true,
              "loyalty_certificate_balance_edit_access": true,
              "loyalty_certificate_period_edit_access": true
            },
            "storages": {
              "storages_access": true,
              "storages_ids": [],
              "storages_transactions_access": true,
              "storages_last_days_count": -1,
              "storages_move_goods_access": true,
              "storages_create_transactions_access": true,
              "storages_create_last_days_count": -1,
              "storages_create_transactions_buy_access": true,
              "storages_create_transactions_sale_access": true,
              "storages_edit_transactions_access": true,
              "storages_edit_last_days_count": -1,
              "storages_edit_transactions_buy_access": true,
              "storages_edit_transactions_sale_access": true,
              "storages_delete_transactions_access": true,
              "storages_transactions_excel_access": true,
              "storages_transactions_types": [],
              "storages_inventory_access": true,
              "storages_inventory_create_edit_access": true,
              "storages_inventory_delete_access": true,
              "storages_inventory_excel_access": true,
              "storages_remnants_report_access": true,
              "storages_remnants_report_excel_access": true,
              "storages_sales_report_access": true,
              "storages_sales_report_excel_access": true,
              "storages_consumable_report_access": true,
              "storages_consumable_report_excel_access": true,
              "storages_write_off_report_access": true,
              "storages_write_off_report_excel_access": true,
              "storages_turnover_report_access": true,
              "storages_turnover_report_excel_access": true,
              "storages_goods_crud_access": true,
              "storages_goods_create_access": true,
              "storages_goods_update_access": true,
              "storages_goods_title_edit_access": true,
              "storages_goods_category_edit_access": true,
              "storages_goods_selling_price_edit_access": true,
              "storages_goods_cost_price_edit_access": true,
              "storages_goods_units_edit_access": true,
              "storages_goods_critical_balance_edit_access": true,
              "storages_goods_masses_edit_access": true,
              "storages_goods_comment_edit_access": true,
              "storages_goods_archive_access": true,
              "storages_goods_delete_access": true,
              "storages_limited_access": false,
              "storages_goods_prime_cost_view_access": true
            },
            "settings": {
              "settings_access": true,
              "settings_basis_access": true,
              "settings_information_access": true,
              "users_access": true,
              "delete_users_access": true,
              "create_users_access": true,
              "edit_users_access": true,
              "limited_users_access": false,
              "settings_services_access": true,
              "settings_services_create_access": true,
              "services_edit": true,
              "settings_services_edit_title_access": true,
              "settings_services_relation_category_access": true,
              "settings_services_edit_price_access": true,
              "settings_services_edit_image_access": true,
              "settings_services_edit_online_seance_date_time_access": true,
              "settings_services_edit_online_pay_access": true,
              "settings_services_edit_services_related_resource_access": true,
              "settings_positions_read": true,
              "settings_positions_create": true,
              "settings_positions_delete": true,
              "edit_master_service_and_duration": true,
              "tech_card_edit": true,
              "services_delete": true,
              "settings_master_access": true,
              "master_create": true,
              "master_edit": true,
              "master_delete": true,
              "settings_master_dismiss_access": true,
              "schedule_edit": true,
              "settings_notifications_access": true,
              "settings_email_notifications_access": true,
              "settings_template_notifications_access": true,
              "webhook_read_access": true,
              "settings_clients_labels_access": true,
              "settings_close_docs_access": true,
              "settings_user_notifications_access": true,
              "is_salon_tips_manager": false
            },
            "comers": {
              "comers_access": false,
              "comers_info_vehicle_view_access": false,
              "comers_info_vehicle_edit_access": false
            },
            "other": {
              "stat_access": true,
              "billing_access": true,
              "send_sms": true,
              "salon_to_salon_group_add_access": true,
              "analytics_constructor_access": true,
              "billing_invoices_access": true,
              "auth_enable_check_ip": false,
              "auth_list_allowed_ip": []
            },
            "online_record": {
              "online_record_access": true,
              "online_record_privacy_policy_access": true
            },
            "security_access": false,
            "security_2fa_access": false,
            "security_data_changes_access": false,
            "security_employee_changes_access": false,
            "security_export_import_access": false,
            "security_logins_access": false
          },
          "meta": []
        }
      },
      "user_permission_type": {
        "title": "Model object \"Permission type\"",
        "description": "Data on the permission type",
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Name of the type",
            "enum": [
              "has_access",
              "has_group_access",
              "has_limited_access",
              "has_allowed_ids",
              "has_limited_today",
              "has_limited_by_own_access",
              "last_days_count",
              "allowed_ids",
              "allowed_id",
              "allowed_ip"
            ]
          },
          "all_access_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "A value that grants full access for this type of permission (can be number, string, or boolean)"
          },
          "no_access_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "A value that completely takes away access for this type of permission (can be number, string, or boolean)"
          }
        },
        "example": {
          "slug": "has_group_access",
          "all_access_value": true,
          "no_access_value": false
        }
      },
      "user_permission_option": {
        "title": "Model object \"Permission option\"",
        "description": "Data on the permission option",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the option"
          },
          "value": {
            "type": "number",
            "description": "Value of the option"
          },
          "is_disabled": {
            "type": "boolean",
            "description": "Availability of the option for use"
          }
        },
        "example": {
          "title": "All positions",
          "value": 0,
          "is_disabled": false
        }
      },
      "user_permission_with_children": {
        "title": "Model object \"Permission with nested permissions\"",
        "description": "Data on the permission with nested permissions",
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Name of the permission"
          },
          "title": {
            "type": "string",
            "description": "Title of the permission"
          },
          "type": {
            "type": "object",
            "description": "Data about the type of permission",
            "allOf": [
              {
                "$ref": "#/components/schemas/user_permission_type"
              }
            ]
          },
          "options": {
            "type": [
              "array",
              "null"
            ],
            "description": "Options list of the permission",
            "items": {
              "$ref": "#/components/schemas/user_permission_option"
            }
          },
          "hint": {
            "type": "string",
            "description": "Text hint on the use of the permission"
          },
          "is_recommended": {
            "type": "boolean",
            "description": "Is the permission recommended or optional"
          },
          "is_editable": {
            "type": "boolean",
            "description": "Is the permission available for editing"
          },
          "default_value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Value of the permission by default (can be number, string, or boolean)"
          },
          "entity_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the entity to which this permission belongs"
          },
          "is_paid": {
            "type": "boolean",
            "description": "Whether the permission is only available for paid staff members"
          },
          "is_paid_only": {
            "type": "boolean",
            "description": "Whether the permission can only be assigned to paid staff members. Only applicable when the location has `is_paid_rights_model` enabled"
          },
          "children": {
            "type": [
              "array",
              "null"
            ],
            "description": "Nested permissions (recursive structure, same schema as parent)",
            "items": {
              "type": "object",
              "description": "Nested permission object (same structure as UserPermissionWithChildren)"
            }
          }
        },
        "example": {
          "slug": "timetable_access",
          "title": "Appointment calendar",
          "hint": "",
          "is_recommended": true,
          "is_editable": true,
          "is_paid": false,
          "is_paid_only": false,
          "default_value": true,
          "entity_name": null,
          "children": [
            {
              "slug": "timetable_position_id",
              "title": "View the schedule and post records",
              "hint": "",
              "is_recommended": true,
              "is_editable": true,
              "default_value": null,
              "entity_name": "position",
              "children": null,
              "options": [
                {
                  "title": "All positions",
                  "value": 0,
                  "is_disabled": false
                },
                {
                  "title": "Administrator",
                  "value": 1234,
                  "is_disabled": false
                }
              ],
              "type": {
                "slug": "allowed_id",
                "all_access_value": "0",
                "no_access_value": "0"
              }
            }
          ],
          "options": null,
          "type": {
            "slug": "has_group_access",
            "all_access_value": true,
            "no_access_value": false
          }
        }
      },
      "user_role_with_salon_and_user": {
        "title": "Model object \"User role\"",
        "description": "Data on the user role",
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Name of the role",
            "enum": [
              "worker",
              "administrator",
              "accountant",
              "manager",
              "owner",
              "free_readonly",
              "free_readonly_admin"
            ]
          },
          "title": {
            "type": "string",
            "description": "Title of the role"
          },
          "description": {
            "type": "string",
            "description": "Description of the role"
          },
          "weight": {
            "type": "number",
            "description": "Role weight which determines the number of available permissions"
          },
          "user_permissions": {
            "type": [
              "array",
              "null"
            ],
            "description": "List of permissions for this role\nReturned in response only if corresponding `include` is present in request.\n",
            "items": {
              "$ref": "#/components/schemas/user_permission_with_children"
            }
          }
        },
        "example": {
          "slug": "staff_member",
          "title": "team member",
          "description": "Provides services",
          "weight": 1,
          "user_permissions": [
            {
              "slug": "timetable_access",
              "title": "Appointment calendar",
              "hint": "",
              "is_recommended": true,
              "is_editable": true,
              "default_value": true,
              "entity_name": null,
              "children": [
                {
                  "slug": "timetable_position_id",
                  "title": "View the schedule and post records",
                  "hint": "",
                  "is_recommended": true,
                  "is_editable": true,
                  "default_value": null,
                  "entity_name": "position",
                  "children": null,
                  "options": [
                    {
                      "title": "All positions",
                      "value": 0,
                      "is_disabled": false
                    },
                    {
                      "title": "Administrator",
                      "value": 1234,
                      "is_disabled": false
                    }
                  ],
                  "type": {
                    "slug": "allowed_id",
                    "all_access_value": "0",
                    "no_access_value": "0"
                  }
                }
              ],
              "options": null,
              "type": {
                "slug": "has_group_access",
                "all_access_value": true,
                "no_access_value": false
              }
            }
          ]
        }
      },
      "user_permission_value": {
        "title": "Model object \"Permission value\"",
        "description": "Data on the permission value",
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Name of permission"
          },
          "value": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Value of permission (can be number, string, boolean, or array)"
          }
        },
        "example": {
          "slug": "timetable_access",
          "value": true
        }
      },
      "user_role_permissions": {
        "title": "Model object \"Permissions and user role\"",
        "description": "Data on the permissions and user role",
        "type": "object",
        "properties": {
          "user_role": {
            "type": "string",
            "description": "Name of role",
            "enum": [
              "worker",
              "administrator",
              "accountant",
              "manager",
              "owner",
              "free_readonly",
              "free_readonly_admin"
            ]
          },
          "staff_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "team member ID linked to user"
          },
          "is_editable": {
            "type": "boolean",
            "description": "Are the permissions and role available for editing"
          },
          "has_any_paid_permission": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the user has at least one paid permission assigned"
          },
          "user_permissions": {
            "type": "array",
            "description": "List of user permissions values",
            "items": {
              "$ref": "#/components/schemas/user_permission_value"
            }
          }
        },
        "example": {
          "is_editable": true,
          "staff_id": 12345,
          "user_role": "owner",
          "has_any_paid_permission": null,
          "user_permissions": [
            {
              "slug": "timetable_access",
              "value": true
            },
            {
              "slug": "timetable_position_id",
              "value": 0
            },
            {
              "slug": "auth_list_allowed_ip",
              "value": ""
            }
          ]
        }
      },
      "user_invite_response_data_types": {
        "title": "Root Type for user_invite_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Send success status (true)"
          },
          "data": {
            "type": "string",
            "description": "Is null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "Metadata (contains a message that the data has been saved)"
          }
        },
        "description": "Create and Send an Invitation",
        "example": {
          "success": true,
          "meta": {
            "message": "Saved"
          }
        }
      },
      "200_success_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_true_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_empty_object"
          }
        }
      },
      "records_companyid_response_data-types": {
        "title": "Root Type for records_companyid_response_data-types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "company_id": {
                  "type": "number",
                  "description": "location ID"
                },
                "staff_id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "services": {
                  "type": "array",
                  "description": "Array of objects with services in the appointment",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Service ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Service name"
                      },
                      "cost": {
                        "type": "number",
                        "description": "The total cost of the service",
                        "format": "float"
                      },
                      "cost_to_pay": {
                        "type": "number",
                        "description": "Amount to pay (cost minus discounts/deposits)",
                        "format": "float"
                      },
                      "manual_cost": {
                        "type": "number",
                        "description": "Manual price",
                        "format": "float"
                      },
                      "cost_per_unit": {
                        "type": "number",
                        "description": "Unit cost",
                        "format": "float"
                      },
                      "discount": {
                        "type": "number",
                        "description": "Discount",
                        "format": "float"
                      },
                      "first_cost": {
                        "type": "number",
                        "description": "Initial cost of the service (excluding discounts)",
                        "format": "float"
                      },
                      "amount": {
                        "type": "number",
                        "description": "Quantity"
                      },
                      "assistants": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "description": "Array of assistant team members for this service",
                        "items": {
                          "type": "object"
                        }
                      }
                    }
                  }
                },
                "goods_transactions": {
                  "type": "array",
                  "description": "Array of commodity transactions",
                  "items": {
                    "type": "object"
                  }
                },
                "staff": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "api_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "team member External ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "team member name"
                    },
                    "specialization": {
                      "type": "string",
                      "description": "team member specialization"
                    },
                    "position": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Job ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Job title"
                        },
                        "services_binding_type": {
                          "type": "number",
                          "description": "Services binding type"
                        }
                      },
                      "description": "team member's position"
                    },
                    "avatar": {
                      "type": "string",
                      "description": "The path to the file with the team member's avatar"
                    },
                    "avatar_big": {
                      "type": "string",
                      "description": "Let to the file with the team member's profile picture in high resolution"
                    },
                    "rating": {
                      "type": "number",
                      "description": "team member Rating"
                    },
                    "votes_count": {
                      "type": "number",
                      "description": "Number of votes that rated the team member"
                    }
                  },
                  "description": "team member data object"
                },
                "client": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "description": "Customer data (may be empty)",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Client first name"
                    },
                    "surname": {
                      "type": "string",
                      "description": "Client surname"
                    },
                    "middle_name": {
                      "type": "string",
                      "description": "Client middle name"
                    },
                    "patronymic": {
                      "type": "string",
                      "description": "Client middle name (legacy field name; same value as middle_name)"
                    },
                    "display_name": {
                      "type": "string",
                      "description": "Client display name"
                    },
                    "comment": {
                      "type": "string",
                      "description": "Client comment"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Client phone number"
                    },
                    "card": {
                      "type": "string",
                      "description": "Client card number"
                    },
                    "email": {
                      "type": "string",
                      "description": "Client email"
                    },
                    "success_visits_count": {
                      "type": "number",
                      "description": "Number of successful visits"
                    },
                    "fail_visits_count": {
                      "type": "number",
                      "description": "Number of failed visits"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Client discount"
                    },
                    "is_new": {
                      "type": "boolean",
                      "description": "Is new client flag"
                    },
                    "custom_fields": {
                      "type": "array",
                      "description": "Client custom fields",
                      "items": {
                        "type": "object"
                      }
                    },
                    "gender": {
                      "type": "number",
                      "description": "Client gender (0 - not specified, 1 - male, 2 - female)"
                    },
                    "sex": {
                      "type": "number",
                      "description": "Client sex (alias for gender: 0 - not specified, 1 - male, 2 - female)"
                    },
                    "birthday": {
                      "type": "string",
                      "description": "Client birthday"
                    },
                    "client_tags": {
                      "type": "array",
                      "description": "Client tags",
                      "items": {
                        "type": "object"
                      }
                    },
                    "phone_country_id": {
                      "type": "number",
                      "description": "Phone country ID"
                    }
                  }
                },
                "date": {
                  "type": "string",
                  "description": "Session date",
                  "format": "date-time"
                },
                "datetime": {
                  "type": "string",
                  "description": "Session date in ISO",
                  "format": "date-time"
                },
                "create_date": {
                  "type": "string",
                  "description": "Session creation date",
                  "format": "date-time"
                },
                "comment": {
                  "type": "string",
                  "description": "Appointment Comment"
                },
                "online": {
                  "type": "boolean",
                  "description": "(Read only) Whether the appointment is online or not (false if the appointment was made by an administrator)"
                },
                "visit_attendance": {
                  "type": "number",
                  "description": "Visit status, 2 - The user confirmed the appointment, 1 - The user came, the services were provided, 0 - the user is waiting, -1 - the user did not come to the visit"
                },
                "attendance": {
                  "type": "number",
                  "description": "Appointment status, 2 - User confirmed the appointment, 1 - The user has arrived, services have been rendered, 0 - the user is waiting, -1 - the user has not come to visit"
                },
                "confirmed": {
                  "type": "number",
                  "description": "Appointment confirmation status, 0 - not confirmed, 1 - confirmed"
                },
                "seance_length": {
                  "type": "number",
                  "description": "Appointment duration in seconds. Includes technical_break_duration. Equal to the sum of services plus the technical break."
                },
                "length": {
                  "type": "number",
                  "description": "Appointment duration in seconds. Alias of seance_length. Includes technical_break_duration."
                },
                "sms_before": {
                  "type": "number",
                  "description": "Whether to send an SMS reminder to the client (if the client is specified)"
                },
                "sms_now": {
                  "type": "number",
                  "description": "Did you send SMS when adding an appointment"
                },
                "sms_now_text": {
                  "type": "string",
                  "description": "SMS text"
                },
                "email_now": {
                  "type": "number",
                  "description": "Has an email notification been sent?"
                },
                "notified": {
                  "type": "number",
                  "description": "Flag for confirmation of the appointment by the location administrator, if the client asked to confirm the appointment"
                },
                "master_request": {
                  "type": "number",
                  "description": "Indicates whether a specific team member was selected for the appointment. Set to false if the \"any team member\" option was chosen"
                },
                "api_id": {
                  "type": "string",
                  "description": "External appointment ID"
                },
                "from_url": {
                  "type": "string",
                  "description": "From which page the transition was made to complete the appointment (website, VK application, etc.)"
                },
                "review_requested": {
                  "type": "number",
                  "description": "Flag for requesting visit feedback from the client"
                },
                "is_remind_sms_sent": {
                  "type": "boolean",
                  "description": "Has reminder SMS been sent"
                },
                "visit_id": {
                  "type": "number",
                  "description": "Visit ID"
                },
                "created_user_id": {
                  "type": "number",
                  "description": "ID of the user who created the appointment"
                },
                "deleted": {
                  "type": "boolean",
                  "description": "(Read only) Whether the appointment was deleted (true if deleted)"
                },
                "paid_full": {
                  "type": "number",
                  "description": "Flag, whether the appointment is paid in full (1 - if paid in full)"
                },
                "prepaid": {
                  "type": "boolean",
                  "description": "Is online payment available"
                },
                "prepaid_confirmed": {
                  "type": "boolean",
                  "description": "Online payment status"
                },
                "last_change_date": {
                  "type": "string",
                  "description": "The date and time when the appointment was last modified",
                  "format": "date-time"
                },
                "custom_color": {
                  "type": "string",
                  "description": "Log appointment color"
                },
                "custom_font_color": {
                  "type": "string",
                  "description": "(Only when reading) Write font color"
                },
                "record_labels": {
                  "type": "array",
                  "description": "Post categories",
                  "items": {
                    "type": "object"
                  }
                },
                "activity_id": {
                  "type": "integer",
                  "description": "Group event ID",
                  "format": "int32"
                },
                "custom_fields": {
                  "type": [
                    "object",
                    "array"
                  ],
                  "description": "Custom fields (object or empty array)"
                },
                "documents": {
                  "type": "array",
                  "description": "Array of documents",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Document ID"
                      },
                      "type_id": {
                        "type": "number",
                        "description": "Document Type"
                      },
                      "storage_id": {
                        "type": "number",
                        "description": "Inventory ID"
                      },
                      "user_id": {
                        "type": "number",
                        "description": "ID of the user who created the document"
                      },
                      "company_id": {
                        "type": "number",
                        "description": "location ID"
                      },
                      "number": {
                        "type": "number",
                        "description": "Document Number"
                      },
                      "comment": {
                        "type": "string",
                        "description": "Document comment"
                      },
                      "date_created": {
                        "type": "string",
                        "description": "Document creation date",
                        "format": "date-time"
                      },
                      "category_id": {
                        "type": "integer",
                        "description": "Product category ID",
                        "format": "int32"
                      },
                      "visit_id": {
                        "type": "integer",
                        "description": "Visit ID"
                      },
                      "record_id": {
                        "type": "integer",
                        "description": "Appointment ID"
                      },
                      "type_title": {
                        "type": "string",
                        "description": "The name of the entity to which the document belongs"
                      },
                      "is_sale_bill_printed": {
                        "type": "boolean",
                        "description": "Is the sales receipt printed?"
                      }
                    }
                  }
                },
                "sms_remain_hours": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "How many hours before the start of the visit to send an SMS with a reminder"
                },
                "email_remain_hours": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "How many hours before the start of the visit to send a reminder email"
                },
                "bookform_id": {
                  "type": "number",
                  "description": "Online Appointment Form ID"
                },
                "record_from": {
                  "type": "string",
                  "description": "Name of online registration form"
                },
                "is_mobile": {
                  "type": "number",
                  "description": "Type of device used to register (0 - appointment created by administrator, via web version or mobile app for administrators, 1 - Mobile browser, online appointment widget, 2 - Desktop browser, online appointment widget)"
                },
                "is_sale_bill_printed": {
                  "type": "boolean",
                  "description": "Is the sales receipt printed?"
                },
                "consumables": {
                  "type": "array",
                  "description": "Consumable Array",
                  "items": {
                    "type": "object"
                  }
                },
                "finance_transactions": {
                  "type": "array",
                  "description": "Array of financial transactions",
                  "items": {
                    "type": "object"
                  }
                },
                "acceptance_free": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Acceptance free flag"
                },
                "clients_count": {
                  "type": "number",
                  "description": "Number of clients in appointment"
                },
                "comer": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Comer flag"
                },
                "is_update_blocked": {
                  "type": "boolean",
                  "description": "Update blocked flag"
                },
                "payment_status": {
                  "type": [
                    "string",
                    "number"
                  ],
                  "description": "Payment status"
                },
                "resource_instance_ids": {
                  "type": "array",
                  "description": "Resource instance IDs",
                  "items": {
                    "type": "number"
                  }
                },
                "short_link": {
                  "type": "string",
                  "description": "Short link to appointment"
                },
                "technical_break_duration": {
                  "type": "number",
                  "description": "Technical break duration in seconds"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "format": "int32"
              },
              "total_count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the page number and the number of appointments per page)"
          }
        },
        "description": "Get list of appointments",
        "example": {
          "success": true,
          "data": [
            {
              "id": 2,
              "company_id": 4564,
              "staff_id": 9,
              "services": [
                {
                  "id": 1,
                  "title": "Hair extension",
                  "cost": 100,
                  "manual_cost": 100,
                  "cost_per_unit": 100,
                  "discount": 0,
                  "first_cost": 100,
                  "amount": 1
                }
              ],
              "goods_transactions": [],
              "staff": {
                "id": 9,
                "name": "Alex Taylor",
                "specialization": "hair extension",
                "position": {
                  "id": 1,
                  "title": "Administrator"
                },
                "avatar": "http://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "http://app.alteg.io/images/no-master.png",
                "rating": 0,
                "votes_count": 0
              },
              "date": "2026-09-21T23:00:00.000-05:00",
              "datetime": "2026-09-21T23:00:00.000-05:00",
              "create_date": "2026-01-16T20:35:11-0500",
              "comment": "do not write down",
              "online": false,
              "visit_attendance": 0,
              "attendance": 0,
              "confirmed": 1,
              "seance_length": 3600,
              "length": 3600,
              "sms_before": 0,
              "sms_now": 0,
              "sms_now_text": "",
              "email_now": 0,
              "notified": 0,
              "master_request": 0,
              "api_id": "",
              "from_url": "",
              "review_requested": 0,
              "visit_id": 8262996,
              "created_user_id": 1073232,
              "deleted": false,
              "paid_full": 0,
              "prepaid": false,
              "prepaid_confirmed": false,
              "last_change_date": "2026-01-16T20:35:15-0500",
              "custom_color": "",
              "custom_font_color": "",
              "record_labels": [],
              "activity_id": 0,
              "custom_fields": {},
              "documents": [
                {
                  "id": 8172893,
                  "type_id": 7,
                  "storage_id": 0,
                  "user_id": 746310,
                  "company_id": 4564,
                  "number": 4163,
                  "comment": "",
                  "date_created": "2026-09-21T23:00:00.000-05:00",
                  "category_id": 0,
                  "visit_id": 3,
                  "record_id": 2,
                  "type_title": "Visit"
                }
              ],
              "sms_remain_hours": 5,
              "email_remain_hours": 1,
              "bookform_id": 0,
              "record_from": "",
              "is_mobile": 0,
              "is_sale_bill_printed": false,
              "consumables": [],
              "finance_transactions": []
            },
            {
              "id": 9,
              "company_id": 4564,
              "staff_id": 49,
              "services": [],
              "goods_transactions": [],
              "staff": {
                "id": 49,
                "name": "Sam Carter",
                "specialization": "stylist",
                "position": {
                  "id": 1,
                  "title": "Administrator"
                },
                "avatar": "http://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "http://app.alteg.io/images/no-master.png",
                "rating": 0,
                "votes_count": 0
              },
              "date": "2026-09-21T23:00:00.000-05:00",
              "datetime": "2026-09-21T23:00:00.000-05:00",
              "create_date": "2026-01-16T20:35:11-0500",
              "comment": "",
              "online": true,
              "visit_attendance": 1,
              "attendance": 1,
              "confirmed": 1,
              "seance_length": 10800,
              "length": 10800,
              "sms_before": 0,
              "sms_now": 0,
              "sms_now_text": "",
              "email_now": 0,
              "notified": 0,
              "master_request": 1,
              "api_id": "",
              "from_url": "",
              "review_requested": 0,
              "visit_id": 8262996,
              "created_user_id": 1073232,
              "deleted": false,
              "paid_full": 0,
              "prepaid": false,
              "prepaid_confirmed": false,
              "last_change_date": "2026-01-09T20:45:30-0500",
              "custom_color": "f44336",
              "custom_font_color": "#ffffff",
              "record_labels": [
                {
                  "id": 67345,
                  "title": "the team member is not important",
                  "color": "#009800",
                  "icon": "unlock",
                  "font_color": "#ffffff"
                },
                {
                  "id": 104474,
                  "title": "important category",
                  "color": "#3b2c54",
                  "icon": "star",
                  "font_color": "#ffffff"
                }
              ],
              "activity_id": 0,
              "custom_fields": {},
              "documents": [
                {
                  "id": 8172893,
                  "type_id": 7,
                  "storage_id": 0,
                  "user_id": 746310,
                  "company_id": 4564,
                  "number": 4163,
                  "comment": "",
                  "date_created": "2026-09-21T23:00:00.000-05:00",
                  "category_id": 0,
                  "visit_id": 3,
                  "record_id": 2,
                  "type_title": "Visit"
                }
              ],
              "consumables": [],
              "finance_transactions": []
            }
          ],
          "meta": {
            "page": 1,
            "total_count": 10
          }
        }
      },
      "records_companyid_request_data_types": {
        "title": "Create or Update Appointment Request",
        "type": "object",
        "oneOf": [
          {
            "title": "Standard Appointment",
            "required": [
              "staff_id",
              "services",
              "client",
              "datetime",
              "seance_length"
            ],
            "properties": {
              "activity_id": {
                "type": "integer",
                "enum": [
                  0
                ]
              }
            }
          },
          {
            "title": "Group Event Appointment",
            "required": [
              "activity_id",
              "client"
            ],
            "properties": {
              "activity_id": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        ],
        "properties": {
          "activity_id": {
            "type": "integer",
            "minimum": 0,
            "default": 0,
            "description": "Group Event ID. Required for a Group Event Appointment; omit it or use 0 for a standard Appointment. When updating, the value must match the current Appointment."
          },
          "staff_id": {
            "type": "number",
            "description": "team member ID"
          },
          "services": {
            "type": "array",
            "description": "Service parameters (id, cost, discount)",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "first_cost": {
                  "type": "number",
                  "description": "Initial cost of the service"
                },
                "discount": {
                  "type": "number",
                  "description": "Service discount"
                },
                "cost": {
                  "type": "number",
                  "description": "The total cost of the service",
                  "format": "float"
                }
              }
            }
          },
          "client": {
            "type": "object",
            "properties": {
              "phone": {
                "type": "string",
                "description": "Customer phone number"
              },
              "name": {
                "type": "string",
                "description": "Client name"
              },
              "email": {
                "type": "string",
                "description": "Client Email"
              }
            },
            "description": "Client parameters (phone, name, email)"
          },
          "save_if_busy": {
            "type": "boolean",
            "description": "Whether to keep the appointment if the time is busy or non-working, or give an error"
          },
          "datetime": {
            "type": "string",
            "description": "Date and time of appointment",
            "format": "date-time"
          },
          "seance_length": {
            "type": "number",
            "description": "Appointment duration in seconds. Includes technical_break_duration. To add a technical break without reducing the service time, increase seance_length by the break delta."
          },
          "send_sms": {
            "type": "boolean",
            "description": "Whether to send SMS with the details of the appointment to the client"
          },
          "comment": {
            "type": "string",
            "description": "Appointment Comment"
          },
          "sms_remain_hours": {
            "type": "number",
            "description": "Specifies how many hours before the visit an SMS reminder should be sent to the client. Set to 0 if no reminder is needed."
          },
          "email_remain_hours": {
            "type": "number",
            "description": "Specifies how many hours before the visit an email reminder should be sent to the client. Set to 0 if no reminder is needed."
          },
          "attendance": {
            "type": "number",
            "description": "Appointment status (2 - User confirmed the appointment, 1 - User came, services provided, 0 - user waiting, -1 - user did not show)"
          },
          "api_id": {
            "type": "string",
            "description": "External system ID"
          },
          "custom_color": {
            "type": "string",
            "description": "Appointment color"
          },
          "record_labels": {
            "type": "array",
            "description": "Array of post category IDs",
            "items": {
              "type": "string"
            }
          },
          "technical_break_duration": {
            "oneOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 3600
              },
              {
                "type": "null"
              }
            ],
            "description": "Technical break duration in seconds.\n- Must be in multiples of 300 (5-minute intervals)\n- Maximum value is 3600 (1 hour)\n- If null or not provided, uses location default from Settings → Appointment Log → Technical Breaks\n"
          },
          "custom_fields": {
            "type": "object",
            "properties": {
              "my_custom_field": {
                "type": "integer",
                "format": "int32"
              },
              "some_another_field": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "description": "Custom Appointment Field values keyed by field code.\n\nThe Business User must have both `custom_fields_record_values_read_access` and\n`custom_fields_record_values_edit_access`. When updating an Appointment, supplying\n`custom_fields` does not make the request partial: resend the required main fields\nfor the applicable Appointment type.\n"
          }
        },
        "description": "Request body for creating or fully updating an Appointment.",
        "example": {
          "staff_id": 8886,
          "services": [
            {
              "id": 331,
              "first_cost": 9000,
              "discount": 50,
              "cost": 4500
            },
            {
              "id": 333,
              "first_cost": 2000,
              "discount": 10,
              "cost": 1800
            }
          ],
          "client": {
            "phone": "+13155550175",
            "name": "James Smith",
            "email": "j.smith@example.com"
          },
          "save_if_busy": false,
          "datetime": "2026-09-21T23:00:00.000-05:00",
          "seance_length": 3600,
          "send_sms": true,
          "comment": "test appointment!",
          "sms_remain_hours": 6,
          "email_remain_hours": 24,
          "attendance": 1,
          "api_id": "777",
          "custom_color": "f44336",
          "record_labels": [
            "67345",
            "104474"
          ],
          "custom_fields": {
            "my_custom_field": 123,
            "some_another_field": [
              "first value",
              "second value"
            ]
          }
        }
      },
      "record_companyid_response_data_types": {
        "title": "Root Type for record_companyid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Appointment ID"
              },
              "company_id": {
                "type": "number",
                "description": "location ID"
              },
              "staff_id": {
                "type": "number",
                "description": "team member ID"
              },
              "services": {
                "type": "array",
                "description": "Array of objects with services in the appointment",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Service name"
                    },
                    "cost": {
                      "type": "number",
                      "description": "The total cost of the service",
                      "format": "float"
                    },
                    "cost_to_pay": {
                      "type": "number",
                      "description": "Amount to pay (cost minus discounts/deposits)",
                      "format": "float"
                    },
                    "manual_cost": {
                      "type": "number",
                      "description": "Manual price",
                      "format": "float"
                    },
                    "cost_per_unit": {
                      "type": "number",
                      "description": "Unit cost",
                      "format": "float"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Discount",
                      "format": "float"
                    },
                    "first_cost": {
                      "type": "number",
                      "description": "Initial cost of the service (excluding discounts)",
                      "format": "float"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Quantity"
                    },
                    "assistants": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "description": "Array of assistant team members for this service",
                      "items": {
                        "type": "object"
                      }
                    },
                    "staff_service_link": {
                      "type": "object",
                      "description": "Team member service link configuration",
                      "properties": {
                        "length": {
                          "type": "number",
                          "description": "Service duration in seconds"
                        }
                      }
                    },
                    "company_service_link": {
                      "type": "object",
                      "description": "Location service link configuration",
                      "properties": {
                        "price_min": {
                          "type": "number",
                          "description": "Minimum price"
                        },
                        "price_max": {
                          "type": "number",
                          "description": "Maximum price"
                        }
                      }
                    }
                  }
                }
              },
              "goods_transactions": {
                "type": "array",
                "description": "Array of commodity transactions",
                "items": {
                  "type": "object"
                }
              },
              "staff": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "team member ID"
                  },
                  "api_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "team member External ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "team member name"
                  },
                  "specialization": {
                    "type": "string",
                    "description": "team member specialization"
                  },
                  "position": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Job ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Job title"
                      },
                      "services_binding_type": {
                        "type": "number",
                        "description": "Services binding type"
                      }
                    },
                    "description": "team member's position"
                  },
                  "avatar": {
                    "type": "string",
                    "description": "The path to the file with the team member's avatar"
                  },
                  "avatar_big": {
                    "type": "string",
                    "description": "Let to the file with the team member's profile picture in high resolution"
                  },
                  "rating": {
                    "type": "number",
                    "description": "team member Rating"
                  },
                  "votes_count": {
                    "type": "number",
                    "description": "Number of votes that rated the team member"
                  }
                },
                "description": "team member data object"
              },
              "client": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Customer data (may be empty)",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Client ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Client first name"
                  },
                  "surname": {
                    "type": "string",
                    "description": "Client surname"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "Client middle name"
                  },
                  "patronymic": {
                    "type": "string",
                    "description": "Client middle name (legacy field name; same value as middle_name)"
                  },
                  "display_name": {
                    "type": "string",
                    "description": "Client display name"
                  },
                  "comment": {
                    "type": "string",
                    "description": "Client comment"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Client phone number"
                  },
                  "card": {
                    "type": "string",
                    "description": "Client card number"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client email"
                  },
                  "success_visits_count": {
                    "type": "number",
                    "description": "Number of successful visits"
                  },
                  "fail_visits_count": {
                    "type": "number",
                    "description": "Number of failed visits"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Client discount"
                  },
                  "is_new": {
                    "type": "boolean",
                    "description": "Is new client flag"
                  },
                  "custom_fields": {
                    "type": "array",
                    "description": "Client custom fields",
                    "items": {
                      "type": "object"
                    }
                  },
                  "gender": {
                    "type": "number",
                    "description": "Client gender (0 - not specified, 1 - male, 2 - female)"
                  },
                  "sex": {
                    "type": "number",
                    "description": "Client sex (alias for gender: 0 - not specified, 1 - male, 2 - female)"
                  },
                  "birthday": {
                    "type": "string",
                    "description": "Client birthday"
                  },
                  "client_tags": {
                    "type": "array",
                    "description": "Client tags",
                    "items": {
                      "type": "object"
                    }
                  },
                  "phone_country_id": {
                    "type": "number",
                    "description": "Phone country ID"
                  }
                }
              },
              "date": {
                "type": "string",
                "description": "Session date",
                "format": "date-time"
              },
              "datetime": {
                "type": "string",
                "description": "Session date in ISO",
                "format": "date-time"
              },
              "create_date": {
                "type": "string",
                "description": "Session creation date",
                "format": "date-time"
              },
              "comment": {
                "type": "string",
                "description": "Appointment Comment"
              },
              "online": {
                "type": "boolean",
                "description": "(Read only) Whether the appointment is online or not (false if the appointment was made by an administrator)"
              },
              "visit_attendance": {
                "type": "number",
                "description": "Visit status, 2 - The user confirmed the appointment, 1 - The user came, the services were provided, 0 - the user is waiting, -1 - the user did not come to the visit"
              },
              "attendance": {
                "type": "number",
                "description": "Appointment status, 2 - User confirmed the appointment, 1 - The user has arrived, services have been rendered, 0 - the user is waiting, -1 - the user has not come to visit"
              },
              "confirmed": {
                "type": "number",
                "description": "Appointment confirmation status, 0 - not confirmed, 1 - confirmed"
              },
              "seance_length": {
                "type": "number",
                "description": "Appointment duration in seconds. Includes technical_break_duration. Equal to the sum of services plus the technical break."
              },
              "length": {
                "type": "number",
                "description": "Appointment duration in seconds. Alias of seance_length. Includes technical_break_duration."
              },
              "sms_before": {
                "type": "number",
                "description": "Whether to send an SMS reminder to the client (if the client is specified)"
              },
              "sms_now": {
                "type": "number",
                "description": "Did you send SMS when adding an appointment"
              },
              "sms_now_text": {
                "type": "string",
                "description": "SMS text"
              },
              "email_now": {
                "type": "number",
                "description": "Has an email notification been sent?"
              },
              "notified": {
                "type": "number",
                "description": "Flag for confirmation of the appointment by the location administrator, if the client asked to confirm the appointment"
              },
              "master_request": {
                "type": "number",
                "description": "Indicates whether a specific team member was selected for the appointment. Set to false if the \"any team member\" option was chosen"
              },
              "api_id": {
                "type": "string",
                "description": "External appointment ID"
              },
              "from_url": {
                "type": "string",
                "description": "From which page the transition was made to complete the appointment (website, VK application, etc.)"
              },
              "review_requested": {
                "type": "number",
                "description": "Flag for requesting visit feedback from the client"
              },
              "is_remind_sms_sent": {
                "type": "boolean",
                "description": "Has reminder SMS been sent"
              },
              "visit_id": {
                "type": "number",
                "description": "Visit ID"
              },
              "created_user_id": {
                "type": "number",
                "description": "ID of the user who created the appointment"
              },
              "deleted": {
                "type": "boolean",
                "description": "(Read only) Whether the appointment was deleted (true if deleted)"
              },
              "paid_full": {
                "type": "number",
                "description": "Flag, whether the appointment is paid in full (1 - if paid in full)"
              },
              "prepaid": {
                "type": "boolean",
                "description": "Is online payment available"
              },
              "prepaid_confirmed": {
                "type": "boolean",
                "description": "Online payment status"
              },
              "last_change_date": {
                "type": "string",
                "description": "The date and time when the appointment was last modified",
                "format": "date-time"
              },
              "custom_color": {
                "type": "string",
                "description": "Log appointment color"
              },
              "custom_font_color": {
                "type": "string",
                "description": "(Only when reading) Write font color"
              },
              "record_labels": {
                "type": "array",
                "description": "Array of appointment categories",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Category ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "name of category"
                    },
                    "color": {
                      "type": "string",
                      "description": "Category color"
                    },
                    "icon": {
                      "type": "string",
                      "description": "Icon"
                    },
                    "font_color": {
                      "type": "string",
                      "description": "Category font color"
                    }
                  }
                }
              },
              "activity_id": {
                "type": "number",
                "description": "Group event ID"
              },
              "custom_fields": {
                "type": [
                  "object",
                  "array"
                ],
                "description": "Custom appointment fields (object or empty array)"
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Document Type"
                    },
                    "storage_id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "user_id": {
                      "type": "number",
                      "description": "ID of the user who created the document"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "number": {
                      "type": "number",
                      "description": "Document Number"
                    },
                    "comment": {
                      "type": "string",
                      "description": "Document comment"
                    },
                    "date_created": {
                      "type": "string",
                      "description": "Document creation date",
                      "format": "date-time"
                    },
                    "category_id": {
                      "type": "integer",
                      "description": "Product category ID",
                      "format": "int32"
                    },
                    "visit_id": {
                      "type": "integer",
                      "description": "Visit ID"
                    },
                    "record_id": {
                      "type": "integer",
                      "description": "Appointment ID"
                    },
                    "type_title": {
                      "type": "string",
                      "description": "The name of the entity to which the document belongs"
                    },
                    "is_sale_bill_printed": {
                      "type": "boolean",
                      "description": "Is the sales receipt printed?"
                    }
                  }
                }
              },
              "sms_remain_hours": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "How many hours before the start of the visit to send an SMS with a reminder"
              },
              "email_remain_hours": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "How many hours before the start of the visit to send a reminder email"
              },
              "bookform_id": {
                "type": "number",
                "description": "Online Appointment Form ID"
              },
              "record_from": {
                "type": "string",
                "description": "Name of online registration form"
              },
              "is_mobile": {
                "type": "number",
                "description": "Type of device used to register (0 - appointment created by administrator, via web version or mobile app for administrators, 1 - Mobile browser, online appointment widget, 2 - Desktop browser, online appointment widget)"
              },
              "is_sale_bill_printed": {
                "type": "boolean",
                "description": "Is the sales receipt printed?"
              },
              "consumables": {
                "type": "array",
                "description": "Consumable Array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Transaction ID"
                    },
                    "document_id": {
                      "type": "integer",
                      "description": "Document ID"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Transaction type"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "good_id": {
                      "type": "number",
                      "description": "Item ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Quantity of products"
                    },
                    "cost_per_unit": {
                      "type": "number",
                      "description": "Unit price",
                      "format": "double"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Discount"
                    },
                    "cost": {
                      "type": "number",
                      "description": "the total cost",
                      "format": "double"
                    },
                    "unit_id": {
                      "type": "number",
                      "description": "Unit ID"
                    },
                    "operation_unit_type": {
                      "type": "number",
                      "description": "Unit type: 1 - for sale, 2 - for write-off"
                    },
                    "storage_id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "supplier_id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "client_id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Transaction creation date",
                      "format": "date-time"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "service_id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "user_id": {
                      "type": "number",
                      "description": "User ID"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Status deleted transaction, 1 - if deleted"
                    },
                    "pkg_amount": {
                      "type": "number",
                      "description": "Number of packages"
                    }
                  }
                }
              },
              "finance_transactions": {
                "type": "array",
                "description": "Array of financial transactions",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Financial transaction ID"
                    },
                    "document_id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "date": {
                      "type": "string",
                      "description": "date of creation",
                      "format": "date-time"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Payment item type"
                    },
                    "expense_id": {
                      "type": "number",
                      "description": "Payment Item ID"
                    },
                    "account_id": {
                      "type": "number",
                      "description": "Checkout ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Transaction amount",
                      "format": "float"
                    },
                    "client_id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "supplier_id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "item_id": {
                      "type": "number",
                      "description": "Item ID (0 if item is a category)"
                    },
                    "target_type_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "record_id": {
                      "type": "number",
                      "description": "Appointment ID"
                    },
                    "goods_transaction_id": {
                      "type": "number",
                      "description": "Commodity transaction ID"
                    },
                    "expense": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Payment Item ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Name of payment item"
                        }
                      },
                      "description": "Payment item"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Checkout ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Location account name"
                        }
                      },
                      "description": "Location account"
                    },
                    "client": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Client ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Client name"
                        },
                        "phone": {
                          "type": "string",
                          "description": "Customer phone"
                        }
                      }
                    },
                    "master": {
                      "type": "array",
                      "description": "team members",
                      "items": {
                        "type": "object"
                      }
                    },
                    "supplier": {
                      "type": "array",
                      "description": "Suppliers",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              },
              "acceptance_free": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Acceptance free flag"
              },
              "clients_count": {
                "type": "number",
                "description": "Number of clients in appointment"
              },
              "comer": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Comer flag"
              },
              "comer_person_info": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Comer person information"
              },
              "is_update_blocked": {
                "type": "boolean",
                "description": "Update blocked flag"
              },
              "payment_status": {
                "type": [
                  "string",
                  "number"
                ],
                "description": "Payment status"
              },
              "resource_instance_ids": {
                "type": "array",
                "description": "Resource instance IDs",
                "items": {
                  "type": "number"
                }
              },
              "short_link": {
                "type": "string",
                "description": "Short link to appointment"
              },
              "technical_break_duration": {
                "type": "number",
                "description": "Technical break duration in seconds"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get an Appointment",
        "example": {
          "success": true,
          "data": {
            "id": 2,
            "company_id": 4564,
            "staff_id": 9,
            "services": [
              {
                "id": 1,
                "title": "Hair extension",
                "cost": 100,
                "manual_cost": 100,
                "cost_per_unit": 100,
                "discount": 0,
                "first_cost": 100,
                "amount": 1
              }
            ],
            "goods_transactions": [],
            "staff": {
              "id": 9,
              "name": "Alex Taylor",
              "specialization": "hair extension",
              "position": {
                "id": 1,
                "title": "Administrator"
              },
              "avatar": "http://app.alteg.io/images/no-master-sm.png",
              "avatar_big": "http://app.alteg.io/images/no-master.png",
              "rating": 0,
              "votes_count": 0
            },
            "client": {
              "id": 18936825,
              "name": "lx",
              "phone": "+13155550175",
              "card": "",
              "email": "client@example.com",
              "success_visits_count": 37,
              "fail_visits_count": 3
            },
            "clients_count": 1,
            "date": "2026-09-21T23:00:00.000-05:00",
            "datetime": "2026-09-21T23:00:00.000-05:00",
            "create_date": "2026-01-17T19:41:44-0500",
            "comment": "do not write down",
            "visit_attendance": 0,
            "attendance": 0,
            "confirmed": 1,
            "seance_length": 3600,
            "length": 3600,
            "sms_before": 0,
            "sms_now": 0,
            "sms_now_text": "",
            "email_now": 0,
            "notified": 0,
            "master_request": 0,
            "api_id": "",
            "from_url": "",
            "review_requested": 0,
            "visit_id": 8263004,
            "created_user_id": 1073232,
            "deleted": false,
            "paid_full": 0,
            "prepaid": false,
            "prepaid_confirmed": false,
            "last_change_date": "2026-01-17T19:44:14-0500",
            "custom_color": "f44336",
            "custom_font_color": "#ffffff",
            "record_labels": [
              {
                "id": 67345,
                "title": "the team member is not important",
                "color": "#009800",
                "icon": "unlock",
                "font_color": "#ffffff"
              },
              {
                "id": 104474,
                "title": "interesting category",
                "color": "#3b2c54",
                "icon": "star",
                "font_color": "#ffffff"
              }
            ],
            "activity_id": 0,
            "custom_fields": {},
            "documents": [
              {
                "id": 8172893,
                "type_id": 7,
                "storage_id": 0,
                "user_id": 1073232,
                "company_id": 4564,
                "number": 4163,
                "comment": "",
                "date_created": "2026-09-21T23:00:00.000-05:00",
                "category_id": 0,
                "visit_id": 3,
                "record_id": 2,
                "type_title": "Visit"
              }
            ],
            "sms_remain_hours": 5,
            "email_remain_hours": 1,
            "bookform_id": 0,
            "record_from": "",
            "is_mobile": 0,
            "is_sale_bill_printed": false,
            "consumables": [
              {
                "id": 2173068,
                "document_id": 8174153,
                "type_id": 2,
                "company_id": 4564,
                "good_id": 4853087,
                "amount": -1,
                "cost_per_unit": 0.03,
                "discount": 0,
                "cost": 0.03,
                "unit_id": 216761,
                "operation_unit_type": 2,
                "storage_id": 91548,
                "supplier_id": 0,
                "client_id": 0,
                "master_id": 0,
                "create_date": "2026-09-21T23:00:00.000-05:00",
                "comment": "",
                "service_id": 1,
                "user_id": 1073232,
                "deleted": false,
                "pkg_amount": 0
              }
            ],
            "finance_transactions": [
              {
                "id": 6024243,
                "document_id": 8174152,
                "date": "2026-09-21T23:00:00.000-05:00",
                "type_id": 5,
                "expense_id": 5,
                "account_id": 90459,
                "amount": 100,
                "client_id": 18936825,
                "master_id": 0,
                "supplier_id": 0,
                "comment": "",
                "item_id": 1,
                "target_type_id": 1,
                "record_id": 2,
                "goods_transaction_id": 0,
                "expense": {
                  "id": 5,
                  "title": "Provision of services"
                },
                "account": {
                  "id": 90459,
                  "title": "Main location account"
                },
                "client": {
                  "id": 18936825,
                  "name": "lx",
                  "phone": "+13155550175"
                },
                "master": [],
                "supplier": []
              }
            ]
          },
          "meta": []
        }
      },
      "record_companyid_response201_data_types": {
        "title": "Root Type for record_companyid_response201_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "services": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "first_cost": {
                      "type": "number",
                      "description": "Initial cost of the service (excluding discounts)",
                      "format": "float"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Discount",
                      "format": "float"
                    },
                    "cost": {
                      "type": "number",
                      "description": "The total cost of the service",
                      "format": "float"
                    }
                  }
                }
              },
              "client": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "description": "Customer phone"
                  },
                  "name": {
                    "type": "string",
                    "description": "Client name"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client Email"
                  }
                }
              },
              "clients_count": {
                "type": "number",
                "description": "Number of occupied places in a group appointment"
              },
              "staff": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "team member ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "team member name"
                  },
                  "spec": {
                    "type": "string",
                    "description": "team member specialization"
                  }
                }
              },
              "datetime": {
                "type": "string",
                "description": "Session date",
                "format": "date-time"
              },
              "seance_length": {
                "type": "number",
                "description": "Appointment duration in seconds. Includes technical_break_duration. Equal to the sum of services plus the technical break."
              },
              "create_date": {
                "type": "string",
                "description": "date of creation",
                "format": "date-time"
              },
              "comment": {
                "type": "string",
                "description": "Appointment Comment"
              },
              "confirmed": {
                "type": "number",
                "description": "Is the appointment verified?"
              },
              "sms_before": {
                "type": "number",
                "description": "Whether to send an SMS reminder to the client (if the client is specified)"
              },
              "sms_now": {
                "type": "number",
                "description": "Did you send SMS when adding an appointment"
              },
              "sms_now_text": {
                "type": "string",
                "description": "SMS text"
              },
              "email_now": {
                "type": "number",
                "description": "Has an email notification been sent?"
              },
              "notified": {
                "type": "number",
                "description": "Flag for confirmation of the appointment by the location administrator, if the client asked to confirm the appointment"
              },
              "master_request": {
                "type": "number",
                "description": "Indicates whether a specific team member was selected for the appointment. Set to false if the \"any team member\" option was chosen"
              },
              "api_id": {
                "type": "string",
                "description": "External appointment ID"
              },
              "from_url": {
                "type": "string",
                "description": "From which page the transition was made to complete the appointment (website, VK application, etc.)"
              },
              "review_requested": {
                "type": "number",
                "description": "Flag for requesting visit feedback from the client"
              },
              "activity_id": {
                "type": "number",
                "description": "Group  event ID"
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Document type"
                    },
                    "storage_id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "user_id": {
                      "type": "number",
                      "description": "ID of the user who created the document"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "number": {
                      "type": "number",
                      "description": "Document Number"
                    },
                    "comment": {
                      "type": "string",
                      "description": "Document comment"
                    },
                    "date_created": {
                      "type": "string",
                      "description": "Document creation date",
                      "format": "date-time"
                    },
                    "category_id": {
                      "type": "integer",
                      "description": "Product category ID",
                      "format": "int32"
                    },
                    "visit_id": {
                      "type": "integer",
                      "description": "Visit ID"
                    },
                    "record_id": {
                      "type": "integer",
                      "description": "Appointment ID"
                    },
                    "type_title": {
                      "type": "string",
                      "description": "The name of the entity to which the document belongs"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Edit Appointment",
        "example": {
          "success": true,
          "data": {
            "id": 999,
            "services": [
              {
                "id": 331,
                "first_cost": 9000,
                "discount": 50,
                "cost": 4500
              },
              {
                "id": 333,
                "first_cost": 2000,
                "discount": 10,
                "cost": 1800
              }
            ],
            "client": {
              "phone": "+13155550175",
              "name": "James Smith",
              "email": "j.smith@example.com"
            },
            "clients_count": 1,
            "staff": {
              "id": 8886,
              "name": "Alice Smith",
              "spec": "stylist"
            },
            "datetime": "2026-09-21T23:00:00.000-05:00",
            "seance_length": 3600,
            "create_date": "2026-09-21T23:00:00.000-05:00",
            "comment": "test appointment!",
            "visit_attendance": 1,
            "confirmed": 1,
            "sms_before": 6,
            "sms_now": 1,
            "sms_now_text": "",
            "email_now": 1,
            "notified": 0,
            "master_request": 1,
            "api_id": "",
            "from_url": "",
            "review_requested": 0,
            "activity_id": 0,
            "documents": [
              {
                "id": 8172893,
                "type_id": 7,
                "storage_id": 0,
                "user_id": 746310,
                "company_id": 4564,
                "number": 4163,
                "comment": "",
                "date_created": "2026-09-21T23:00:00.000-05:00",
                "category_id": 0,
                "visit_id": 3,
                "record_id": 2,
                "type_title": "Visit"
              }
            ]
          },
          "meta": []
        }
      },
      "400_bad_request_response": {
        "type": "object",
        "properties": {
          "success": {
            "$ref": "#/components/schemas/response_success_false_object"
          },
          "data": {
            "$ref": "#/components/schemas/response_data_null_object"
          },
          "meta": {
            "$ref": "#/components/schemas/response_meta_validation_exception_object"
          }
        }
      },
      "visits_visitid_data_types": {
        "title": "Root Type for visits_visitid_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "attendance": {
                "type": "number",
                "description": "Visit status"
              },
              "datetime": {
                "type": "string",
                "description": "Date of visit",
                "format": "date-time"
              },
              "comment": {
                "type": "integer",
                "description": "A comment",
                "format": "int32"
              },
              "records": {
                "type": "array",
                "description": "Appointment array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Appointment ID"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "staff_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "services": {
                      "type": "array",
                      "description": "Services Array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "goods_transactions": {
                      "type": "array",
                      "description": "Array of commodity transactions",
                      "items": {
                        "type": "object"
                      }
                    },
                    "staff": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "team member ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "team member name"
                        },
                        "specialization": {
                          "type": "string",
                          "description": "team member specialization"
                        },
                        "position": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Job ID"
                            },
                            "title": {
                              "type": "string",
                              "description": "Job Title"
                            }
                          },
                          "description": "team member's position"
                        },
                        "avatar": {
                          "type": "string",
                          "description": "The path to the file with the team member's avatar"
                        },
                        "avatar_big": {
                          "type": "string",
                          "description": "Path to a file with a higher resolution team member avatar"
                        },
                        "rating": {
                          "type": "number",
                          "description": "Rating",
                          "format": "double"
                        },
                        "votes_count": {
                          "type": "number",
                          "description": "Number of votes that rated the team member"
                        }
                      },
                      "description": "team member Information"
                    },
                    "client": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Client ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Client name"
                        },
                        "phone": {
                          "type": "string",
                          "description": "Customer phone number"
                        },
                        "card": {
                          "type": "string",
                          "description": "Client card number"
                        },
                        "email": {
                          "type": "string",
                          "description": "Client's email address"
                        },
                        "success_visits_count": {
                          "type": "number",
                          "description": "Number of customer visits, in the \"Customer arrived\" status"
                        },
                        "fail_visits_count": {
                          "type": "number",
                          "description": "Number of canceled customer visits"
                        }
                      },
                      "description": "Client Information"
                    },
                    "date": {
                      "type": "string",
                      "description": "Date of visit",
                      "format": "date-time"
                    },
                    "datetime": {
                      "type": "string",
                      "description": "Date of visit in ISO format",
                      "format": "date-time"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "Date the visit was created",
                      "format": "date-time"
                    },
                    "comment": {
                      "type": "string",
                      "description": "Commentary on the visit"
                    },
                    "online": {
                      "type": "boolean",
                      "description": "(Read only) Whether the appointment is online or not (false if the appointment was made by an administrator)"
                    },
                    "visit_attendance": {
                      "type": "number",
                      "description": "Visit status"
                    },
                    "attendance": {
                      "type": "number",
                      "description": "Status of the appointment in the visit"
                    },
                    "confirmed": {
                      "type": "number",
                      "description": "Is the appointment verified?"
                    },
                    "seance_length": {
                      "type": "number",
                      "description": "Appointment duration in seconds. Includes technical_break_duration. Equal to the sum of services plus the technical break."
                    },
                    "length": {
                      "type": "number",
                      "description": "Appointment duration in seconds. Alias of seance_length. Includes technical_break_duration."
                    },
                    "sms_before": {
                      "type": "number",
                      "description": "Whether to send an SMS reminder to the client (if the client is specified)"
                    },
                    "sms_now": {
                      "type": "number",
                      "description": "Did you send SMS when adding an appointment"
                    },
                    "sms_now_text": {
                      "type": "string",
                      "description": "SMS text"
                    },
                    "email_now": {
                      "type": "number",
                      "description": "Has an email notification been sent?"
                    },
                    "notified": {
                      "type": "number",
                      "description": "Flag for confirmation of the appointment by the location administrator, if the client asked to confirm the appointment"
                    },
                    "master_request": {
                      "type": "number",
                      "description": "Indicates whether a specific team member was selected for the appointment. Set to false if the \"any team member\" option was chosen"
                    },
                    "api_id": {
                      "type": "string",
                      "description": "External appointment ID"
                    },
                    "from_url": {
                      "type": "string",
                      "description": "From which page the transition was made to complete the appointment (website, VK application, etc.)"
                    },
                    "review_requested": {
                      "type": "number",
                      "description": "Flag for requesting visit feedback from the client"
                    },
                    "activity_id": {
                      "type": "number",
                      "description": "Group event ID"
                    },
                    "documents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Document ID"
                          },
                          "type_id": {
                            "type": "number",
                            "description": "Document type"
                          },
                          "storage_id": {
                            "type": "number",
                            "description": "Inventory ID"
                          },
                          "user_id": {
                            "type": "number",
                            "description": "ID of the user who created the document"
                          },
                          "company_id": {
                            "type": "number",
                            "description": "location ID"
                          },
                          "number": {
                            "type": "number",
                            "description": "Document Number"
                          },
                          "comment": {
                            "type": "string",
                            "description": "Document comment"
                          },
                          "date_created": {
                            "type": "string",
                            "description": "Document creation date",
                            "format": "date-time"
                          },
                          "category_id": {
                            "type": "integer",
                            "description": "Product category ID",
                            "format": "int32"
                          },
                          "visit_id": {
                            "type": "integer",
                            "description": "Visit ID"
                          },
                          "record_id": {
                            "type": "integer",
                            "description": "Appointment ID"
                          },
                          "type_title": {
                            "type": "string",
                            "description": "The name of the entity to which the document belongs"
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a visit",
        "example": {
          "success": true,
          "data": {
            "attendance": 1,
            "datetime": "2026-09-21T23:00:00.000-05:00",
            "comment": 0,
            "records": [
              {
                "id": 37955315,
                "company_id": 4564,
                "staff_id": 55436,
                "services": [],
                "events": [],
                "goods_transactions": [],
                "staff": {
                  "id": 55436,
                  "name": "John Doe",
                  "specialization": "Manicure and pedicure",
                  "position": {
                    "id": 1,
                    "title": "Supervisor"
                  },
                  "avatar": "https://app.alteg.io/uploads/masters/sm/b/bb/bb59d4cc17d9b16_20171215174158.png",
                  "avatar_big": "https://app.alteg.io/uploads/masters/origin/c/cf/cfb8c5cee58000b_20171215174158.png",
                  "rating": 4.89,
                  "votes_count": 0
                },
                "client": {
                  "id": 4240788,
                  "name": "dev1",
                  "phone": 13155550175,
                  "card": 415,
                  "email": "",
                  "success_visits_count": 58,
                  "fail_visits_count": 9
                },
                "date": "2026-09-21T23:00:00.000-05:00",
                "datetime": "2026-09-21T23:00:00.000-05:00",
                "create_date": "2026-03-22T17:55:14-05:00",
                "comment": "",
                "online": false,
                "visit_attendance": 1,
                "attendance": 1,
                "confirmed": 1,
                "seance_length": 3600,
                "length": 3600,
                "sms_before": 1,
                "sms_now": 1,
                "sms_now_text": "",
                "email_now": 1,
                "notified": 0,
                "master_request": 0,
                "api_id": "0",
                "from_url": "",
                "review_requested": 0,
                "visit_id": 8260852,
                "created_user_id": 999290,
                "deleted": 0,
                "paid_full": 0,
                "prepaid": 0,
                "prepaid_confirmed": 0,
                "last_change_date": "2026-03-28T17:46:48-05:00",
                "custom_color": "",
                "custom_font_color": "",
                "record_labels": [],
                "activity_id": 0,
                "custom_fields": {},
                "documents": [
                  {
                    "id": 8172893,
                    "type_id": 7,
                    "storage_id": 0,
                    "user_id": 746310,
                    "company_id": 4564,
                    "number": 4163,
                    "comment": "",
                    "date_created": "2026-09-21T23:00:00.000-05:00",
                    "category_id": 0,
                    "visit_id": 3,
                    "record_id": 2,
                    "type_title": "Visit"
                  }
                ]
              }
            ]
          },
          "meta": []
        }
      },
      "visit_details_data_types": {
        "title": "Root Type for visit_details_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "payment_transactions": {
                "type": "array",
                "description": "Payment transactions",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Payment transaction ID"
                    },
                    "document_id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "date": {
                      "type": "string",
                      "description": "Transaction date",
                      "format": "date-time"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Transaction type"
                    },
                    "expense_id": {
                      "type": "number",
                      "description": "Payment Item ID"
                    },
                    "account_id": {
                      "type": "number",
                      "description": "Checkout ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Payment amount"
                    },
                    "client_id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "supplier_id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "item_id": {
                      "type": "number",
                      "description": "Item ID"
                    },
                    "target_type_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "record_id": {
                      "type": "number",
                      "description": "Appointment ID"
                    },
                    "goods_transaction_id": {
                      "type": "number",
                      "description": "Commodity transaction ID"
                    },
                    "expense": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Payment Item ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Name of payment item"
                        }
                      },
                      "description": "Payment item"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Checkout ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Location account name"
                        }
                      },
                      "description": "Location account"
                    },
                    "client": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Client ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Client name"
                        },
                        "phone": {
                          "type": "string",
                          "description": "Phone number"
                        }
                      },
                      "description": "Customer"
                    },
                    "master": {
                      "type": "array",
                      "description": "team member",
                      "items": {
                        "type": "object"
                      }
                    },
                    "supplier": {
                      "type": "array",
                      "description": "The supplier",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              },
              "loyalty_transactions": {
                "type": "array",
                "description": "Loyalty transactions",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Transaction ID"
                    },
                    "status_id": {
                      "type": "number",
                      "description": "Transaction status ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Loyalty payment amount",
                      "format": "double"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Type of loyalty transaction"
                    },
                    "program_id": {
                      "type": "number",
                      "description": "Loyalty program ID"
                    },
                    "card_id": {
                      "type": "number",
                      "description": "Loyalty card ID"
                    },
                    "salon_group_id": {
                      "type": "number",
                      "description": "ID of the location chain, within the loyalty of which this transaction was created"
                    },
                    "item_id": {
                      "type": "number",
                      "description": "Position ID in the order, if the transaction is related to the sale of a product or service"
                    },
                    "item_type_id": {
                      "type": "number",
                      "description": "Item type in the order to which this transaction relates (1 Provision of service, 7 Sale of products), if applicable"
                    },
                    "item_record_id": {
                      "type": "number",
                      "description": "ID of the appointment to which the item in the order belongs, if applicable"
                    },
                    "goods_transaction_id": {
                      "type": "number",
                      "description": "Item sale transaction ID"
                    },
                    "is_discount": {
                      "type": "boolean"
                    },
                    "is_loyalty_withdraw": {
                      "type": "boolean"
                    },
                    "type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "title": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "kkm_transaction_details_container": {
                "type": "object",
                "properties": {
                  "last_operation_type": {
                    "type": "number",
                    "description": "Type of last KKM operation"
                  },
                  "transactions": {
                    "type": "array",
                    "description": "KKM transaction",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Transaction ID"
                        },
                        "print_date": {
                          "type": "string",
                          "description": "Check printing date",
                          "format": "date-time"
                        },
                        "printed_count": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "sum": {
                          "type": "number",
                          "description": "Payment amount with an accuracy of 2 decimal places",
                          "format": "float"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Payment type ID"
                            },
                            "title": {
                              "type": "string",
                              "description": "Payment type name"
                            }
                          },
                          "description": "Payment type"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Status ID"
                            },
                            "title": {
                              "type": "string",
                              "description": "Status name"
                            }
                          },
                          "description": "Receipt printing status"
                        },
                        "document": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Document ID"
                            },
                            "type": {
                              "type": "number",
                              "description": "Document type identifier"
                            },
                            "type_title": {
                              "type": "string",
                              "description": "Document entity name"
                            }
                          },
                          "description": "document"
                        },
                        "cashier": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "team member ID"
                            },
                            "name": {
                              "type": "string",
                              "description": "team member name"
                            }
                          },
                          "description": "Cashier"
                        }
                      }
                    }
                  }
                },
                "description": "KKM transaction details"
              },
              "items": {
                "type": "array",
                "description": "Array of products/services",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Array entity ID"
                    },
                    "item_id": {
                      "type": "number",
                      "description": "Product or service identifier"
                    },
                    "item_type_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "record_id": {
                      "type": "number",
                      "description": "Appointment ID"
                    },
                    "item_title": {
                      "type": "string",
                      "description": "Name of the product or service"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Quantity"
                    },
                    "first_cost": {
                      "type": "number",
                      "description": "Initial cost",
                      "format": "float"
                    },
                    "manual_cost": {
                      "type": "number",
                      "description": "Manual price",
                      "format": "float"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Discount",
                      "format": "float"
                    },
                    "cost": {
                      "type": "number",
                      "description": "Final price minus all discounts and promotions",
                      "format": "float"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "good_id": {
                      "type": "number",
                      "description": "Item ID"
                    },
                    "service_id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "event_id": {
                      "type": "number",
                      "description": "Promotion ID"
                    },
                    "is_service": {
                      "type": "boolean",
                      "description": "This is a service"
                    },
                    "is_event": {
                      "type": "boolean",
                      "description": "This is a promotion"
                    },
                    "is_good": {
                      "type": "boolean",
                      "description": "This is a product"
                    }
                  },
                  "description": "Sale objects array"
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get Visit Details",
        "example": {
          "success": true,
          "data": {
            "payment_transactions": [
              {
                "id": 6023813,
                "document_id": 8172806,
                "date": "2026-09-21T23:00:00.000-05:00",
                "type_id": 5,
                "expense_id": 5,
                "account_id": 32299,
                "amount": 10,
                "client_id": 4241492,
                "master_id": 0,
                "supplier_id": 0,
                "comment": "",
                "item_id": 1162679,
                "target_type_id": 1,
                "record_id": 13136569,
                "goods_transaction_id": 0,
                "expense": {
                  "id": 5,
                  "title": "Provision of services"
                },
                "account": {
                  "id": 32299,
                  "title": "Deposits (payment in cash)"
                },
                "client": {
                  "id": 4241492,
                  "name": "ModulKassaClient",
                  "phone": "+13155550175"
                },
                "master": [],
                "supplier": []
              }
            ],
            "loyalty_transactions": [
              {
                "id": 10614,
                "status_id": 1,
                "amount": 0.5,
                "type_id": 2,
                "program_id": 145,
                "card_id": 20013,
                "salon_group_id": 646,
                "item_id": 0,
                "item_type_id": 0,
                "item_record_id": 0,
                "goods_transaction_id": 0,
                "is_discount": false,
                "is_loyalty_withdraw": false,
                "type": {
                  "id": 2,
                  "title": "Loyalty programs"
                }
              }
            ],
            "kkm_transaction_details_container": {
              "last_operation_type": 0,
              "transactions": [
                {
                  "id": 1047,
                  "print_date": "2026-09-21T23:00:00.000-05:00",
                  "printed_count": 1,
                  "sum": 13,
                  "type": {
                    "id": 0,
                    "title": "Sale operation"
                  },
                  "status": {
                    "id": 1,
                    "title": "Successfully"
                  },
                  "document": {
                    "id": 2045,
                    "type": 7,
                    "type_title": "Visit"
                  },
                  "cashier": {
                    "id": 746310,
                    "name": "Jack Smith"
                  }
                }
              ]
            },
            "items": [
              {
                "id": 0,
                "item_id": 1162679,
                "item_type_id": 1,
                "record_id": 13136569,
                "item_title": "Haircut with the TOP-expert",
                "amount": 2,
                "first_cost": 20,
                "manual_cost": 10,
                "discount": 50,
                "cost": 10,
                "master_id": 13136569,
                "good_id": 0,
                "service_id": 1162679,
                "event_id": 0,
                "is_service": true,
                "is_event": false,
                "is_good": false
              }
            ]
          },
          "meta": []
        }
      },
      "visits_visitid_recordid_request_data_types": {
        "title": "Root Type for visits_visitid_recordid_request_data_types",
        "required": [
          "attendance",
          "comment"
        ],
        "type": "object",
        "properties": {
          "attendance": {
            "type": "number",
            "description": "Visit status (2 - The user confirmed the appointment, 1 - The user came, the services were provided, 0 - the user is waiting, -1 - the user did not show)"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          },
          "new_transactions": {
            "type": "array",
            "description": "Array of objects of new commodity transactions",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Financial transaction ID"
                },
                "amount": {
                  "type": "number",
                  "description": "Sum",
                  "format": "float"
                },
                "account_id": {
                  "type": "number",
                  "description": "Checkout ID"
                }
              }
            }
          },
          "deleted_transaction_ids": {
            "type": "array",
            "description": "Array of instance IDs",
            "items": {
              "type": "object"
            }
          },
          "goods_transactions": {
            "type": "array",
            "description": "Array of commodity transactions objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Inventory transaction ID"
                },
                "title": {
                  "type": "string",
                  "description": "Barcode"
                },
                "barcode": {
                  "type": "string",
                  "description": "Barcode"
                },
                "article": {
                  "type": "string",
                  "description": "vendor code"
                },
                "amount": {
                  "type": "string",
                  "description": "Sum"
                },
                "cost_per_unit": {
                  "type": "string",
                  "description": "Unit price"
                },
                "price": {
                  "type": "string",
                  "description": "Price"
                },
                "cost": {
                  "type": "string",
                  "description": "Selling price"
                },
                "operation_unit_type": {
                  "type": "number",
                  "description": "Unit type: 1 - for sale, 2 - for write-off"
                },
                "master_id": {
                  "type": "string",
                  "description": "team member ID"
                },
                "storage_id": {
                  "type": "string",
                  "description": "Inventory ID"
                },
                "good_id": {
                  "type": "string",
                  "description": "Item ID"
                },
                "discount": {
                  "type": "string",
                  "description": "Discount"
                }
              }
            }
          },
          "services": {
            "type": "array",
            "description": "Array of objects with services",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "title": {
                  "type": "string",
                  "description": "Service name"
                },
                "cost": {
                  "type": "number",
                  "description": "The total cost of the service",
                  "format": "float"
                },
                "cost_per_unit": {
                  "type": "number",
                  "description": "Unit price",
                  "format": "float"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount",
                  "format": "float"
                },
                "first_cost": {
                  "type": "number",
                  "description": "Initial cost of the service",
                  "format": "float"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                }
              }
            }
          },
          "fast_payment": {
            "type": "number",
            "description": "Quick payment 1 - cash, 2 - cashless, 129 - cash and print, 130 - cashless and print"
          }
        },
        "description": "Edit Visit",
        "example": {
          "attendance": 1,
          "comment": "",
          "new_transactions": [
            {
              "id": 12345,
              "amount": 100,
              "account_id": 23322
            }
          ],
          "deleted_transaction_ids": [],
          "fast_payment": 1,
          "goods_transactions": [
            {
              "id": 2168657,
              "title": "Vital Creme Shampoo Plus",
              "barcode": "123",
              "article": "120277",
              "amount": -1,
              "cost_per_unit": 15,
              "price": 15,
              "cost": 12,
              "operation_unit_type": 2,
              "master_id": 55436,
              "storage_id": 91303,
              "good_id": 232658,
              "discount": 20
            }
          ],
          "services": [
            {
              "id": 389045,
              "title": "Hand massage (10 min)",
              "cost": 255,
              "cost_per_unit": 300,
              "discount": 15,
              "first_cost": 300,
              "record_id": 10403702
            }
          ]
        }
      },
      "comments_companyid_ressponse200_data_types": {
        "title": "Root Type for comments_companyid_ressponse200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Comment ID"
                },
                "salon_id": {
                  "type": "number",
                  "description": "location ID"
                },
                "type": {
                  "type": "number",
                  "description": "1 - comment to the team member, 0 - to the location"
                },
                "master_id": {
                  "type": "number",
                  "description": "Team Member ID if type = 1"
                },
                "text": {
                  "type": "string",
                  "description": "Comment text"
                },
                "date": {
                  "type": "string",
                  "description": "The date the comment was posted",
                  "format": "date-time"
                },
                "rating": {
                  "type": "string",
                  "description": "Rating (from 1 to 5)"
                },
                "user_id": {
                  "type": "number",
                  "description": "ID of the user who left the comment"
                },
                "user_name": {
                  "type": "string",
                  "description": "Name of the user who left the comment"
                },
                "user_avatar": {
                  "type": "string",
                  "description": "Avatar of the user who left the comment"
                },
                "record_id": {
                  "type": "number",
                  "description": "ID of the post after which the review was left"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get comments",
        "example": {
          "success": true,
          "data": [
            {
              "id": 18437,
              "salon_id": 12345,
              "type": 1,
              "master_id": 8864,
              "text": "Fine!",
              "date": "2026-09-21T23:00:00.000-05:00",
              "rating": 4,
              "user_id": 157169,
              "user_name": "Victor Sitnikov",
              "user_avatar": "/images/no-master.png",
              "record_id": 100001
            }
          ],
          "meta": []
        }
      },
      "comments_companyid_request_data_types": {
        "title": "Root Type for comments_companyid_request_data_types",
        "required": [
          "mark",
          "name",
          "text"
        ],
        "type": "object",
        "properties": {
          "mark": {
            "type": "number",
            "description": "Rating from 1 to 5"
          },
          "text": {
            "type": "string",
            "description": "Feedback text"
          },
          "name": {
            "type": "string",
            "description": "Username to be displayed on the review page"
          }
        },
        "description": "Leave a Comment",
        "example": {
          "mark": 4,
          "text": "Everything is very bad!",
          "name": "Victor"
        }
      },
      "event_search_response": {
        "title": "Event Search Response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Event ID"
                },
                "service_id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "company_id": {
                  "type": "number",
                  "description": "Location ID"
                },
                "staff_id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "date": {
                  "type": "string",
                  "description": "Session date",
                  "format": "date-time"
                },
                "length": {
                  "type": "number",
                  "description": "Duration"
                },
                "capacity": {
                  "type": "number",
                  "description": "Capacity"
                },
                "records_count": {
                  "type": "number",
                  "description": "Number of appointments"
                },
                "color": {
                  "type": "string",
                  "description": "Color"
                },
                "instructions": {
                  "type": "string",
                  "description": "Instructions"
                },
                "stream_link": {
                  "type": "string",
                  "description": "Link to instructions"
                },
                "font_color": {
                  "type": "string",
                  "description": "Font color"
                },
                "notified": {
                  "type": "boolean",
                  "description": "Notifications"
                },
                "prepaid": {
                  "type": "string",
                  "description": "Prepayment"
                },
                "service": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "category_id": {
                      "type": "number",
                      "description": "Service category identifier"
                    },
                    "title": {
                      "type": "string",
                      "description": "Service name"
                    },
                    "price_min": {
                      "type": "number",
                      "description": "The minimum cost of the service",
                      "format": "float"
                    },
                    "price_max": {
                      "type": "number",
                      "description": "Maximum cost of the service",
                      "format": "float"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "image_url": {
                      "type": "string",
                      "description": "The path to the image with the image of the service"
                    },
                    "salon_service_id": {
                      "type": "number",
                      "description": "Category ID for the location on the chain"
                    },
                    "prepaid": {
                      "type": "string",
                      "description": "Prepayment"
                    },
                    "category": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Category ID"
                        },
                        "category_id": {
                          "type": "number",
                          "description": "Product category ID (0 if the item is a product)"
                        },
                        "title": {
                          "type": "string",
                          "description": "name of category"
                        }
                      },
                      "description": "Category"
                    }
                  },
                  "description": "Service"
                },
                "staff": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "api_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "team member External ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "team member name"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "Location ID"
                    },
                    "specialization": {
                      "type": "string",
                      "description": "team member specialization"
                    },
                    "rating": {
                      "type": "number",
                      "description": "Rating",
                      "format": "double"
                    },
                    "show_rating": {
                      "type": "number",
                      "description": "Whether to show the team member's rating (1 - show, 0 - do not show)"
                    },
                    "avatar": {
                      "type": "string",
                      "description": "Path to team member avatar file"
                    },
                    "avatar_big": {
                      "type": "string",
                      "description": "The path to the team member's avatar file in a higher resolution"
                    },
                    "comments_count": {
                      "type": "number",
                      "description": "Number of comments to the team member"
                    },
                    "votes_count": {
                      "type": "number",
                      "description": "Number of votes that rated a team member"
                    },
                    "average_score": {
                      "type": "number",
                      "description": "Average rating",
                      "format": "double"
                    },
                    "prepaid": {
                      "type": "string",
                      "description": "Indicates whether online payment is available for the appointment"
                    },
                    "position": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Job ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Job Title"
                        }
                      },
                      "description": "team member's position"
                    }
                  },
                  "description": "team member"
                },
                "resource_instances": {
                  "type": "array",
                  "description": "Resource instance",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Resource instance ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Resource instance name"
                      },
                      "resource_id": {
                        "type": "number",
                        "description": "Resource ID"
                      }
                    }
                  }
                },
                "labels": {
                  "type": "array",
                  "description": "Post category",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of Events found)"
          }
        },
        "description": "Search Events response",
        "example": {
          "success": true,
          "data": [
            {
              "id": 3480140,
              "service_id": 5243360,
              "company_id": 68570,
              "staff_id": 921105,
              "date": "2026-09-21T23:00:00.000-05:00",
              "length": 3600,
              "capacity": 40,
              "records_count": 0,
              "color": "",
              "instructions": "",
              "stream_link": "",
              "font_color": "",
              "notified": false,
              "prepaid": "forbidden",
              "service": {
                "id": 5243360,
                "category_id": 5092305,
                "title": "Lecture: is it possible to re-educate a perverted narcissist",
                "price_min": 500,
                "price_max": 500,
                "comment": "Spoiler: no.",
                "image_url": "",
                "salon_service_id": 5792535,
                "prepaid": "forbidden",
                "category": {
                  "id": 5092305,
                  "category_id": 1,
                  "title": "Psychoanalysis (service category Natalie)"
                }
              },
              "staff": {
                "id": 921105,
                "name": "Natalie",
                "company_id": 68570,
                "specialization": "Do not touch",
                "rating": 4.57,
                "show_rating": 0,
                "avatar": "https://assets.alteg.io/masters/sm/7/70/70e95a2383e51da_20210426134346.png",
                "avatar_big": "https://assets.alteg.io/masters/origin/7/7d/7da6be6c33a59cd_20210426134346.png",
                "comments_count": 7,
                "votes_count": 0,
                "average_score": 4.57,
                "prepaid": "forbidden",
                "position": {
                  "id": 123340,
                  "title": "Psychotherapist"
                }
              },
              "resource_instances": [
                {
                  "id": 83030,
                  "title": "Psychotherapist's office. #one",
                  "resource_id": 34895
                }
              ],
              "labels": {}
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "event_dates_range": {
        "title": "Event Date Range",
        "type": "object",
        "description": "Date range for Event search.",
        "properties": {
          "min_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start date (YYYY-MM-DD)."
          },
          "max_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "End date (YYYY-MM-DD)."
          }
        },
        "example": {
          "min_date": "2026-06-01",
          "max_date": "2026-07-15"
        }
      },
      "event_filter": {
        "title": "Event Search Filter",
        "type": "object",
        "additionalProperties": true,
        "description": "Event search filter.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Filter type.",
            "enum": [
              "staff",
              "resource",
              "service",
              "service_category"
            ]
          },
          "title": {
            "type": "string",
            "description": "Filter title."
          },
          "data": {
            "type": "array",
            "description": "Filter items.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Filter item ID."
                },
                "title": {
                  "type": "string",
                  "description": "Filter item title."
                },
                "is_disabled": {
                  "type": "boolean",
                  "description": "Flag that filter item is disabled for selection (depends on previously applied filters passed as query parameters)."
                }
              }
            }
          }
        },
        "example": {
          "code": "service",
          "title": "Services",
          "data": [
            {
              "id": 1,
              "title": "Service 1",
              "is_disabled": true
            },
            {
              "id": 2,
              "title": "Service 2",
              "is_disabled": false
            }
          ]
        }
      },
      "event_response": {
        "title": "Event Response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "id": {
                "type": "number",
                "description": "Event ID"
              },
              "salon_id": {
                "type": "number",
                "description": "Location ID (deprecated, use company_id)"
              },
              "company_id": {
                "type": "number",
                "description": "Location ID"
              },
              "service_id": {
                "type": "number",
                "description": "Service ID"
              },
              "staff_id": {
                "type": "number",
                "description": "team member ID"
              },
              "date": {
                "type": "string",
                "description": "Event date and time"
              },
              "timestamp": {
                "type": "number",
                "description": "Unix timestamp of Event date"
              },
              "length": {
                "type": "number",
                "description": "Event duration in seconds"
              },
              "capacity": {
                "type": "number",
                "description": "Capacity"
              },
              "records_count": {
                "type": "number",
                "description": "Number of Appointments in this Event"
              },
              "color": {
                "type": "string",
                "description": "Event color"
              },
              "font_color": {
                "type": "string",
                "description": "Font color"
              },
              "instructions": {
                "type": "string",
                "description": "Event instructions"
              },
              "stream_link": {
                "type": "string",
                "description": "Stream link for online events"
              },
              "notified": {
                "type": "boolean",
                "description": "Whether notifications have been sent"
              },
              "comment": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event comment"
              },
              "prepaid": {
                "type": "string",
                "description": "Prepayment status (forbidden, optional, required)"
              },
              "is_deleted": {
                "type": "boolean",
                "description": "Whether Event is deleted"
              },
              "duration_details": {
                "type": "object",
                "description": "Event duration details",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Duration detail ID"
                  },
                  "services_duration": {
                    "type": "number",
                    "description": "Services duration in seconds"
                  },
                  "technical_break_duration": {
                    "type": "number",
                    "description": "Technical break duration in seconds"
                  }
                }
              },
              "service": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Service ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Service name"
                  },
                  "category_id": {
                    "type": "number",
                    "description": "Service category identifier"
                  }
                },
                "description": "Service"
              },
              "staff": {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "team member ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "team member name"
                  },
                  "company_id": {
                    "type": "number",
                    "description": "Location ID"
                  }
                },
                "description": "team member"
              },
              "resource_instances": {
                "type": "array",
                "description": "Resource instances",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Resource instance ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Resource instance name"
                    },
                    "resource_id": {
                      "type": "number",
                      "description": "Resource ID"
                    }
                  }
                }
              },
              "labels": {
                "type": "array",
                "description": "Event tags",
                "items": {
                  "type": "object"
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Event object with details",
        "example": {
          "success": true,
          "data": {
            "id": 108,
            "salon_id": 4564,
            "service_id": 1185299,
            "staff_id": 26427,
            "date": "2026-09-21T23:00:00.000-05:00",
            "length": 3600,
            "capacity": 9,
            "records_count": 0,
            "color": "",
            "font_color": "",
            "service": {
              "id": 1185299,
              "title": "Group manicure",
              "category_id": 754917
            },
            "staff": {
              "id": 26427,
              "name": "Monica Bellucci",
              "company_id": 4564
            },
            "resource_instances": [
              {
                "id": 3127,
                "title": "Manicure machine #1",
                "resource_id": 1364
              }
            ]
          },
          "meta": []
        }
      },
      "event_request": {
        "title": "Event Request",
        "required": [
          "capacity",
          "date",
          "force",
          "service_id",
          "staff_id"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "date and time",
            "format": "date-time"
          },
          "service_id": {
            "type": "number",
            "description": "Service ID"
          },
          "staff_id": {
            "type": "number",
            "description": "team member ID"
          },
          "capacity": {
            "type": "number",
            "description": "Capacity"
          },
          "resource_instance_ids": {
            "type": "array",
            "description": "Array of resource instance IDs",
            "items": {
              "type": "number"
            }
          },
          "force": {
            "type": "boolean",
            "description": "Ignore errors (busy team member/resources, etc.)"
          },
          "length": {
            "type": "number",
            "description": "Event duration in seconds"
          }
        },
        "description": "Event creation/update request body",
        "example": {
          "date": "2026-10-10 15:30",
          "service_id": 1185299,
          "staff_id": 26427,
          "length": 3600,
          "capacity": 9,
          "resource_instance_ids": [
            3127
          ],
          "force": false
        }
      },
      "event_services_response": {
        "title": "Event Services Response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "title": {
                  "type": "string",
                  "description": "Service name"
                },
                "capacity": {
                  "type": "number",
                  "description": "Capacity"
                },
                "price_min": {
                  "type": "number",
                  "description": "The minimum cost of the service"
                },
                "price_max": {
                  "type": "number",
                  "description": "Maximum cost of the service"
                },
                "is_multi": {
                  "type": "boolean",
                  "description": "Is the Service available for Events"
                },
                "category": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Category ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Service category name"
                    }
                  },
                  "description": "Service category"
                },
                "staff": {
                  "type": "array",
                  "description": "team member",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "team member ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "team member name"
                      },
                      "length": {
                        "type": "number",
                        "description": "Service duration"
                      }
                    }
                  }
                },
                "resources": {
                  "type": "array",
                  "description": "Resources",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Resource ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Resource name"
                      },
                      "salon_id": {
                        "type": "number",
                        "description": "Location ID"
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of services found)"
          }
        },
        "description": "Search Event services response",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1209148,
              "title": "Fitness test",
              "capacity": 5,
              "price_min": 2,
              "price_max": 3,
              "is_multi": true,
              "category": {
                "id": 1285356,
                "title": "Group services"
              },
              "staff": [
                {
                  "id": 37695,
                  "name": "Kim Kardashian",
                  "length": 7200
                }
              ],
              "resources": [
                {
                  "id": 464,
                  "title": "massage room",
                  "salon_id": 4564
                }
              ]
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "resources_companyid_data_types": {
        "title": "Root Type for resources_companyid_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array with data objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Resource ID"
                },
                "title": {
                  "type": "string",
                  "description": "Resource name"
                },
                "instances": {
                  "type": "array",
                  "description": "Array of resource instances",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Resource instance ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Resource instance name"
                      },
                      "resource_id": {
                        "type": "number",
                        "description": "ID of the resource that owns the instance"
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of resources found)"
          }
        },
        "description": "Getting Resources at a Location",
        "example": {
          "success": true,
          "data": [
            {
              "id": 70,
              "title": "Pedicure chair",
              "instances": [
                {
                  "id": 181,
                  "title": "Pedicure chair #1",
                  "resource_id": 70
                }
              ]
            },
            {
              "id": 464,
              "title": "massage room",
              "instances": [
                {
                  "id": 1094,
                  "title": "Massage room 1st floor",
                  "resource_id": 464
                },
                {
                  "id": 1162,
                  "title": "Massage room 2nd floor",
                  "resource_id": 464
                }
              ]
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "tag": {
        "title": "Object of model \"Tag\"",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of tag."
          },
          "title": {
            "type": "string",
            "description": "Title of a tag."
          },
          "color": {
            "type": "string",
            "description": "Color of a tag (#rrggbb)."
          }
        },
        "example": {
          "id": 123,
          "title": "Tag",
          "color": "#ff0000"
        }
      },
      "resource_instance": {
        "title": "Object of model \"Resource Instance\"",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a resource instance."
          },
          "title": {
            "type": "string",
            "description": "Title of a resource instance."
          },
          "resource_id": {
            "type": "number",
            "description": "ID of a resource, to which instance is linked."
          }
        },
        "example": {
          "id": 123,
          "title": "Resource #1",
          "resource_id": 123
        }
      },
      "timetable_event_schedule_event": {
        "title": "Object of model \"Event of appointment/event in a Schedule\"",
        "description": "Data of the existing event of appointment or event in a schedule.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of an event of appointment/event in a schedule."
          },
          "created_at": {
            "type": "string",
            "description": "Datetime of an event of appointment/event in a schedule created.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Datetime of an event of appointment/event in a schedule last updated.",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Datetime of an event of appointment/event in a schedule deleted.",
            "format": "date-time"
          },
          "event_status": {
            "type": "string",
            "description": "Event of appointment/event status:  \n`stable` - entity is stable;  \n`event_created` - event is created, corresponding appointment/event is not created yet;  \n`event_changed` - event is changed, corresponding appointment/event is not changed yet;  \n`event_changed_force` - event is changed with force override of manual changes, corresponding appointment/event is not changed yet;  \n`event_deleted` - event is deleted, corresponding appointment/event is not deleted yet;  \n`entity_deleted` - appointment/event corresponding to an event is deleted (due to event deletion or due to manual deletion);  \n`entity_failed` - appointment/event creation failure.\n",
            "enum": [
              "stable",
              "event_created",
              "event_changed",
              "event_changed_force",
              "event_deleted",
              "entity_deleted",
              "entity_failed"
            ]
          },
          "event_datetime": {
            "type": "string",
            "description": "Datetime of a scheduled appointment/event beginning.",
            "format": "date-time"
          },
          "event_entity_type": {
            "type": "string",
            "description": "Type of an scheduled entity (appointment or event). Note: enum values \"record\" and \"activity\" are legacy terms for appointment and event.",
            "enum": [
              "record",
              "activity"
            ]
          },
          "event_entity_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of an scheduled entity (appointment or event)."
          },
          "is_entity_master_changed": {
            "type": "boolean",
            "description": "Flag for manual change of a team member for a scheduled appointment/event."
          },
          "is_entity_datetime_changed": {
            "type": "boolean",
            "description": "Flag for manual change of a datetime for a scheduled appointment/event."
          },
          "is_entity_duration_changed": {
            "type": "boolean",
            "description": "Flag for manual change of a duration for a scheduled appointment/event."
          },
          "is_entity_labels_changed": {
            "type": "boolean",
            "description": "Flag for manual change of a tags linked to a scheduled appointment/event."
          },
          "is_entity_resource_instances_changed": {
            "type": "boolean",
            "description": "Flag for manual change of a resource instances linked to a scheduled appointment/event."
          },
          "entity_master": {
            "type": "object",
            "description": "Team member for a scheduled appointment/event.",
            "allOf": [
              {
                "$ref": "#/components/schemas/master_with_position"
              }
            ]
          },
          "entity_datetime": {
            "type": "string",
            "description": "Actual datetime of a scheduled appointment/event beginning."
          },
          "entity_duration": {
            "type": "string",
            "description": "Actual duration of a scheduled appointment/event."
          },
          "entity_labels": {
            "type": "array",
            "description": "Actual tags linked to a scheduled appointment/event.",
            "items": {
              "$ref": "#/components/schemas/tag"
            }
          },
          "entity_resource_instances": {
            "type": "array",
            "description": "Actual resource instances linked to a scheduled appointment/event.",
            "items": {
              "$ref": "#/components/schemas/resource_instance"
            }
          }
        },
        "example": {
          "id": 123,
          "created_at": "2026-01-01T12:12:12-05:00",
          "updated_at": "2026-01-01T12:12:12-05:00",
          "deleted_at": null,
          "event_status": "stable",
          "event_datetime": "2026-01-24T14:00:00-05:00",
          "event_entity_type": "activity",
          "event_entity_id": 123,
          "is_entity_master_changed": false,
          "is_entity_datetime_changed": false,
          "is_entity_duration_changed": false,
          "is_entity_labels_changed": false,
          "is_entity_resource_instances_changed": false,
          "entity_master": {
            "id": 123,
            "name": "John Johnson",
            "company_id": 123,
            "specialization": "Team Member",
            "avatar": "https://app.alteg.io/images/no-master-sm.png",
            "avatar_big": "https://app.alteg.io/images/no-master.png",
            "position": {
              "id": 123,
              "title": "Team Member"
            }
          },
          "entity_datetime": "2022-01-24 14:00:00",
          "entity_duration": 3600,
          "entity_labels": [
            {
              "id": 123,
              "title": "Tag",
              "color": "#ff0000"
            }
          ],
          "entity_resource_instances": [
            {
              "id": 123,
              "title": "Resource #1",
              "resource_id": 123
            }
          ]
        }
      },
      "timetable_event_schedule_day": {
        "title": "Object of model \"Schedule Series\"",
        "description": "Data for an existing schedule series in a location.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a schedule series."
          },
          "created_at": {
            "type": "string",
            "description": "Datetime of a schedule series created.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Datetime of a schedule series last updated.",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Datetime of a schedule series deleted.",
            "format": "date-time"
          },
          "timetable_event_schedule_id": {
            "type": "number",
            "description": "ID of a schedule, which series is linked to."
          },
          "day_of_week": {
            "type": "string",
            "description": "Day of week of a schedule series.",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          },
          "events_time": {
            "type": "string",
            "description": "Time of beginning of the events in a schedule series."
          },
          "events_duration": {
            "type": "number",
            "description": "Duration of the events in a schedule series.\nNote: Does not include technical break duration.\n"
          },
          "event_technical_break_duration": {
            "type": "number",
            "description": "Technical break duration in seconds."
          },
          "events_master": {
            "type": "object",
            "description": "Team member for the events in a schedule series.  \nReturned in response only if corresponding `include` is present in request.\n",
            "allOf": [
              {
                "$ref": "#/components/schemas/master_with_position"
              }
            ]
          },
          "events_labels": {
            "type": "array",
            "description": "Tags for the events in a schedule series.\nReturned in response only if corresponding `include` is present in request.\n",
            "items": {
              "$ref": "#/components/schemas/tag"
            }
          },
          "events_resource_instances": {
            "type": "array",
            "description": "Resource instances for the events in a schedule series.  \nReturned in response only if corresponding `include` is present in request.\n",
            "items": {
              "$ref": "#/components/schemas/resource_instance"
            }
          },
          "events": {
            "type": "array",
            "description": "Events of appointments or events in a schedule series.  \nReturned in response only if corresponding `include` is present in request.\n",
            "items": {
              "$ref": "#/components/schemas/timetable_event_schedule_event"
            }
          }
        },
        "example": {
          "id": 123,
          "created_at": "2026-01-01T12:12:12-05:00",
          "updated_at": "2026-01-01T12:12:12-05:00",
          "deleted_at": null,
          "timetable_event_schedule_id": 123,
          "day_of_week": "mon",
          "events_time": "14:00:00",
          "events_duration": 3600,
          "event_technical_break_duration": 0,
          "events_master": {
            "id": 123,
            "name": "John Johnson",
            "company_id": 123,
            "specialization": "Team Member",
            "avatar": "https://app.alteg.io/images/no-master-sm.png",
            "avatar_big": "https://app.alteg.io/images/no-master.png",
            "position": {
              "id": 123,
              "title": "Team Member"
            }
          },
          "events_labels": [
            {
              "id": 123,
              "title": "Tag",
              "color": "#ff0000"
            }
          ],
          "events_resource_instances": [
            {
              "id": 123,
              "title": "Resource #1",
              "resource_id": 123
            }
          ],
          "events": [
            {
              "id": 123,
              "created_at": "2026-01-01T12:12:12-05:00",
              "updated_at": "2026-01-01T12:12:12-05:00",
              "deleted_at": null,
              "event_status": "stable",
              "event_datetime": "2026-01-24T14:00:00-05:00",
              "event_entity_type": "activity",
              "event_entity_id": 123,
              "is_entity_master_changed": false,
              "is_entity_datetime_changed": false,
              "is_entity_duration_changed": false,
              "is_entity_labels_changed": false,
              "is_entity_resource_instances_changed": false
            }
          ]
        }
      },
      "timetable_event_schedule": {
        "title": "Object of model \"Schedule\"",
        "description": "Data for an existing schedule in a location.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a schedule."
          },
          "created_at": {
            "type": "string",
            "description": "Datetime of a schedule created.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Datetime of a schedule last updated.",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Datetime of a schedule deleted.",
            "format": "date-time"
          },
          "original_entity_type": {
            "type": "string",
            "description": "Type of entity schedule is based on (appointment or event).",
            "enum": [
              "record",
              "activity"
            ]
          },
          "original_entity_id": {
            "type": "number",
            "description": "ID of entity schedule is based on."
          },
          "date_start": {
            "type": "string",
            "description": "Date of a schedule start.",
            "format": "date"
          },
          "date_end": {
            "type": "string",
            "description": "Date of a schedule end.",
            "format": "date"
          },
          "days": {
            "type": "array",
            "description": "Schedule series, linked to a specified schedule.  \nReturned in response only if corresponding `include` is present in request.\n",
            "items": {
              "$ref": "#/components/schemas/timetable_event_schedule_day"
            }
          }
        },
        "example": {
          "id": 123,
          "created_at": "2026-01-01T12:12:12-05:00",
          "updated_at": "2026-01-01T12:12:12-05:00",
          "deleted_at": null,
          "original_entity_type": "activity",
          "original_entity_id": 123,
          "date_start": "2026-01-01",
          "date_end": "2026-02-01",
          "days": [
            {
              "id": 123,
              "created_at": "2026-01-01T12:12:12-05:00",
              "updated_at": "2026-01-01T12:12:12-05:00",
              "deleted_at": null,
              "timetable_event_schedule_id": 123,
              "day_of_week": "mon",
              "events_time": "14:00:00",
              "events_duration": 3600,
              "events_master": {
                "id": 123,
                "name": "John Johnson",
                "company_id": 123,
                "specialization": "Team Member",
                "avatar": "https://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "https://app.alteg.io/images/no-master.png",
                "position": {
                  "id": 123,
                  "title": "Team Member"
                }
              },
              "events_labels": [
                {
                  "id": 123,
                  "title": "Tag",
                  "color": "#ff0000"
                }
              ],
              "events_resource_instances": [
                {
                  "id": 123,
                  "title": "Resource #1",
                  "resource_id": 123
                }
              ]
            }
          ]
        }
      },
      "timetable_event_schedule_client_schedule": {
        "title": "Object of model \"Client schedule\"",
        "description": "Data for an existing client schedule in a location.",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of a client schedule."
          },
          "loyalty_abonement_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of a loyalty membership used for client schedule (not supported at the moment)."
          },
          "final_day": {
            "type": "string",
            "description": "Datetime of a client schedule end."
          },
          "days": {
            "type": "array",
            "description": "Schedule series linked to a client schedule.",
            "items": {
              "$ref": "#/components/schemas/timetable_event_schedule_day"
            }
          }
        },
        "example": {
          "id": 123,
          "loyalty_abonement_id": null,
          "final_day": "2022-01-01 12:12:12",
          "days": [
            {
              "id": 123,
              "created_at": "2026-01-01T12:12:12-05:00",
              "updated_at": "2026-01-01T12:12:12-05:00",
              "deleted_at": null,
              "timetable_event_schedule_id": 123,
              "day_of_week": "mon",
              "events_time": "14:00:00",
              "events_duration": 3600,
              "event_technical_break_duration": 0,
              "events_master": {
                "id": 123,
                "name": "John Johnson",
                "company_id": 123,
                "specialization": "Team Member",
                "avatar": "https://app.alteg.io/images/no-master-sm.png",
                "avatar_big": "https://app.alteg.io/images/no-master.png",
                "position": {
                  "id": 123,
                  "title": "Team Member"
                }
              },
              "events_labels": [
                {
                  "id": 123,
                  "title": "Tag",
                  "color": "#ff0000"
                }
              ],
              "events_resource_instances": [
                {
                  "id": 123,
                  "title": "Resource #1",
                  "resource_id": 123
                }
              ]
            }
          ]
        }
      },
      "company_get_timetable_settings_response_data_field_data_types": {
        "title": "Root Type for company_get_timetable_settings_response_data_field_data_types",
        "required": [
          "activity_record_clients_count_max",
          "record_type"
        ],
        "type": "object",
        "properties": {
          "record_type": {
            "maximum": 2,
            "minimum": 0,
            "type": "integer",
            "description": "Default appointment type: 0 - Mixed appointment, 1 - Individual appointment, 2 - Group event"
          },
          "activity_record_clients_count_max": {
            "maximum": 255,
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of seats in one group event"
          },
          "is_show_newsletter_agreement": {
            "type": "boolean",
            "description": "Show newsletter subscription agreement checkbox in booking form"
          },
          "is_show_personal_data_processing_agreement": {
            "type": "boolean",
            "description": "Show personal data processing agreement checkbox in booking form"
          }
        },
        "description": "",
        "example": {
          "record_type": 0,
          "activity_record_clients_count_max": 1,
          "is_show_newsletter_agreement": false,
          "is_show_personal_data_processing_agreement": false
        }
      },
      "company_get_timetable_settings_response_data_types": {
        "title": "Root Type for company_get_timetable_settings_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "$ref": "#/components/schemas/company_get_timetable_settings_response_data_field_data_types"
          },
          "meta": {
            "type": "array",
            "description": "metadata",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Retrieving Appointment Calendar Settings",
        "example": {
          "success": true,
          "data": {
            "record_type": 0,
            "activity_record_clients_count_max": 1
          },
          "meta": []
        }
      },
      "company_update_timetable_settings_data_types": {
        "title": "Root Type for company_update_timetable_settings_data_type",
        "required": [
          "activity_record_clients_count_max",
          "record_type"
        ],
        "type": "object",
        "properties": {
          "record_type": {
            "maximum": 2,
            "minimum": 0,
            "type": "integer",
            "description": "Default appointment type: 0 - Mixed appointment, 1 - Individual appointment, 2 - Group event"
          },
          "activity_record_clients_count_max": {
            "maximum": 255,
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of seats in one group event"
          }
        },
        "description": "Timetable settings for a location",
        "example": {
          "record_type": 0,
          "activity_record_clients_count_max": 1
        }
      },
      "goods_search_response200_data_types": {
        "title": "Root Type for goods_search_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array with data objects",
            "items": {
              "type": "object",
              "properties": {
                "parent_id": {
                  "type": "number",
                  "description": "Parent element ID (0 for root elements)"
                },
                "item_id": {
                  "type": "number",
                  "description": "Item ID (0 if item is a category)"
                },
                "category_id": {
                  "type": "number",
                  "description": "Product category ID (0 if the item is a product)"
                },
                "title": {
                  "type": "string",
                  "description": "The name of the product or product category"
                },
                "is_chain": {
                  "type": "boolean",
                  "description": "Is the element chain-bound? true - the element is connected to the chain, false - not connected"
                },
                "is_category": {
                  "type": "boolean",
                  "description": "Is the element a category? true - category, false - product"
                },
                "is_item": {
                  "type": "boolean",
                  "description": "Is the item a product? true - product, false - category"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of categories found)"
          }
        },
        "description": "List request example",
        "example": {
          "success": true,
          "data": [
            {
              "parent_id": 0,
              "item_id": 0,
              "category_id": 123,
              "title": "Root Category 1",
              "is_chain": true,
              "is_category": true,
              "is_item": false
            },
            {
              "parent_id": 0,
              "item_id": 0,
              "category_id": 456,
              "title": "Root Category 2",
              "is_chain": true,
              "is_category": true,
              "is_item": false
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "goods_company_goods_id_response200_data_types": {
        "title": "Root Type for goods_company_goods_id_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "description": "Product data object",
            "additionalProperties": true,
            "properties": {
              "title": {
                "type": "string",
                "description": "Name of product"
              },
              "value": {
                "type": "string",
                "description": "Name of product"
              },
              "label": {
                "type": "string",
                "description": "Product name with article number (if any)"
              },
              "good_id": {
                "type": "number",
                "description": "Product ID"
              },
              "cost": {
                "type": "number",
                "description": "Selling price"
              },
              "unit_id": {
                "type": "number",
                "description": "Sales Unit ID"
              },
              "unit_short_title": {
                "type": "string",
                "description": "Sales unit"
              },
              "service_unit_id": {
                "type": "number",
                "description": "ID of unit of measure to write off"
              },
              "service_unit_short_title": {
                "type": "string",
                "description": "Write-off unit"
              },
              "actual_cost": {
                "type": "number",
                "description": "Cost price"
              },
              "unit_actual_cost": {
                "type": "number",
                "description": "Unit cost"
              },
              "unit_actual_cost_format": {
                "type": "string",
                "description": "Unit cost format"
              },
              "unit_equals": {
                "type": "number",
                "description": "The ratio of the unit of measure for sale to the unit for write-off"
              },
              "barcode": {
                "type": "string",
                "description": "Barcode"
              },
              "loyalty_abonement_type_id": {
                "type": "number",
                "description": "Subscription type identifier (if the product is a membership)"
              },
              "loyalty_certificate_type_id": {
                "type": "number",
                "description": "Certificate type identifier (if the item is a certificate)"
              },
              "loyalty_allow_empty_code": {
                "type": [
                  "boolean",
                  "number"
                ],
                "description": "Is it allowed to sell without a code (can be 0/1 or true/false)"
              },
              "critical_amount": {
                "type": "number",
                "description": "Critical residue",
                "format": "float"
              },
              "desired_amount": {
                "type": "number",
                "description": "Desired balance",
                "format": "float"
              },
              "actual_amounts": {
                "type": "array",
                "description": "Remaining stock",
                "items": {
                  "type": "object",
                  "additionalProperties": true,
                  "properties": {
                    "storage_id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Quantity"
                    }
                  }
                }
              },
              "last_change_date": {
                "type": "string",
                "description": "The date the entity was last modified",
                "format": "date-time"
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Receive item(s)",
        "example": {
          "success": true,
          "data": {
            "title": "Shampoo 1",
            "value": "Shampoo 1",
            "label": "Shampoo 1 (123)",
            "good_id": 123456,
            "cost": 100500,
            "unit_id": 4835,
            "unit_short_title": "PC",
            "service_unit_id": 3548,
            "service_unit_short_title": "gr",
            "actual_cost": 1050,
            "unit_actual_cost": 105,
            "unit_actual_cost_format": "105 r",
            "unit_equals": 10,
            "barcode": "123",
            "loyalty_abonement_type_id": "150",
            "loyalty_certificate_type_id": "0",
            "loyalty_allow_empty_code": false,
            "critical_amount": 0,
            "desired_amount": 0,
            "actual_amounts": [
              {
                "storage_id": 987,
                "amount": 1000000
              }
            ],
            "last_change_date": "2026-01-01T12:00:00-0500"
          },
          "meta": []
        }
      },
      "goods_company_request_with_rules_data_type": {
        "title": "Root Type for goods_company_request_data_type",
        "required": [
          "category_id",
          "sale_unit_id",
          "service_unit_id",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Product Name"
          },
          "print_title": {
            "type": "string",
            "description": "Title to be printed on receipt"
          },
          "article": {
            "type": "string",
            "description": "vendor code"
          },
          "barcode": {
            "type": "string",
            "description": "Barcode"
          },
          "category_id": {
            "type": "integer",
            "description": "Product category ID"
          },
          "cost": {
            "type": "number",
            "description": "Selling price",
            "format": "float"
          },
          "actual_cost": {
            "type": "number",
            "description": "Cost price",
            "format": "float"
          },
          "sale_unit_id": {
            "type": "integer",
            "description": "Sales unit"
          },
          "service_unit_id": {
            "type": "integer",
            "description": "Write-off unit"
          },
          "unit_equals": {
            "type": "number",
            "description": "The ratio of the unit of measure for sale to the unit of measure for write-off",
            "format": "float"
          },
          "critical_amount": {
            "type": "number",
            "description": "critical residue",
            "format": "float"
          },
          "desired_amount": {
            "type": "number",
            "description": "Desired balance",
            "format": "float"
          },
          "netto": {
            "type": "number",
            "description": "Net weight",
            "format": "float"
          },
          "brutto": {
            "type": "number",
            "description": "Gross weight",
            "format": "float"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          },
          "tax_variant": {
            "type": "integer",
            "description": "Taxation system"
          },
          "vat_id": {
            "type": "integer",
            "description": "VAT"
          },
          "correction_rules": {
            "type": "array",
            "description": "An array of rules for converting units of measurement (required if there are inventory operations for the product)",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "integer",
                  "description": "Type of transaction"
                },
                "base_unit": {
                  "type": "string",
                  "description": "Basic units in adjustment"
                }
              }
            }
          }
        },
        "description": "Product Creation Method",
        "example": {
          "title": "Shampoo",
          "print_title": "Shampoo",
          "article": "123",
          "barcode": "123",
          "category_id": 289632,
          "cost": 1000,
          "actual_cost": 500,
          "sale_unit_id": 216762,
          "service_unit_id": 216762,
          "unit_equals": 100,
          "critical_amount": 1,
          "desired_amount": 1,
          "netto": 200,
          "brutto": 250,
          "comment": "Test comment 123",
          "tax_variant": 0,
          "vat_id": 3,
          "correction_rules": [
            {
              "type": 1,
              "base_unit": "service"
            },
            {
              "type": 2,
              "base_unit": "service"
            },
            {
              "type": 3,
              "base_unit": "sale"
            },
            {
              "type": 4,
              "base_unit": "sale"
            },
            {
              "type": 5,
              "base_unit": "sale"
            }
          ]
        }
      },
      "goods_company_response409_data_type": {
        "title": "Root Type for good_company_response409_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "conflict": {
                "type": "boolean"
              }
            },
            "description": "Object with error message"
          }
        },
        "description": "Edit Products",
        "example": {
          "success": false,
          "meta": {
            "message": "The product already has inventory operations, you need to specify the rules for converting units of measure for inventory operations",
            "conflict": true
          }
        }
      },
      "goods_company_response422_data_type": {
        "title": "Root Type for goods_company_response422_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "description": "Contains an error message"
          }
        },
        "description": "Product editing",
        "example": {
          "success": false,
          "meta": {
            "message": "Possible error messages",
            "errors": [
              {
                "message": "The specified taxation system is not available for this country."
              },
              {
                "message": "The specified VAT is not available for this taxation system."
              },
              {
                "[title]": [
                  "This field is missing."
                ],
                "[category_id]": [
                  "This field is missing."
                ],
                "[sale_unit_id]": [
                  "This field is missing."
                ],
                "[service_unit_id]": [
                  "This field is missing."
                ]
              }
            ]
          }
        }
      },
      "goods_list_response": {
        "title": "Root Type for goods_list_response",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of products",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "title": {
                  "type": "string",
                  "description": "Product title"
                },
                "value": {
                  "type": "string",
                  "description": "Product value (usually same as title)"
                },
                "label": {
                  "type": "string",
                  "description": "Product label for display"
                },
                "article": {
                  "type": "string",
                  "description": "Product article/SKU"
                },
                "category": {
                  "type": "string",
                  "description": "Category name"
                },
                "category_id": {
                  "type": "number",
                  "description": "Category ID"
                },
                "salon_id": {
                  "type": "number",
                  "description": "Location ID"
                },
                "good_id": {
                  "type": "number",
                  "description": "Product ID"
                },
                "cost": {
                  "type": "number",
                  "description": "Product cost"
                },
                "unit_id": {
                  "type": "number",
                  "description": "Unit ID"
                },
                "unit_short_title": {
                  "type": "string",
                  "description": "Unit short title (e.g. pc, gr)"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of products response",
        "example": {
          "success": true,
          "data": [
            {
              "title": "Shampoo 1",
              "value": "Shampoo 1",
              "label": "Shampoo 1 (123)",
              "good_id": 123456,
              "cost": 100500,
              "unit_id": 4835,
              "unit_short_title": "PC"
            }
          ],
          "meta": []
        }
      },
      "goods_company_request_data_type": {
        "title": "Root Type for goods_company_request_data_type",
        "required": [
          "category_id",
          "sale_unit_id",
          "service_unit_id",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Product Name"
          },
          "print_title": {
            "type": "string",
            "description": "Title to be printed on receipt"
          },
          "article": {
            "type": "string",
            "description": "vendor code"
          },
          "barcode": {
            "type": "string",
            "description": "Barcode"
          },
          "category_id": {
            "type": "integer",
            "description": "Product category ID"
          },
          "cost": {
            "type": "number",
            "description": "Selling price",
            "format": "float"
          },
          "actual_cost": {
            "type": "number",
            "description": "Cost price",
            "format": "float"
          },
          "sale_unit_id": {
            "type": "integer",
            "description": "Sales unit"
          },
          "service_unit_id": {
            "type": "integer",
            "description": "Write-off unit"
          },
          "unit_equals": {
            "type": "number",
            "description": "The ratio of the unit of measure for sale to the unit of measure for write-off",
            "format": "float"
          },
          "critical_amount": {
            "type": "number",
            "description": "critical residue",
            "format": "float"
          },
          "desired_amount": {
            "type": "number",
            "description": "Desired balance",
            "format": "float"
          },
          "netto": {
            "type": "number",
            "description": "Net weight",
            "format": "float"
          },
          "brutto": {
            "type": "number",
            "description": "Gross weight",
            "format": "float"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          },
          "tax_variant": {
            "type": "integer",
            "description": "Taxation system"
          },
          "vat_id": {
            "type": "integer",
            "description": "VAT"
          }
        },
        "description": "Product Creation Method",
        "example": {
          "title": "Shampoo",
          "print_title": "Shampoo",
          "article": "123",
          "barcode": "123",
          "category_id": 289632,
          "cost": 1000,
          "actual_cost": 500,
          "sale_unit_id": 216762,
          "service_unit_id": 216762,
          "unit_equals": 100,
          "critical_amount": 1,
          "desired_amount": 1,
          "netto": 200,
          "brutto": 250,
          "comment": "Test comment 123",
          "tax_variant": 0,
          "vat_id": 3
        }
      },
      "goods_categories_response200_data_types": {
        "title": "Root Type for goods_categories_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Product category ID"
                },
                "title": {
                  "type": "string",
                  "description": "Product category name"
                },
                "parent_category_id": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Parent category ID (null for top-level categories)"
                },
                "is_chain": {
                  "type": "boolean",
                  "description": "Whether the category belongs to the chain"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "description": "Metadata",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Total number of categories"
              }
            }
          }
        },
        "description": "Get a list of product categories",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1035384,
              "title": "Memberships",
              "parent_category_id": null,
              "is_chain": true
            },
            {
              "id": 961078,
              "title": "Basic products",
              "parent_category_id": null,
              "is_chain": false
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "goods_category_node_response200_data_types": {
        "title": "Root Type for goods_category_node_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "parent_id": {
                "type": "number",
                "description": "Parent element ID (0 for root elements)"
              },
              "item_id": {
                "type": "number",
                "description": "Item ID (always 0)"
              },
              "category_id": {
                "type": "number",
                "description": "Product category ID"
              },
              "title": {
                "type": "string",
                "description": "Product category name"
              },
              "is_chain": {
                "type": "boolean",
                "description": "Is the element chain-bound? true - the element is connected to the chain, false - not connected"
              },
              "is_category": {
                "type": "boolean",
                "description": "Is the element a category? always true"
              },
              "is_item": {
                "type": "boolean",
                "description": "Is the item a product? always false"
              },
              "children": {
                "type": "array",
                "description": "Child elements of a product category",
                "items": {
                  "type": "object",
                  "properties": {
                    "parent_id": {
                      "type": "number",
                      "description": "Parent element ID (0 for root elements)"
                    },
                    "item_id": {
                      "type": "number",
                      "description": "Item ID (0 if item is a category)"
                    },
                    "category_id": {
                      "type": "number",
                      "description": "Product category ID (0 if the item is a product)"
                    },
                    "title": {
                      "type": "string",
                      "description": "The name of the product or product category"
                    },
                    "is_chain": {
                      "type": "boolean",
                      "description": "Is the element chain-bound? true - the element is connected to the chain, false - not connected"
                    },
                    "is_category": {
                      "type": "boolean",
                      "description": "Is the element a category? true - category, false - product"
                    },
                    "is_item": {
                      "type": "boolean",
                      "description": "Is the item a product? true - product, false - category"
                    }
                  }
                }
              },
              "children_count": {
                "type": "number",
                "description": "Total number of child products and categories (no recursion)"
              }
            },
            "description": "Object with data"
          }
        },
        "description": "Example of a request to get the composition of a category",
        "example": {
          "success": true,
          "data": {
            "parent_id": 0,
            "item_id": 0,
            "category_id": 123,
            "title": "Root category 1",
            "is_chain": false,
            "is_category": true,
            "is_item": false,
            "children": [
              {
                "parent_id": 123,
                "item_id": 0,
                "category_id": 456,
                "title": "Child category",
                "is_chain": false,
                "is_category": true,
                "is_item": false
              },
              {
                "parent_id": 123,
                "item_id": 789,
                "category_id": 0,
                "title": "Child product",
                "is_chain": false,
                "is_category": false,
                "is_item": true
              }
            ],
            "children_count": 2
          }
        }
      },
      "goods_categories_request_data_types": {
        "title": "Root Type for goods_categories_request_data_types",
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Product category name"
          },
          "parent_category_id": {
            "type": "integer",
            "description": "Parent category ID (optional, but can be 0 or null if you don't need to specify the parent category)",
            "format": "int32"
          },
          "article": {
            "type": "string",
            "description": "vendor code"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          }
        },
        "description": "Create a Product Category",
        "example": {
          "title": "Manicure",
          "parent_category_id": 123456,
          "article": "123article",
          "comment": "Category of products for manicure"
        }
      },
      "goods_categories_post_put_response_data_types": {
        "title": "Root Type for goods_categories_response201_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "Product category ID",
                "format": "int32"
              },
              "title": {
                "type": "string",
                "description": "Product category name"
              },
              "parent_category_id": {
                "type": "integer",
                "description": "Identifier of the parent product category (may be null if there is no parent product category)"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create a Product Category",
        "example": {
          "success": true,
          "data": {
            "id": 123456,
            "title": "Manicure",
            "parent_category_id": 123457
          },
          "meta": []
        }
      },
      "storage_response_data_types": {
        "title": "Root Type for storage_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Inventory ID"
                },
                "title": {
                  "type": "string",
                  "description": "Inventory name"
                },
                "for_service": {
                  "type": "number",
                  "description": "1 - if used for automatic write-off of consumables"
                },
                "for_sale": {
                  "type": "number",
                  "description": "1 - if the default inventory for selling products"
                },
                "comment": {
                  "type": "string",
                  "description": "Description of the inventory"
                },
                "weight": {
                  "type": "number",
                  "description": "Sort order weight"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get location inventories",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "title": "Consumables",
              "for_service": 1,
              "for_sale": 0,
              "comment": "To account for consumables"
            },
            {
              "id": 2,
              "title": "Products",
              "for_service": 0,
              "for_sale": 1,
              "comment": "To record store sales"
            },
            {
              "id": 23061,
              "title": "Ors",
              "for_service": 0,
              "for_sale": 1,
              "comment": "Nz"
            }
          ],
          "meta": []
        }
      },
      "storages_transaction_response_data_types": {
        "title": "Root Type for storages_transaction_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Transaction ID"
                },
                "document_id": {
                  "type": "number",
                  "description": "Document ID"
                },
                "type_id": {
                  "type": "number",
                  "description": "Transaction type identifier"
                },
                "type": {
                  "type": "string",
                  "description": "Transaction type"
                },
                "good": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Item ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Product Name"
                    }
                  },
                  "description": "Product"
                },
                "storage": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Inventory name"
                    }
                  },
                  "description": "Inventory"
                },
                "unit": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Unit ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Unit name"
                    }
                  },
                  "description": "Unit of measurement"
                },
                "operation_unit_type": {
                  "type": "number",
                  "description": "Unit type: 1 - for sale, 2 - for write-off"
                },
                "create_date": {
                  "type": "string",
                  "description": "date of creation",
                  "format": "date-time"
                },
                "last_change_date": {
                  "type": "string",
                  "description": "Last modified date",
                  "format": "date-time"
                },
                "cost_per_unit": {
                  "type": "number",
                  "description": "Unit price",
                  "format": "float"
                },
                "cost": {
                  "type": "number",
                  "description": "Price",
                  "format": "float"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount",
                  "format": "float"
                },
                "master": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "team member name"
                    }
                  },
                  "description": "team member"
                },
                "supplier": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Supplier name"
                    }
                  },
                  "description": "The supplier"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "service": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Service ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Service name"
                    }
                  },
                  "description": "Service"
                },
                "clients": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Client name"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Customer phone"
                    }
                  },
                  "description": "Customer"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Search for product transactions",
        "example": {
          "success": true,
          "data": [
            {
              "id": 123456789,
              "document_id": 22256643,
              "type_id": 987654321,
              "type": "Something",
              "good": {
                "id": 111222333,
                "title": "Something"
              },
              "storage": {
                "id": 333222111,
                "title": "Storage 1"
              },
              "unit": {
                "id": 333222111,
                "title": "milliliter"
              },
              "operation_unit_type": 1,
              "create_date": "2026-12-21T19:08:00-0500",
              "last_change_date": "2026-02-01T12:00:00-0500",
              "cost_per_unit": 1.07,
              "cost": 0,
              "discount": 10,
              "master": {
                "id": 112233445,
                "title": "James Smith"
              },
              "supplier": {
                "id": 11112222,
                "title": "Best Supplier Ever"
              },
              "record_id": 1,
              "service": {
                "id": 1234321,
                "title": "Service 4"
              },
              "clients": {
                "id": 4321234,
                "name": "George Smith",
                "phone": 13155550176
              }
            }
          ],
          "meta": []
        }
      },
      "storage_operation_operation_request_data_types": {
        "title": "Root Type for storage_operation_operation_request_data_types",
        "required": [
          "create_date",
          "goods_transactions",
          "storage_id",
          "type_id"
        ],
        "type": "object",
        "properties": {
          "type_id": {
            "type": "number",
            "description": "Document type (Sale 1, Usage / Material Consumption 2, Product Receipt / Incoming 3, Inventory Write-off / Product Disposal 4, Internal Transfer 5)"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          },
          "create_date": {
            "type": "string",
            "description": "Document creation date",
            "format": "date-time"
          },
          "master_id": {
            "type": "number",
            "description": "team member ID"
          },
          "storage_id": {
            "type": "number",
            "description": "Inventory ID"
          },
          "goods_transactions": {
            "type": "array",
            "description": "An array of objects containing transaction parameters, similar to a request to create a product transaction",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create an inventory operation",
        "example": {
          "type_id": 1,
          "comment": "test document comment",
          "create_date": "2026-09-21T23:00:00.000-05:00",
          "master_id": 0,
          "storage_id": 91271,
          "transactions": [
            {
              "good_id": 232674,
              "operation_unit_type": 1,
              "amount": 1,
              "cost_per_unit": 100,
              "discount": 10,
              "cost": 90,
              "client_id": 0,
              "supplier_id": 0,
              "comment": "test transaction comment"
            }
          ]
        }
      },
      "storage_operation_operation_response_data_types": {
        "title": "Root Type for storage_operation_operation_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Document ID"
                  },
                  "type_id": {
                    "type": "number",
                    "description": "Document type identifier"
                  },
                  "type": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Document type identifier"
                      },
                      "title": {
                        "type": "string",
                        "description": "Document type name"
                      }
                    },
                    "description": "Document Type"
                  },
                  "storage_id": {
                    "type": "number",
                    "description": "Inventory ID"
                  },
                  "user_id": {
                    "type": "number",
                    "description": "User ID"
                  },
                  "company_id": {
                    "type": "number",
                    "description": "location ID"
                  },
                  "number": {
                    "type": "number",
                    "description": "Document Number"
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment"
                  },
                  "create_date": {
                    "type": "string",
                    "description": "date of creation",
                    "format": "date-time"
                  },
                  "storage": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Inventory ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "Inventory name"
                      }
                    },
                    "description": "Inventory"
                  },
                  "company": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "location ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "location name"
                      },
                      "country_id": {
                        "type": "number",
                        "description": "Country ID"
                      },
                      "city_id": {
                        "type": "number",
                        "description": "City ID"
                      },
                      "timezone": {
                        "type": "string",
                        "description": "time zone",
                        "format": "date-time"
                      },
                      "address": {
                        "type": "string",
                        "description": "location address"
                      },
                      "coordinate_lat": {
                        "type": "string",
                        "description": "Latitude"
                      },
                      "coordinate_lon": {
                        "type": "string",
                        "description": "Longitude"
                      },
                      "logo": {
                        "type": "string",
                        "description": "Let, on which the location logo is located"
                      },
                      "zip": {
                        "type": "string",
                        "description": "Postcode"
                      },
                      "phones": {
                        "type": "array",
                        "description": "location phone",
                        "items": {
                          "type": "object"
                        }
                      },
                      "site": {
                        "type": "string",
                        "description": "The site of the location"
                      }
                    },
                    "description": "location"
                  },
                  "user": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "User ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Username"
                      },
                      "phone": {
                        "type": "string",
                        "description": "User phone number"
                      }
                    },
                    "description": "User"
                  }
                },
                "description": "Document"
              },
              "transactions": {
                "type": "array",
                "description": "transaction",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Transaction ID"
                    },
                    "document_id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Document type identifier"
                    },
                    "type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Document type identifier"
                        },
                        "title": {
                          "type": "string",
                          "description": "Document type name"
                        }
                      },
                      "description": "Document type"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "good_id": {
                      "type": "number",
                      "description": "Item ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Quantity"
                    },
                    "cost_per_unit": {
                      "type": "number",
                      "description": "Price per unit",
                      "format": "float"
                    },
                    "discount": {
                      "type": "number",
                      "description": "Skdika",
                      "format": "float"
                    },
                    "cost": {
                      "type": "number",
                      "description": "total price",
                      "format": "float"
                    },
                    "unit_id": {
                      "type": "number",
                      "description": "Unit ID"
                    },
                    "storage_id": {
                      "type": "number",
                      "description": "Inventory ID"
                    },
                    "supplier_id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "client_id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "create_date": {
                      "type": "string",
                      "description": "date of creation",
                      "format": "date-time"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Has the transaction been deleted?"
                    },
                    "good": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Item ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Product Name"
                        }
                      },
                      "description": "Product"
                    },
                    "storage": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Inventory ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Inventory name"
                        }
                      },
                      "description": "Inventory"
                    },
                    "supplier": {
                      "type": "array",
                      "description": "The supplier",
                      "items": {
                        "type": "object"
                      }
                    },
                    "client": {
                      "type": "array",
                      "description": "Customer",
                      "items": {
                        "type": "object"
                      }
                    },
                    "master": {
                      "type": "array",
                      "description": "Team Member",
                      "items": {
                        "type": "object"
                      }
                    },
                    "unit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Unit ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Unit name"
                        }
                      },
                      "description": "Units"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create an inventory operation",
        "example": {
          "success": true,
          "data": {
            "document": {
              "id": 22255506,
              "type_id": 1,
              "type": {
                "id": 1,
                "title": "Sale of goods"
              },
              "storage_id": 91271,
              "user_id": 999290,
              "company_id": 4564,
              "number": 1254,
              "comment": "test document comment",
              "create_date": "2026-09-21T23:00:00.000-05:00",
              "storage": {
                "id": 91271,
                "title": "Secret place"
              },
              "company": {
                "id": 4564,
                "title": "Business Example",
                "country_id": 7,
                "city_id": 2,
                "timezone": "-5",
                "address": "New York, 787 Jackson Drive",
                "coordinate_lat": 40.73061,
                "coordinate_lon": -73.935242,
                "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
                "zip": "",
                "phones": [],
                "site": "www.example.com"
              },
              "user": {
                "id": 999290,
                "name": "User name",
                "phone": "+13155550175"
              }
            },
            "transactions": [
              {
                "id": 3428012,
                "document_id": 22255506,
                "type_id": 1,
                "type": {
                  "id": 1,
                  "title": "Sale of goods"
                },
                "company_id": 4564,
                "good_id": 232674,
                "amount": -1,
                "cost_per_unit": 100,
                "discount": 10,
                "cost": 90,
                "unit_id": 1,
                "storage_id": 91271,
                "supplier_id": 0,
                "client_id": 0,
                "master_id": 0,
                "create_date": "2026-09-21T23:00:00.000-05:00",
                "comment": "test transaction comment",
                "deleted": false,
                "good": {
                  "id": 232674,
                  "title": "Edition De Luxe"
                },
                "storage": {
                  "id": 91271,
                  "title": "Secret place"
                },
                "supplier": [],
                "client": [],
                "master": [],
                "unit": {
                  "id": 1,
                  "title": "Thing"
                }
              }
            ]
          },
          "meta": []
        }
      },
      "storage_operation_documents_request_data_types": {
        "title": "Root Type for storage_operation_documents_request_data_types",
        "required": [
          "create_date",
          "storage_id",
          "type_id"
        ],
        "type": "object",
        "properties": {
          "type_id": {
            "type": "number",
            "description": "Document type (sale 1, receipt 3, write-off 7)"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          },
          "storage_id": {
            "type": "number",
            "description": "Inventory ID"
          },
          "create_date": {
            "type": "string",
            "description": "Date of the inventory transaction",
            "format": "date-time"
          }
        },
        "description": "Create document",
        "example": {
          "type_id": 1,
          "comment": "Document comment",
          "storage_id": 36539,
          "create_date": "2026-09-21T23:00:00.000-05:00"
        }
      },
      "storage_operation_documents_response_data_types": {
        "title": "Root Type for storage_operation_documents_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Document ID"
              },
              "type_id": {
                "type": "number",
                "description": "Document type identifier"
              },
              "type": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Document type identifier"
                  },
                  "title": {
                    "type": "string",
                    "description": "Document type name"
                  }
                },
                "description": "Document type"
              },
              "storage_id": {
                "type": "number",
                "description": "Inventory ID"
              },
              "user_id": {
                "type": "number",
                "description": "User ID"
              },
              "company_id": {
                "type": "number",
                "description": "location ID"
              },
              "number": {
                "type": "number",
                "description": "Document Number"
              },
              "comment": {
                "type": "string",
                "description": "A comment"
              },
              "create_date": {
                "type": "string",
                "description": "date of creation",
                "format": "date-time"
              },
              "bill_print_status": {
                "type": "number",
                "description": "Bill print status"
              },
              "storage": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Inventory ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Inventory name"
                  }
                },
                "description": "Inventory"
              },
              "company": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "location ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "location name"
                  },
                  "public_title": {
                    "type": "string",
                    "description": "Public-facing location name"
                  },
                  "business_group_id": {
                    "type": "number",
                    "description": "Business group ID"
                  },
                  "business_type_id": {
                    "type": "number",
                    "description": "Business type ID"
                  },
                  "country_id": {
                    "type": "number",
                    "description": "Country ID"
                  },
                  "city_id": {
                    "type": "number",
                    "description": "City ID"
                  },
                  "timezone": {
                    "type": "number",
                    "description": "Timezone ID"
                  },
                  "timezone_name": {
                    "type": "string",
                    "description": "Timezone name"
                  },
                  "address": {
                    "type": "string",
                    "description": "location address"
                  },
                  "coordinate_lat": {
                    "type": "number",
                    "description": "Latitude"
                  },
                  "coordinate_lon": {
                    "type": "number",
                    "description": "Longitude"
                  },
                  "logo": {
                    "type": "string",
                    "description": "Let, on which the location logo is located"
                  },
                  "zip": {
                    "type": "string",
                    "description": "Postcode"
                  },
                  "phones": {
                    "type": "array",
                    "description": "location phone",
                    "items": {
                      "type": "object"
                    }
                  },
                  "site": {
                    "type": "string",
                    "description": "The site of the location"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Location phone number"
                  },
                  "allow_delete_record": {
                    "type": "boolean",
                    "description": "Allow deleting records"
                  },
                  "allow_change_record": {
                    "type": "boolean",
                    "description": "Allow changing records"
                  }
                },
                "description": "location"
              },
              "user": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "User ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Username"
                  },
                  "phone": {
                    "type": "string",
                    "description": "User phone"
                  },
                  "email": {
                    "type": "string",
                    "description": "User email"
                  },
                  "is_approved": {
                    "type": "boolean",
                    "description": "Is user approved"
                  },
                  "avatar": {
                    "type": "string",
                    "description": "User avatar URL"
                  }
                },
                "description": "User"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create Document",
        "example": {
          "success": true,
          "data": {
            "id": 22255503,
            "type_id": 1,
            "type": {
              "id": 1,
              "title": "Sale of goods"
            },
            "storage_id": 36539,
            "user_id": 999290,
            "company_id": 4564,
            "number": 1251,
            "comment": "Document comment",
            "create_date": "2026-09-21T23:00:00.000-05:00",
            "storage": {
              "id": 36539,
              "title": "Products"
            },
            "company": {
              "id": 4564,
              "title": "Business Example",
              "country_id": 7,
              "city_id": 2,
              "timezone": "-5",
              "address": "New York, 787 Jackson Drive",
              "coordinate_lat": 40.73061,
              "coordinate_lon": -73.935242,
              "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
              "zip": "",
              "phones": [],
              "site": "www.example.com"
            },
            "user": {
              "id": 999290,
              "name": "User name",
              "phone": "+13155550175"
            }
          },
          "meta": []
        }
      },
      "storage_operation_good_transaction_request_data_types": {
        "title": "Root Type for storage_operation_good_transaction_request_data_types",
        "required": [
          "amount",
          "cost",
          "cost_per_unit",
          "discount",
          "document_id",
          "good_id",
          "operation_unit_type"
        ],
        "type": "object",
        "properties": {
          "document_id": {
            "type": "number",
            "description": "Document ID",
            "format": "float"
          },
          "good_id": {
            "type": "number",
            "description": "Item ID"
          },
          "amount": {
            "type": "number",
            "description": "Quantity"
          },
          "cost_per_unit": {
            "type": "number",
            "description": "Unit cost",
            "format": "float"
          },
          "discount": {
            "type": "number",
            "description": "Discount in %"
          },
          "cost": {
            "type": "number",
            "description": "Total transaction amount",
            "format": "float"
          },
          "operation_unit_type": {
            "type": "number",
            "description": "unit type: 1 - for sale, 2 - for write-off"
          },
          "master_id": {
            "type": "number",
            "description": "ID of the team member who sold the product"
          },
          "client_id": {
            "type": "number",
            "description": "ID of the customer who bought the product"
          },
          "supplier_id": {
            "type": "number",
            "description": "Vendor ID"
          },
          "comment": {
            "type": "string",
            "description": "A comment"
          }
        },
        "description": "Create Transaction",
        "example": {
          "document_id": 22254960,
          "good_id": 232674,
          "amount": 1,
          "cost_per_unit": 100,
          "discount": 10,
          "cost": 90,
          "operation_unit_type": 1,
          "master_id": 26781,
          "client_id": 0,
          "supplier_id": 0,
          "comment": "Transaction comment"
        }
      },
      "storage_operation_good_transaction_response200_data_types": {
        "title": "Root Type for storage_operation_good_transaction_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "document_id": {
                "type": "integer",
                "format": "int32"
              },
              "type_id": {
                "type": "integer",
                "format": "int32"
              },
              "type": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Transaction type ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Transaction type name"
                  }
                },
                "description": "Transaction type"
              },
              "company_id": {
                "type": "number",
                "description": "location ID"
              },
              "good_id": {
                "type": "number",
                "description": "Product ID"
              },
              "amount": {
                "type": "number",
                "description": "Quantity"
              },
              "cost_per_unit": {
                "type": "number",
                "description": "Unit price",
                "format": "float"
              },
              "cost": {
                "type": "number",
                "description": "Price",
                "format": "float"
              },
              "discount": {
                "type": "number",
                "description": "Discount",
                "format": "float"
              },
              "unit_id": {
                "type": "number",
                "description": "Unit ID"
              },
              "storage_id": {
                "type": "number",
                "description": "Inventory ID"
              },
              "supplier_id": {
                "type": "number",
                "description": "Vendor ID"
              },
              "client_id": {
                "type": "number",
                "description": "Client ID"
              },
              "master_id": {
                "type": "number",
                "description": "team member ID"
              },
              "create_date": {
                "type": "string",
                "description": "date of creation",
                "format": "date-time"
              },
              "last_change_date": {
                "type": "string",
                "description": "Last modified date",
                "format": "date-time"
              },
              "comment": {
                "type": "string",
                "description": "A comment"
              },
              "deleted": {
                "type": "boolean",
                "description": "Delete transaction flag"
              },
              "good_special_number": {
                "type": "string",
                "description": "Special number (e.g., certificate code)"
              },
              "service_amount": {
                "type": "number",
                "description": "Service quantity"
              },
              "sale_amount": {
                "type": "number",
                "description": "Sale quantity"
              },
              "service_unit_id": {
                "type": "number",
                "description": "Service unit ID"
              },
              "sale_unit_id": {
                "type": "number",
                "description": "Sale unit ID"
              },
              "operation_unit_type": {
                "type": "number",
                "description": "Operation unit type"
              },
              "good": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Product ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Product Name"
                  },
                  "unit": {
                    "type": "string",
                    "description": "unit of measurement"
                  },
                  "value": {
                    "type": "string",
                    "description": "Product Name"
                  },
                  "label": {
                    "type": "string",
                    "description": "Product Name"
                  },
                  "article": {
                    "type": "string",
                    "description": "vendor code"
                  },
                  "category": {
                    "type": "string",
                    "description": "Product category name"
                  },
                  "category_id": {
                    "type": "number",
                    "description": "Product category ID"
                  },
                  "salon_id": {
                    "type": "number",
                    "description": "location ID"
                  },
                  "good_id": {
                    "type": "number",
                    "description": "Product ID"
                  },
                  "cost": {
                    "type": "number",
                    "description": "Price",
                    "format": "float"
                  },
                  "unit_id": {
                    "type": "number",
                    "description": "Unit ID"
                  },
                  "unit_short_title": {
                    "type": "string",
                    "description": "Abbreviated name of the unit of measurement"
                  },
                  "service_unit_id": {
                    "type": "number",
                    "description": "Unit ID for the service"
                  },
                  "service_unit_short_title": {
                    "type": "string",
                    "description": "Abbreviated name of the unit of measure for the service"
                  },
                  "actual_cost": {
                    "type": "number",
                    "description": "Cost price",
                    "format": "float"
                  },
                  "unit_actual_cost": {
                    "type": "number",
                    "description": "unit cost",
                    "format": "float"
                  },
                  "unit_actual_cost_format": {
                    "type": "string",
                    "description": "Unit cost format"
                  },
                  "unit_equals": {
                    "type": "number",
                    "description": "Unit value"
                  },
                  "barcode": {
                    "type": "string",
                    "description": "Barcode"
                  },
                  "loyalty_abonement_type_id": {
                    "type": "number",
                    "description": "Membership ID (if the product is a membership)"
                  },
                  "loyalty_certificate_type_id": {
                    "type": "number",
                    "description": "Certificate identifier (if the product is a certificate)"
                  },
                  "loyalty_allow_empty_code": {
                    "type": "number",
                    "description": "Is it allowed to sell without a code"
                  },
                  "actual_amounts": {
                    "type": "array",
                    "description": "Quantity of products",
                    "items": {
                      "type": "object"
                    }
                  },
                  "last_change_date": {
                    "type": "string",
                    "description": "Date of last product change"
                  },
                  "comment": {
                    "type": "string",
                    "description": "Product comment"
                  },
                  "loyalty_certificate_type": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "description": "Certificate type details (if product is certificate)"
                  },
                  "loyalty_serial_number_limited": {
                    "type": "number",
                    "description": "Serial number limit flag"
                  },
                  "is_goods_mark_enabled": {
                    "type": "boolean",
                    "description": "Whether products marking is enabled"
                  },
                  "critical_amount": {
                    "type": "number",
                    "description": "Critical stock amount threshold"
                  },
                  "desired_amount": {
                    "type": "number",
                    "description": "Desired stock amount"
                  },
                  "is_chain": {
                    "type": "boolean",
                    "description": "Whether product belongs to chain"
                  }
                },
                "description": "Product"
              },
              "sale_unit": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "company_id": {
                        "type": "number"
                      },
                      "title": {
                        "type": "string"
                      },
                      "short_title": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Sales unit (can be object or null)"
              },
              "service_unit": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "company_id": {
                        "type": "number"
                      },
                      "title": {
                        "type": "string"
                      },
                      "short_title": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Sales unit for service (can be object or null)"
              },
              "goods_marks": {
                "type": "array",
                "description": "Product marking codes",
                "items": {
                  "type": "object"
                }
              },
              "storage": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Inventory ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Inventory name"
                  }
                },
                "description": "Inventory"
              },
              "supplier": {
                "type": "array",
                "description": "The supplier",
                "items": {
                  "type": "object"
                }
              },
              "client": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "name": {
                        "type": "string"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      }
                    }
                  }
                ],
                "description": "Customer (can be array or object)"
              },
              "master": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "team member ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Team Member name"
                      }
                    }
                  }
                ],
                "description": "Team Member (can be array or object)"
              },
              "unit": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Unit ID"
                  },
                  "company_id": {
                    "type": "number",
                    "description": "Location ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Unit name"
                  },
                  "short_title": {
                    "type": "string",
                    "description": "Abbreviated name of the unit of measurement"
                  }
                },
                "description": "unit of measurement"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create transaction",
        "example": {
          "success": true,
          "data": {
            "id": 3428010,
            "document_id": 22254960,
            "type_id": 1,
            "type": {
              "id": 1,
              "title": "Sale of goods"
            },
            "company_id": 4564,
            "good_id": 232674,
            "amount": -1,
            "cost_per_unit": 100,
            "discount": 10,
            "cost": 90,
            "unit_id": 1,
            "storage_id": 36539,
            "supplier_id": 0,
            "client_id": 0,
            "master_id": 26781,
            "create_date": "2026-09-21T23:00:00.000-05:00",
            "comment": "Transaction comment",
            "deleted": false,
            "good": {
              "id": 232674,
              "title": "Edition De Luxe",
              "unit": "PC.",
              "value": "delete yy",
              "label": "delete yy",
              "article": "",
              "category": "goose category",
              "category_id": 303603,
              "salon_id": 91372,
              "good_id": 15086312,
              "cost": 500,
              "unit_id": 216760,
              "unit_short_title": "PC",
              "service_unit_id": 216760,
              "service_unit_short_title": "PC",
              "actual_cost": 0,
              "unit_actual_cost": 0,
              "unit_actual_cost_format": "0 USD",
              "unit_equals": 1,
              "barcode": "",
              "loyalty_abonement_type_id": "0",
              "loyalty_certificate_type_id": "0",
              "loyalty_allow_empty_code": true,
              "actual_amounts": [],
              "last_change_date": "2026-03-05T18:21:34-0500"
            },
            "storage": {
              "id": 36539,
              "title": "Products"
            },
            "sale_unit": null,
            "service_unit": null,
            "supplier": [],
            "client": [],
            "master": {
              "id": 26781,
              "name": "Angelina Jolie"
            },
            "unit": {
              "id": 1,
              "title": "Thing",
              "short_title": "PC."
            }
          },
          "meta": []
        }
      },
      "storage_operation_good_transaction_response_data_types": {
        "title": "Root Type for storage_operation_good_transaction_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Transaction ID"
                },
                "document_id": {
                  "type": "number",
                  "description": "Document ID"
                },
                "type_id": {
                  "type": "number",
                  "description": "Transaction type identifier"
                },
                "company_id": {
                  "type": "number",
                  "description": "location ID"
                },
                "good_id": {
                  "type": "number",
                  "description": "Item ID"
                },
                "amount": {
                  "type": "number",
                  "description": "Quantity of products"
                },
                "cost_per_unit": {
                  "type": "number",
                  "description": "Unit price",
                  "format": "float"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount",
                  "format": "float"
                },
                "cost": {
                  "type": "number",
                  "description": "The total cost of the products",
                  "format": "float"
                },
                "unit_id": {
                  "type": "number",
                  "description": "Unit ID"
                },
                "operation_unit_type": {
                  "type": "number",
                  "description": "Unit type: 1 - for sale, 2 - for write-off"
                },
                "storage_id": {
                  "type": "number",
                  "description": "Inventory ID"
                },
                "supplier_id": {
                  "type": "number",
                  "description": "Vendor ID"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "client_id": {
                  "type": "number",
                  "description": "Client ID"
                },
                "master_id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "create_date": {
                  "type": "string",
                  "description": "date of creation",
                  "format": "date-time"
                },
                "comment": {
                  "type": "string",
                  "description": "A comment"
                },
                "service_id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "user_id": {
                  "type": "number",
                  "description": "User ID"
                },
                "deleted": {
                  "type": "boolean",
                  "description": "Has the transaction been deleted?"
                },
                "pkg_amount": {
                  "type": "number",
                  "description": "Amount in a package"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (number of transactions found)"
          }
        },
        "description": "Get Product Transactions of a Document",
        "example": {
          "success": true,
          "data": [
            {
              "id": 3728232,
              "document_id": 22256643,
              "type_id": 1,
              "company_id": 4564,
              "good_id": 587018,
              "amount": -10,
              "cost_per_unit": 100,
              "discount": 0,
              "cost": 1000,
              "unit_id": 88272,
              "operation_unit_type": 1,
              "storage_id": 36539,
              "supplier_id": 0,
              "record_id": 0,
              "client_id": 0,
              "master_id": 49754,
              "create_date": "2026-09-21T23:00:00.000-05:00",
              "comment": "",
              "service_id": 0,
              "user_id": 3,
              "deleted": false,
              "pkg_amount": 0
            },
            {
              "id": 3728233,
              "document_id": 22256643,
              "type_id": 1,
              "company_id": 4564,
              "good_id": 232674,
              "amount": -10,
              "cost_per_unit": 127.5,
              "discount": 0,
              "cost": 1275,
              "unit_id": 1,
              "operation_unit_type": 2,
              "storage_id": 36539,
              "supplier_id": 0,
              "record_id": 0,
              "client_id": 0,
              "master_id": 49754,
              "create_date": "2026-09-21T23:00:00.000-05:00",
              "comment": "",
              "service_id": 0,
              "user_id": 3,
              "deleted": false,
              "pkg_amount": 0
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "storage_operation_finance_transaction_response_data_types": {
        "title": "Root Type for storage_operation_finance_transaction_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Transaction ID"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "type_id": {
                  "type": "number",
                  "description": "Transaction type identifier"
                },
                "expense_id": {
                  "type": "number",
                  "description": "Payment Item ID"
                },
                "account_id": {
                  "type": "number",
                  "description": "Checkout ID"
                },
                "amount": {
                  "type": "number",
                  "description": "Transaction amount",
                  "format": "float"
                },
                "client_id": {
                  "type": "number",
                  "description": "Client ID"
                },
                "master_id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "supplier_id": {
                  "type": "number",
                  "description": "Vendor ID"
                },
                "comment": {
                  "type": "string",
                  "description": "A comment"
                },
                "item_id": {
                  "type": "integer",
                  "format": "int32"
                },
                "target_type_id": {
                  "type": "integer",
                  "format": "int32"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "expense": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Payment Item ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Name of payment item"
                    }
                  },
                  "description": "Payment item"
                },
                "account": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Checkout ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Location account name"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Transaction type identifier"
                    },
                    "type": {
                      "type": "number",
                      "description": "Transaction type"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "location ID"
                    }
                  },
                  "description": "Location account"
                },
                "client": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Client name"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Customer phone"
                    }
                  },
                  "description": "Customer"
                },
                "master": {
                  "type": "array",
                  "description": "team member",
                  "items": {
                    "type": "object"
                  }
                },
                "supplier": {
                  "type": "array",
                  "description": "The supplier",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get document financial transactions",
        "example": {
          "success": true,
          "data": [
            {
              "id": 9053737,
              "date": "2026-09-21T23:00:00.000-05:00",
              "type_id": 2640,
              "expense_id": 2640,
              "account_id": 35501,
              "amount": 434,
              "client_id": 4240788,
              "master_id": 0,
              "supplier_id": 0,
              "comment": "Transaction comment",
              "item_id": 0,
              "target_type_id": 0,
              "record_id": 0,
              "expense": {
                "id": 2640,
                "title": "Provision of corporate services"
              },
              "account": {
                "id": 35501,
                "title": "Location account",
                "type_id": 0,
                "type": 0,
                "comment": "",
                "company_id": 4564
              },
              "client": {
                "id": 4240788,
                "name": "Client",
                "phone": "+13155550175"
              },
              "master": [],
              "supplier": []
            },
            {
              "id": 9053738,
              "date": "2026-09-21T23:00:00.000-05:00",
              "type_id": 2640,
              "expense_id": 2640,
              "account_id": 35501,
              "amount": 434,
              "client_id": 4240788,
              "master_id": 0,
              "supplier_id": 0,
              "comment": "Transaction comment",
              "item_id": 0,
              "target_type_id": 0,
              "record_id": 0,
              "expense": {
                "id": 2640,
                "title": "Provision of corporate services"
              },
              "account": {
                "id": 35501,
                "title": "Location account",
                "type_id": 0,
                "type": 0,
                "comment": "",
                "company_id": 4564
              },
              "client": {
                "id": 4240788,
                "name": "Client",
                "phone": "+13155550175"
              },
              "master": [],
              "supplier": []
            }
          ],
          "meta": []
        }
      },
      "technological_cards_response200_data_types": {
        "title": "Root Type for technological_cards_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of data objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Tech ID. cards"
                },
                "title": {
                  "type": "string",
                  "description": "The name of those cards"
                },
                "technological_card_items": {
                  "type": "array",
                  "description": "List of consumables kart",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Consumable ID"
                      },
                      "technological_card_id": {
                        "type": "number",
                        "description": "Tech ID. cards"
                      },
                      "storage_id": {
                        "type": "number",
                        "description": "Inventory ID"
                      },
                      "good_id": {
                        "type": "number",
                        "description": "Item ID"
                      },
                      "amount": {
                        "type": "number",
                        "description": "Quantity"
                      },
                      "unit": {
                        "type": "string",
                        "description": "unit of measurement"
                      },
                      "price": {
                        "type": "number",
                        "description": "Price",
                        "format": "double"
                      },
                      "title": {
                        "type": "string",
                        "description": "Name"
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of those. kart",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "title": "Tech map 1",
              "technological_card_items": [
                {
                  "id": 3,
                  "technological_card_id": 1,
                  "storage_id": 4234,
                  "good_id": 34234,
                  "amount": 12,
                  "unit": "l",
                  "price": 0.0742,
                  "title": "Consumable 3"
                }
              ]
            },
            {
              "id": 2,
              "title": "Tech map 2",
              "technological_card_items": [
                {
                  "id": 4,
                  "technological_card_id": 2,
                  "storage_id": 4234,
                  "good_id": 34235,
                  "amount": 10,
                  "unit": "l",
                  "price": 0.02412,
                  "title": "Consumable 4"
                }
              ]
            }
          ],
          "meta": []
        }
      },
      "technological_cards_consumables_response200_data_types": {
        "title": "Root Type for technological_cards_consumables_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "service_id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "technological_cards": {
                  "type": "array",
                  "description": "Technological cards",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "ID of those cards"
                      },
                      "title": {
                        "type": "string",
                        "description": "The name of those cards"
                      },
                      "technological_card_items": {
                        "type": "array",
                        "description": "Those consumables cards",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "number",
                              "description": "Consumable ID"
                            },
                            "technological_card_id": {
                              "type": "number",
                              "description": "Dash ID"
                            },
                            "storage_id": {
                              "type": "number",
                              "description": "Inventory ID"
                            },
                            "good_id": {
                              "type": "number",
                              "description": "Item ID"
                            },
                            "amount": {
                              "type": "number",
                              "description": "Quantity"
                            },
                            "price": {
                              "type": "number",
                              "description": "Price"
                            },
                            "good": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "number",
                                  "description": "Item ID"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Product Name"
                                },
                                "unit": {
                                  "type": "string",
                                  "description": "unit of measurement"
                                }
                              },
                              "description": "Product"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "consumables": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "goods_transaction_id": {
                        "type": "number",
                        "description": "Commodity transaction ID"
                      },
                      "record_id": {
                        "type": "number",
                        "description": "Appointment ID"
                      },
                      "service_id": {
                        "type": "number",
                        "description": "Service ID"
                      },
                      "storage_id": {
                        "type": "number",
                        "description": "Inventory ID"
                      },
                      "good_id": {
                        "type": "number",
                        "description": "Item ID"
                      },
                      "price": {
                        "type": "number",
                        "description": "Price"
                      },
                      "amount": {
                        "type": "number",
                        "description": "Quantity"
                      },
                      "good": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "number",
                            "description": "Item ID"
                          },
                          "title": {
                            "type": "string",
                            "description": "Product Name"
                          },
                          "unit": {
                            "type": "string",
                            "description": "unit of measurement"
                          }
                        },
                        "description": "Product"
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a list of tech cards and appointment consumables",
        "example": {
          "success": true,
          "data": [
            {
              "service_id": 21558,
              "record_id": 1233243,
              "technological_cards": [
                {
                  "id": 36069,
                  "title": "Tech map",
                  "technological_card_items": [
                    {
                      "id": 208568,
                      "technological_card_id": 36069,
                      "storage_id": 91303,
                      "good_id": 6858783,
                      "amount": 10,
                      "price": 1000,
                      "good": {
                        "id": 6858783,
                        "title": "Product",
                        "unit": "G"
                      }
                    }
                  ]
                }
              ],
              "consumables": [
                {
                  "goods_transaction_id": 2180771,
                  "record_id": 121793129,
                  "service_id": 695486,
                  "storage_id": 91303,
                  "good_id": 6858783,
                  "price": 1000,
                  "amount": 10,
                  "good": {
                    "id": 6858783,
                    "title": "Product",
                    "unit": "G"
                  }
                }
              ]
            }
          ],
          "meta": []
        }
      },
      "consumables": {
        "type": "object",
        "properties": {
          "consumables": {
            "type": "array",
            "description": "List of consumables",
            "items": {
              "type": "object",
              "required": [
                "amount",
                "good_id",
                "goods_transaction_id",
                "price",
                "record_id",
                "service_id",
                "storage_id"
              ],
              "properties": {
                "goods_transaction_id": {
                  "type": "number",
                  "description": "commodity transaction id"
                },
                "record_id": {
                  "type": "number",
                  "description": "appointment id"
                },
                "service_id": {
                  "type": "number",
                  "description": "service id"
                },
                "storage_id": {
                  "type": "number",
                  "description": "inventory id"
                },
                "good_id": {
                  "type": "number",
                  "description": "product id"
                },
                "price": {
                  "type": "number",
                  "description": "the cost of the consumable in the appointment"
                },
                "amount": {
                  "type": "number",
                  "description": "the number of consumables in the appointment"
                }
              }
            }
          }
        }
      },
      "technological_cards_consumables_response200_delete_data_types": {
        "title": "Root Type for technological_cards_consumables_response200_delete_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array with object",
            "items": {
              "type": "object",
              "properties": {
                "service_id": {
                  "type": "number",
                  "description": "Service ID"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "technological_cards": {
                  "type": "array",
                  "description": "Array of technological maps",
                  "items": {
                    "type": "object"
                  }
                },
                "consumables": {
                  "type": "array",
                  "description": "Consumables",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (empty array0)"
          }
        },
        "description": "Removes a routing from an appointment-service association",
        "example": {
          "success": true,
          "data": [
            {
              "service_id": 7224099,
              "record_id": 310013764,
              "technological_cards": [],
              "consumables": []
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "company_salon_id_sale_documentid_response_data_types": {
        "title": "Root Type for company_salon_id_sale_documentid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "state": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Selling unit ID",
                          "format": "int32"
                        },
                        "type": {
                          "type": "string",
                          "description": "Type (service/product)"
                        },
                        "title": {
                          "type": "string",
                          "description": "Name"
                        },
                        "amount": {
                          "type": "number",
                          "description": "Quantity",
                          "format": "int32"
                        },
                        "default_cost_per_unit": {
                          "type": "number",
                          "description": "Unit price",
                          "format": "float"
                        },
                        "default_cost_total": {
                          "type": "number",
                          "description": "Total default price",
                          "format": "float"
                        },
                        "client_discount_percent": {
                          "type": "number",
                          "description": "Discount percentage",
                          "format": "float"
                        },
                        "cost_to_pay_total": {
                          "type": "number",
                          "description": "Payable price",
                          "format": "float"
                        }
                      },
                      "description": "Selling unit"
                    }
                  },
                  "loyalty_transactions": {
                    "type": "array",
                    "description": "Loyalty Payment Transaction",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Loyalty transaction ID",
                          "format": "int32"
                        },
                        "document_id": {
                          "type": "integer",
                          "description": "Document ID",
                          "format": "int32"
                        },
                        "sale_item_id": {
                          "type": "integer",
                          "description": "Sold unit ID",
                          "format": "int32"
                        },
                        "sale_item_type": {
                          "type": "string",
                          "description": "Unit sold type"
                        },
                        "amount": {
                          "type": "number",
                          "description": "Transaction amount",
                          "format": "float"
                        },
                        "type_id": {
                          "type": "integer",
                          "description": "Transaction type identifier",
                          "format": "int32"
                        },
                        "created_at": {
                          "type": "string",
                          "description": "date of creation",
                          "format": "date-time"
                        },
                        "deposit_transaction_id": {
                          "type": "integer",
                          "description": "Transaction ID (depends on type)",
                          "format": "int32"
                        },
                        "chain": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Location chain ID",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string",
                              "description": "Location chain name"
                            }
                          },
                          "description": "Location chain"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Transaction type ID",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string",
                              "description": "Transaction type name"
                            }
                          },
                          "description": "Transaction type"
                        },
                        "deposit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Personal account ID",
                              "format": "int32"
                            },
                            "balance": {
                              "type": "number",
                              "description": "Available personal account balance",
                              "format": "double"
                            },
                            "reserved_balance": {
                              "type": "number",
                              "description": "Amount currently reserved by active holds",
                              "format": "double"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "description": "Client account type identifier",
                                  "format": "int32"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Name of the client account"
                                }
                              },
                              "description": "Client account type"
                            }
                          },
                          "description": "Withdrawal from personal account"
                        }
                      }
                    }
                  },
                  "payment_transactions": {
                    "type": "array",
                    "description": "Cashier payment transaction",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Payment transaction ID",
                          "format": "int32"
                        },
                        "document_id": {
                          "type": "integer",
                          "description": "Document ID",
                          "format": "int32"
                        },
                        "sale_item_id": {
                          "type": "integer",
                          "description": "Sold unit ID",
                          "format": "int32"
                        },
                        "sale_item_type": {
                          "type": "string",
                          "description": "Unit sold type"
                        },
                        "expense_id": {
                          "type": "integer",
                          "description": "Payment Item ID",
                          "format": "int32"
                        },
                        "account_id": {
                          "type": "integer",
                          "description": "Checkout ID",
                          "format": "int32"
                        },
                        "created_at": {
                          "type": "string",
                          "description": "date of creation"
                        },
                        "account": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Checkout ID",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string",
                              "description": "Location account name"
                            },
                            "is_cash": {
                              "type": "boolean",
                              "description": "Is the payment in cash"
                            },
                            "is_default": {
                              "type": "boolean",
                              "description": "Is the checkout by default"
                            }
                          },
                          "description": "Location account"
                        },
                        "expense": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Payment Item ID",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string",
                              "description": "Name of payment item"
                            }
                          },
                          "description": "Payment Article"
                        }
                      }
                    }
                  }
                }
              },
              "kkm_state": {
                "type": "object",
                "properties": {
                  "last_operation_type": {
                    "type": "integer",
                    "description": "Type of last KKM operation",
                    "format": "int32"
                  },
                  "transactions": {
                    "type": "array",
                    "description": "KKM transaction",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "KKM transaction ID",
                          "format": "int32"
                        },
                        "document_id": {
                          "type": "integer",
                          "description": "Document ID",
                          "format": "int32"
                        },
                        "print_date": {
                          "type": "string",
                          "description": "Check printing date",
                          "format": "date-time"
                        },
                        "printed_count": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "sum": {
                          "type": "integer",
                          "format": "int32"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Status ID",
                              "format": "int32"
                            },
                            "title": {
                              "type": "string",
                              "description": "Status name"
                            }
                          },
                          "description": "Receipt printing status"
                        },
                        "document": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "Document ID",
                              "format": "int32"
                            },
                            "type": {
                              "type": "integer",
                              "description": "Document Type",
                              "format": "int32"
                            },
                            "type_title": {
                              "type": "string",
                              "description": "Document type name"
                            }
                          }
                        },
                        "cashier": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "description": "team member ID",
                              "format": "int32"
                            },
                            "name": {
                              "type": "string",
                              "description": "team member name"
                            }
                          },
                          "description": "Cashier"
                        }
                      }
                    }
                  }
                }
              },
              "payment_methods": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "slug": {
                      "type": "string",
                      "description": "Payment method type"
                    },
                    "is_applicable": {
                      "type": "boolean",
                      "description": "Is it possible to use this method"
                    },
                    "applicable_amount": {
                      "type": "number",
                      "description": "Possible amount accepted for payment",
                      "format": "float"
                    },
                    "applicable_count": {
                      "type": "integer",
                      "description": "Possible number of visits (in case of membership)",
                      "format": "int32"
                    },
                    "applicable_value": {
                      "type": "number",
                      "description": "Applicable bonus (in the case of a loyalty program)",
                      "format": "float"
                    },
                    "account_id": {
                      "type": "integer",
                      "description": "Checkout ID (depends on slug)",
                      "format": "int32"
                    },
                    "account": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Checkout ID",
                          "format": "int32"
                        },
                        "title": {
                          "type": "string",
                          "description": "Location account name"
                        },
                        "is_cash": {
                          "type": "boolean",
                          "description": "Is the location account cash"
                        }
                      },
                      "description": "Location account"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get a sales transaction",
        "example": {
          "success": true,
          "data": {
            "state": {
              "items": [
                {
                  "id": 2181520,
                  "type": "good",
                  "title": "item 12",
                  "amount": 1,
                  "default_cost_per_unit": 1300,
                  "default_cost_total": 1300,
                  "client_discount_percent": 10,
                  "cost_to_pay_total": 1170
                },
                {
                  "id": 22017,
                  "type": "service",
                  "document_id": 8200391,
                  "title": "Manicure",
                  "amount": 1,
                  "default_cost_per_unit": 500,
                  "default_cost_total": 500,
                  "client_discount_percent": 10,
                  "cost_to_pay_total": 450
                }
              ],
              "loyalty_transactions": [
                {
                  "id": 25042,
                  "document_id": 8201102,
                  "sale_item_id": 2181521,
                  "sale_item_type": "good",
                  "amount": 9.9,
                  "type_id": 11,
                  "created_at": "2026-09-21T23:00:00.000-05:00",
                  "deposit_transaction_id": 775,
                  "chain": {
                    "id": 500,
                    "title": "YC BE chain"
                  },
                  "type": {
                    "id": 11,
                    "title": "Withdrawal from personal account"
                  },
                  "deposit": {
                    "id": 220,
                    "balance": 990.1,
                    "reserved_balance": 0,
                    "type": {
                      "id": 5,
                      "title": "deposit 1"
                    }
                  }
                },
                {
                  "id": 25043,
                  "document_id": 8201102,
                  "amount": 0.1,
                  "type_id": 2,
                  "created_at": "2026-09-21T23:00:00.000-05:00",
                  "loyalty_card_id": 185395,
                  "loyalty_program_id": 264,
                  "chain": {
                    "id": 231,
                    "title": "Example chain."
                  },
                  "type": {
                    "id": 2,
                    "title": "Loyalty programs"
                  },
                  "loyalty_card": {
                    "id": 185395,
                    "type_id": 265,
                    "number": 23100185395,
                    "balance": 50.15,
                    "type": {
                      "id": 265,
                      "type": "Loyalty program template test"
                    },
                    "chain": {
                      "id": 231,
                      "title": "Example chain."
                    }
                  },
                  "loyalty_program": {
                    "id": 264,
                    "title": "CASHBACK BigBro",
                    "type_id": 7,
                    "is_value_percent": true,
                    "type": {
                      "id": 7,
                      "title": "Cumulative cashback (paid)"
                    },
                    "chain": {
                      "id": 231,
                      "title": "Example chain."
                    }
                  }
                },
                {
                  "id": 25050,
                  "document_id": 8201102,
                  "sale_item_id": 2181521,
                  "sale_item_type": "good",
                  "amount": 100,
                  "type_id": 8,
                  "created_at": "2026-09-21T23:00:00.000-05:00",
                  "loyalty_certificate_id": 339,
                  "chain": {
                    "id": 79,
                    "title": "Bank 24"
                  },
                  "type": {
                    "id": 8,
                    "title": "Write-off from the certificate"
                  },
                  "loyalty_certificate": {
                    "id": 339,
                    "balance": 0,
                    "applicable_balance": 0,
                    "type": {
                      "id": 20,
                      "title": "Test Certificate",
                      "is_code_required": true
                    },
                    "chain": {
                      "id": 231,
                      "title": "Example chain."
                    }
                  }
                }
              ],
              "payment_transactions": [
                {
                  "id": 6033940,
                  "document_id": 8200904,
                  "sale_item_id": 2181442,
                  "sale_item_type": "good",
                  "expense_id": 7,
                  "account_id": 90218,
                  "amount": 32,
                  "account": {
                    "id": 90218,
                    "title": "Cash by default",
                    "is_cash": true,
                    "is_default": true
                  },
                  "expense": {
                    "id": 7,
                    "title": "Sale of goods"
                  }
                },
                {
                  "id": 6033941,
                  "document_id": 8200904,
                  "sale_item_id": 2181442,
                  "sale_item_type": "good",
                  "expense_id": 7,
                  "account_id": 90218,
                  "amount": 27,
                  "account": {
                    "id": 90218,
                    "title": "location account",
                    "is_cash": true,
                    "is_default": false
                  },
                  "expense": {
                    "id": 7,
                    "title": "Sale of goods"
                  }
                },
                {
                  "id": 6034121,
                  "document_id": 8201102,
                  "sale_item_id": 2181521,
                  "sale_item_type": "good",
                  "expense_id": 7,
                  "account_id": 23182,
                  "amount": 43,
                  "account": {
                    "id": 23182,
                    "title": "Cards - acquiring by default",
                    "is_cash": false,
                    "is_default": true
                  },
                  "expense": {
                    "id": 7,
                    "title": "Sale of goods"
                  }
                },
                {
                  "id": 6034122,
                  "document_id": 8201102,
                  "sale_item_id": 2181521,
                  "sale_item_type": "good",
                  "expense_id": 7,
                  "account_id": 23182,
                  "amount": 12,
                  "account": {
                    "id": 23182,
                    "title": "Cards - acquiring",
                    "is_cash": false,
                    "is_default": false
                  },
                  "expense": {
                    "id": 7,
                    "title": "Sale of goods"
                  }
                }
              ]
            },
            "kkm_state": {
              "last_operation_type": 1,
              "transactions": [
                {
                  "id": 2424,
                  "document_id": 8200904,
                  "print_date": "2026-09-21T23:00:00.000-05:00",
                  "printed_count": 0,
                  "sum": 0,
                  "type": {
                    "id": 0,
                    "title": "Sale operation"
                  },
                  "status": {
                    "id": 1,
                    "title": "Successfully"
                  },
                  "document": {
                    "id": 7215,
                    "type": 1,
                    "type_title": "Sale of goods"
                  },
                  "cashier": {
                    "id": 746310,
                    "name": "Jack Smith"
                  }
                }
              ]
            },
            "payment_methods": [
              {
                "slug": "account",
                "is_applicable": false,
                "applicable_amount": 1170,
                "applicable_count": 0,
                "applicable_value": 0,
                "account_id": 36785,
                "account": {
                  "id": 36785,
                  "title": "Location account - non-cash",
                  "is_cash": false
                }
              },
              {
                "slug": "loyalty_card",
                "is_applicable": true,
                "applicable_amount": 51.65,
                "applicable_count": 0,
                "applicable_value": 0,
                "loyalty_card_id": 19283,
                "loyalty_card": {
                  "id": 19283,
                  "type_id": 155,
                  "number": 31200019283,
                  "balance": 51.65,
                  "type": {
                    "id": 155,
                    "type": "discount card"
                  },
                  "chain": {
                    "id": 312,
                    "title": "Trinity group"
                  }
                }
              },
              {
                "slug": "loyalty_program",
                "is_applicable": true,
                "applicable_amount": 234,
                "applicable_count": 0,
                "applicable_value": 20,
                "loyalty_card_id": 19283,
                "loyalty_program_id": 183,
                "loyalty_card": {
                  "id": 19283,
                  "type_id": 155,
                  "number": 31200019283,
                  "balance": 51.65,
                  "type": {
                    "id": 155,
                    "type": "discount card"
                  },
                  "chain": {
                    "id": 312,
                    "title": "Trinity group"
                  }
                },
                "loyalty_program": {
                  "id": 183,
                  "title": "permanent discount",
                  "type_id": 1,
                  "is_value_percent": true,
                  "type": {
                    "id": 1,
                    "title": "Fixed discount"
                  },
                  "chain": {
                    "id": 312,
                    "title": "Trinity group"
                  }
                }
              },
              {
                "slug": "loyalty_abonement",
                "is_applicable": false,
                "applicable_amount": 0,
                "applicable_count": 0,
                "applicable_value": 0,
                "loyalty_abonement_id": 27,
                "loyalty_abonement": {
                  "id": 27,
                  "is_united_balance": false,
                  "united_balance": 0,
                  "type": {
                    "id": 7,
                    "title": "subscription to 5000 QA net",
                    "is_code_required": true
                  },
                  "chain": {
                    "id": 231,
                    "title": "Example chain."
                  },
                  "balance_container": {
                    "links": [
                      {
                        "count": 5,
                        "category": {
                          "id": 229680,
                          "category_id": 1,
                          "title": "Manicure"
                        }
                      },
                      {
                        "count": 5,
                        "category": {
                          "id": 429813,
                          "category_id": 429812,
                          "title": "1 Lesson"
                        }
                      }
                    ]
                  }
                }
              },
              {
                "slug": "loyalty_certificate",
                "is_applicable": true,
                "applicable_amount": 1170,
                "applicable_count": 0,
                "applicable_value": 0,
                "loyalty_certificate_id": 338,
                "loyalty_certificate": {
                  "id": 338,
                  "balance": 10000,
                  "applicable_balance": 10000,
                  "type": {
                    "id": 130,
                    "title": "test",
                    "is_code_required": true
                  },
                  "chain": {
                    "id": 231,
                    "title": "Example chain."
                  }
                }
              },
              {
                "slug": "referral_loyalty_program",
                "is_applicable": false,
                "applicable_amount": 0,
                "applicable_count": 0,
                "applicable_value": 0,
                "loyalty_program_id": 424,
                "loyalty_program": {
                  "id": 424,
                  "title": "Fixed discount",
                  "type_id": 1,
                  "is_value_percent": true,
                  "type": {
                    "id": 1,
                    "title": "Fixed discount"
                  },
                  "chain": {
                    "id": 231,
                    "title": "Example chain."
                  }
                }
              },
              {
                "slug": "deposit",
                "is_applicable": true,
                "applicable_amount": 9.9,
                "applicable_count": 0,
                "applicable_value": 0,
                "deposit_id": 220,
                "deposit": {
                  "id": 220,
                  "balance": 1000,
                  "reserved_balance": 0,
                  "type": {
                    "id": 5,
                    "title": "deposit 1"
                  }
                }
              }
            ]
          },
          "meta": []
        }
      },
      "company_salonid_sale_documentid_payment_account": {
        "title": "Payment at the checkout",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "account_id": {
                    "type": "integer",
                    "description": "Checkout ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "amount": {
                "type": "number",
                "description": "Payment amount",
                "format": "float"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "Payment at the checkout",
        "example": {
          "payment": {
            "method": {
              "slug": "account",
              "account_id": 90218
            },
            "amount": 123
          }
        }
      },
      "company_salonid_sale_documentid_payment_deposit": {
        "title": "Payment via client personal account",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "deposit_id": {
                    "type": "integer",
                    "description": "Client's personal account ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "amount": {
                "type": "number",
                "description": "Payment amount",
                "format": "float"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "Loyalty payment (various methods)",
        "example": {
          "payment": {
            "method": {
              "slug": "deposit",
              "deposit_id": 220
            },
            "amount": 123
          }
        }
      },
      "company_salonid_sale_documentid_payment_certificate": {
        "title": "Payment with a gift card",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "loyalty_certificate_id": {
                    "type": "integer",
                    "description": "Certificate ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "amount": {
                "type": "number",
                "description": "Payment amount",
                "format": "float"
              },
              "number": {
                "type": "string",
                "description": "Certificate code"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "In the case of payment by a certificate, if the user does not have the \"Pay by certificate and membership without code\" right, the \"number\" (string) parameter containing the certificate code must also be passed in the request body.",
        "example": {
          "payment": {
            "method": {
              "slug": "loyalty_certificate",
              "loyalty_certificate_id": 325
            },
            "amount": 123,
            "number": 123123
          }
        }
      },
      "company_salonid_sale_documentid_payment_abonements": {
        "title": "Payment with membership - works only for the visit",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "loyalty_abonement_id": {
                    "type": "integer",
                    "description": "Membership ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "number": {
                "type": "string",
                "description": "Subscription code"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "In the case of payment by membership, if the user does not have the \"Pay by certificate and membership without code\" right, the \"number\" (string) parameter containing the membership code must also be passed in the request body.",
        "example": {
          "payment": {
            "method": {
              "slug": "loyalty_abonement",
              "loyalty_abonement_id": 275
            },
            "number": 123123
          }
        }
      },
      "company_salonid_sale_documentid_payment_referal": {
        "title": "Pay with referral program - works only for visit",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "loyalty_program_id": {
                    "type": "integer",
                    "description": "Loyalty program ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "referrer_phone": {
                "type": "string",
                "description": "Phone of the inviter"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "Pay with referral program - works only for visit",
        "example": {
          "payment": {
            "method": {
              "slug": "referral_loyalty_program",
              "loyalty_program_id": 717
            },
            "referrer_phone": "+13155550175"
          }
        }
      },
      "company_salonid_sale_documentid_payment_loyalty_card": {
        "title": "Pay with a loyalty card",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "loyalty_card_id": {
                    "type": "integer",
                    "description": "Loyalty card ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              },
              "amount": {
                "type": "number",
                "description": "Payment amount",
                "format": "float"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "Pay with a loyalty card",
        "example": {
          "payment": {
            "method": {
              "slug": "loyalty_card",
              "loyalty_card_id": 185395
            },
            "amount": 123
          }
        }
      },
      "company_salonid_sale_documentid_payment_loyalty_program": {
        "title": "Pay with a loyalty program",
        "type": "object",
        "properties": {
          "payment": {
            "type": "object",
            "properties": {
              "method": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "Payment method type"
                  },
                  "loyalty_program_id": {
                    "type": "integer",
                    "description": "Loyalty program ID",
                    "format": "int32"
                  },
                  "loyalty_card_id": {
                    "type": "integer",
                    "description": "Loyalty card ID",
                    "format": "int32"
                  }
                },
                "description": "Payment method"
              }
            },
            "description": "Object containing the payment method"
          }
        },
        "description": "Pay with a loyalty program",
        "example": {
          "payment": {
            "method": {
              "slug": "loyalty_program",
              "loyalty_program_id": 339,
              "loyalty_card_id": 185395
            }
          }
        }
      },
      "accounts_response_data_types": {
        "title": "Root Type for accounts_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Checkout ID"
                },
                "title": {
                  "type": "string",
                  "description": "Location account name"
                },
                "type": {
                  "type": "number",
                  "description": "1 - for non-cash payments, 0 for cash"
                },
                "comment": {
                  "type": "string",
                  "description": "Description for checkout"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get location accounts",
        "example": {
          "success": true,
          "data": [
            {
              "id": 13881,
              "title": "Main location account",
              "type": 0,
              "comment": "Standing at the reception"
            },
            {
              "id": 13882,
              "title": "Payment account",
              "type": 1,
              "comment": "For non-cash payments"
            },
            {
              "id": 21961,
              "title": "Advances",
              "type": 0,
              "comment": ""
            }
          ],
          "meta": []
        }
      },
      "kkm_transactions_response_data_type": {
        "title": "Root Type for kkm_transactions_response_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Transaction ID",
                  "format": "int32"
                },
                "print_date": {
                  "type": "string",
                  "description": "Check printing date",
                  "format": "date-time"
                },
                "printed_count": {
                  "type": "number",
                  "description": "Number of checks printed"
                },
                "sum": {
                  "type": "integer",
                  "description": "Sum",
                  "format": "int32"
                },
                "type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Operation type identifier",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Operation name"
                    }
                  },
                  "description": "Type of transaction"
                },
                "status": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Status ID",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Status name"
                    }
                  },
                  "description": "Receipt printing status"
                },
                "document": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Document ID",
                      "format": "int32"
                    },
                    "type": {
                      "type": "integer",
                      "description": "Document type identifier",
                      "format": "int32"
                    },
                    "type_title": {
                      "type": "string",
                      "description": "The name of the entity to which the document belongs"
                    }
                  },
                  "description": "Transaction document"
                },
                "cashier": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "team member ID",
                      "format": "int32"
                    },
                    "name": {
                      "type": "string",
                      "description": "team member name"
                    }
                  },
                  "description": "Cashier"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of transactions found)"
          }
        },
        "description": "Get transactions",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1059,
              "print_date": "2026-09-21T23:00:00.000-05:00",
              "printed_count": 1,
              "sum": 10,
              "type": {
                "id": 1,
                "title": "Sales return operation"
              },
              "status": {
                "id": 3,
                "title": "Runtime error"
              },
              "document": {
                "id": 2045,
                "type": 7,
                "type_title": "Visit"
              },
              "cashier": {
                "id": 746310,
                "name": "Jack Smith"
              }
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "kkm_transactions_print_response_data_type": {
        "title": "Root Type for kkm_transactions_print_response_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "kkm_type": {
                "type": "integer",
                "description": "Type of KKM operation",
                "format": "int32"
              },
              "kkm_transactions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Transaction ID",
                      "format": "int32"
                    },
                    "print_date": {
                      "type": "string",
                      "description": "Check printing date",
                      "format": "date-time"
                    },
                    "printed_count": {
                      "type": "number",
                      "description": "Number of checks printed"
                    },
                    "sum": {
                      "type": "integer",
                      "description": "Sum",
                      "format": "int32"
                    },
                    "type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Operation type identifier",
                          "format": "int32"
                        },
                        "title": {
                          "type": "string",
                          "description": "Operation name"
                        }
                      },
                      "description": "Type of transaction"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Status ID",
                          "format": "int32"
                        },
                        "title": {
                          "type": "string",
                          "description": "Status name"
                        }
                      },
                      "description": "Receipt printing status"
                    },
                    "document": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Document ID",
                          "format": "int32"
                        },
                        "type": {
                          "type": "integer",
                          "description": "Document type identifier",
                          "format": "int32"
                        },
                        "type_title": {
                          "type": "string",
                          "description": "The name of the entity to which the document belongs"
                        }
                      },
                      "description": "Transaction document"
                    },
                    "cashier": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "team member ID",
                          "format": "int32"
                        },
                        "name": {
                          "type": "string",
                          "description": "team member name"
                        }
                      },
                      "description": "Cashier"
                    }
                  }
                }
              },
              "status": {
                "type": "integer",
                "format": "int32"
              },
              "bill_json": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {}
                }
              }
            },
            "description": "Array of objects with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Print receipt",
        "example": {
          "success": true,
          "data": {
            "kkm_type": 0,
            "kkm_transactions": [
              {
                "id": 1954,
                "print_date": "2026-09-21T23:00:00.000-05:00",
                "printed_count": 0,
                "sum": 0,
                "type": {
                  "id": 0,
                  "title": "Sale operation"
                },
                "status": {
                  "id": 2,
                  "title": "Sent for printing"
                },
                "document": {
                  "id": 164,
                  "type": 9,
                  "type_title": "Deposit replenishment"
                },
                "cashier": {
                  "id": 1138453,
                  "name": "Jack Smith"
                }
              }
            ],
            "status": 2,
            "bill_json": [
              {}
            ]
          },
          "meta": []
        }
      },
      "transaction_companyid_response_data_types": {
        "title": "Root Type for transaction_companyid_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Transaction ID"
                },
                "document_id": {
                  "type": "number",
                  "description": "Document ID"
                },
                "expense": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Payment type ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Payment type name"
                    }
                  },
                  "description": "Payment type"
                },
                "date": {
                  "type": "string",
                  "description": "Transaction creation date",
                  "format": "date-time"
                },
                "amount": {
                  "type": "number",
                  "description": "Transaction amount",
                  "format": "float"
                },
                "comment": {
                  "type": "string",
                  "description": "A comment"
                },
                "master": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "team member name"
                    }
                  },
                  "description": "Team Member"
                },
                "supplier": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Supplier ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Counterparty name"
                    }
                  },
                  "description": "counterparty"
                },
                "account": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Checkout ID"
                    },
                    "title": {
                      "type": "string",
                      "description": "Location account name"
                    }
                  },
                  "description": "Location account"
                },
                "client": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Client name"
                    },
                    "phone": {
                      "type": "string",
                      "description": "Customer phone"
                    }
                  },
                  "description": "Customer"
                },
                "last_change_date": {
                  "type": "string",
                  "description": "Last modified date",
                  "format": "date-time"
                },
                "record_id": {
                  "type": "number",
                  "description": "Appointment ID"
                },
                "visit_id": {
                  "type": "number",
                  "description": "Visit ID"
                },
                "sold_item_id": {
                  "type": "number",
                  "description": "Identifier of the sold product/service"
                },
                "sold_item_type": {
                  "type": "number",
                  "description": "Sale entity type (product/service)"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get transactions",
        "example": {
          "success": true,
          "data": [
            {
              "id": 4815162342,
              "document_id": 22256641,
              "expense": {
                "id": 5,
                "title": "Provision of services"
              },
              "date": "2026-04-13T15:34:31-0500",
              "amount": 1000,
              "comment": "Comment",
              "master": {
                "id": 1926,
                "title": "Sweeney Todd"
              },
              "supplier": {
                "id": 1968,
                "title": "George"
              },
              "account": {
                "id": 23182,
                "title": "Cards"
              },
              "client": {
                "id": 481516,
                "name": "John Turk",
                "phone": 13155550176
              },
              "last_change_date": "2026-02-01T12:00:00-0500",
              "record_id": 308786662,
              "visit_id": 262551993,
              "sold_item_id": 7134634,
              "sold_item_type": "service"
            }
          ],
          "meta": []
        }
      },
      "finance_transaction_request_data_types": {
        "title": "Root Type for finance_transaction_request_data_types",
        "type": "object",
        "properties": {
          "expense_id": {
            "type": "number",
            "description": "Payment item"
          },
          "amount": {
            "type": "number",
            "description": "Transaction amount",
            "format": "float"
          },
          "account_id": {
            "type": "number",
            "description": "Checkout ID"
          },
          "client_id": {
            "type": "number",
            "description": "Client ID"
          },
          "supplier_id": {
            "type": "number",
            "description": "Supplier ID"
          },
          "master_id": {
            "type": "number",
            "description": "team member ID"
          },
          "comment": {
            "type": "number",
            "description": "A comment"
          },
          "date": {
            "type": "string",
            "description": "Transaction creation date",
            "format": "date-time"
          }
        },
        "description": "Create a Financial Transaction",
        "example": {
          "expense_id": 2640,
          "amount": 100,
          "account_id": 39105,
          "client_id": 4240788,
          "supplier_id": 0,
          "master_id": 0,
          "comment": "Test transaction comment",
          "date": "2026-08-29T10:00:00-05:00"
        }
      },
      "finance_transaction_response_data_types": {
        "title": "Root Type for finance_transaction_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Transaction ID"
              },
              "document_id": {
                "type": "number",
                "description": "Document ID"
              },
              "date": {
                "type": "string",
                "description": "Transaction creation date",
                "format": "date-time"
              },
              "type_id": {
                "type": "number",
                "description": "Payment type ID"
              },
              "expense_id": {
                "type": "number",
                "description": "Payment Item ID"
              },
              "account_id": {
                "type": "number",
                "description": "Checkout ID"
              },
              "amount": {
                "type": "number",
                "description": "Transaction amount",
                "format": "float"
              },
              "client_id": {
                "type": "number",
                "description": "Client ID"
              },
              "master_id": {
                "type": "number",
                "description": "team member ID"
              },
              "supplier_id": {
                "type": "number",
                "description": "Supplier ID"
              },
              "comment": {
                "type": "string",
                "description": "A comment"
              },
              "item_id": {
                "type": "integer",
                "format": "int32"
              },
              "target_type_id": {
                "type": "integer",
                "format": "int32"
              },
              "record_id": {
                "type": "number",
                "description": "Appointment ID"
              },
              "goods_transaction_id": {
                "type": "number",
                "description": "Commodity transaction ID"
              },
              "expense": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Payment type ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Payment type name"
                  }
                },
                "description": "Payment type"
              },
              "account": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Checkout ID"
                  },
                  "title": {
                    "type": "string",
                    "description": "Location account name"
                  },
                  "is_cash": {
                    "type": "boolean",
                    "description": "Is cash"
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "Is the checkout by default"
                  }
                },
                "description": "Location account"
              },
              "client": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Client ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "Client name"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Customer phone"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client Email"
                  }
                },
                "description": "Customer"
              },
              "master": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "team member ID"
                  },
                  "name": {
                    "type": "string",
                    "description": "team member name"
                  }
                },
                "description": "team member"
              },
              "supplier": {
                "type": "array",
                "description": "counterparty",
                "items": {
                  "type": "object"
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create a Financial Transaction",
        "example": {
          "success": true,
          "data": {
            "id": 277016617,
            "document_id": 0,
            "date": "2026-09-21T23:00:00.000-05:00",
            "type_id": 5,
            "expense_id": 5,
            "account_id": 774020,
            "amount": 100,
            "client_id": 51520012,
            "master_id": 921395,
            "supplier_id": 0,
            "comment": "Transaction comment",
            "item_id": 0,
            "target_type_id": 0,
            "record_id": 0,
            "goods_transaction_id": 0,
            "expense": {
              "id": 5,
              "title": "Provision of services"
            },
            "account": {
              "id": 774020,
              "title": "Archive location account",
              "is_cash": true,
              "is_default": false
            },
            "client": {
              "id": 51520012,
              "name": "Sweeney Todd",
              "phone": "+13155550175",
              "email": "mail@example.com"
            },
            "master": {
              "id": 921395,
              "name": "Valeria"
            },
            "supplier": []
          },
          "meta": []
        }
      },
      "sms_clients_by_id_request_data_types": {
        "title": "Root Type for sms_clients_by_id_request_data_types",
        "type": "object",
        "properties": {
          "client_ids": {
            "type": "array",
            "description": "Array of client IDs",
            "items": {
              "type": "number"
            }
          },
          "text": {
            "type": "string",
            "description": "SMS text message"
          }
        },
        "description": "Send SMS to the list of clients",
        "example": {
          "client_ids": [
            1,
            2,
            3,
            4,
            5
          ],
          "text": "Dear clients, we congratulate you on being our clients! You are very lucky!"
        }
      },
      "sms_clients_by_id_response_data_types": {
        "title": "Root Type for sms_clients_by_id_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "string",
            "description": "Is null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "An object containing a 201 status code message"
          }
        },
        "description": "Send SMS to the list of clients",
        "example": {
          "success": true,
          "meta": {
            "message": "Accepted"
          }
        }
      },
      "sms_clients_by_filter_request_data_types": {
        "title": "Root Type for sms_clients_by_filter_request_data_types",
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "SMS text message"
          }
        },
        "description": "Send SMS campaigns to customers matching the filters",
        "example": {
          "text": "Dear clients, we congratulate you on being our clients! You are very lucky!"
        }
      },
      "email_clients_by_id_request_data_types": {
        "title": "Root Type for email_clients_by_id_request_data_types",
        "required": [
          "client_ids",
          "subject",
          "text"
        ],
        "type": "object",
        "properties": {
          "client_ids": {
            "type": "array",
            "description": "Array of client IDs",
            "items": {
              "type": "number"
            }
          },
          "subject": {
            "type": "string",
            "description": "Email Subject"
          },
          "text": {
            "type": "string",
            "description": "Email text"
          }
        },
        "description": "Send Email newsletter according to the list of clients",
        "example": {
          "client_ids": [
            1,
            2,
            3,
            4,
            5
          ],
          "subject": "Important!",
          "text": "Dear clients, we congratulate you on being our clients! You are very lucky!"
        }
      },
      "email_clients_by_filter_request_data_types": {
        "title": "Root Type for email_clients_by_filter_request_data_types",
        "required": [
          "subject",
          "text"
        ],
        "type": "object",
        "properties": {
          "subject": {
            "type": "string",
            "description": "Email Subject"
          },
          "text": {
            "type": "string",
            "description": "Email text"
          }
        },
        "description": "Send email campaigns for clients matching the filters",
        "example": {
          "subject": "Important!",
          "text": "Dear clients, we congratulate you on being our clients! You are very lucky!"
        }
      },
      "delivery_status_request_data_types": {
        "title": "Root Type for delivery_status_request_data_types",
        "type": "array",
        "description": "Getting message statuses",
        "example": [
          {
            "id": "232674",
            "status": 1,
            "payment_sum": 0.045,
            "currency_iso": "EUR",
            "parts_amount": 2
          }
        ],
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Identifier"
            },
            "status": {
              "type": "number",
              "description": "Message status"
            },
            "payment_sum": {
              "type": "number",
              "description": "Full message cost"
            },
            "currency_iso": {
              "type": "string",
              "description": "Currency ISO"
            },
            "parts_amount": {
              "type": "number",
              "description": "Amount of message's parts"
            }
          }
        }
      },
      "company_get_online_settings_response_data_field_data_types": {
        "title": "Root Type for company_get_online_settings_response_data_field_data_types",
        "required": [
          "activity_online_record_clients_count_max",
          "any_master",
          "confirm_number",
          "seance_delay_step"
        ],
        "type": "object",
        "properties": {
          "confirm_number": {
            "type": "boolean",
            "description": "Confirm customer number via SMS"
          },
          "any_master": {
            "type": "boolean",
            "description": "\"Any team member\" mode"
          },
          "seance_delay_step": {
            "maximum": 1380,
            "minimum": 0,
            "type": "integer",
            "description": "Delay to the next session, in minutes from 0 to 23 hours (inclusive) in increments of 30 minutes"
          },
          "activity_online_record_clients_count_max": {
            "maximum": 255,
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of seats in one group event"
          }
        },
        "description": "Online booking settings for a location",
        "example": {
          "confirm_number": false,
          "any_master": true,
          "seance_delay_step": 90,
          "activity_online_record_clients_count_max": 1
        }
      },
      "company_get_online_settings_response_data_types": {
        "title": "Root Type for company_get_online_settings_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "$ref": "#/components/schemas/company_get_online_settings_response_data_field_data_types"
          },
          "meta": {
            "type": "array",
            "description": "metadata",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Getting Online Booking Settings",
        "example": {
          "success": true,
          "data": {
            "confirm_number": false,
            "any_master": true,
            "seance_delay_step": 90,
            "activity_online_record_clients_count_max": 1
          },
          "meta": []
        }
      },
      "company_update_online_settings_data_types": {
        "title": "Root Type for company_update_online_settings_data_type",
        "required": [
          "activity_online_record_clients_count_max",
          "any_master",
          "confirm_number",
          "seance_delay_step"
        ],
        "type": "object",
        "properties": {
          "confirm_number": {
            "type": "boolean",
            "description": "Confirm customer number via SMS"
          },
          "any_master": {
            "type": "boolean",
            "description": "\"Any team member\" mode"
          },
          "seance_delay_step": {
            "maximum": 1380,
            "minimum": 0,
            "type": "integer",
            "description": "Delay to the next session, in minutes from 0 to 23 hours (inclusive) in increments of 30 minutes"
          },
          "activity_online_record_clients_count_max": {
            "maximum": 255,
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of seats in one group event"
          }
        },
        "description": "",
        "example": {
          "confirm_number": false,
          "any_master": true,
          "seance_delay_step": 90,
          "activity_online_record_clients_count_max": 1
        }
      },
      "bookform_settings_response": {
        "title": "Root Type BookformSettingsResponse",
        "required": [
          "ab_test_enabled",
          "button_animation",
          "button_color",
          "button_position",
          "datetime_step_num",
          "description",
          "form_position",
          "html_code",
          "id",
          "is_default",
          "master_step_default",
          "master_step_hide",
          "master_step_num",
          "service_step_default",
          "service_step_hide",
          "service_step_num",
          "show_button",
          "title",
          "without_menu"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "appointment widget ID"
          },
          "title": {
            "type": "string",
            "description": "Name of the appointment widget"
          },
          "description": {
            "type": "string",
            "description": "appointment widget description"
          },
          "is_default": {
            "type": "boolean",
            "description": "Default appointment widget flag"
          },
          "without_menu": {
            "type": "boolean",
            "description": "Step mode flag"
          },
          "service_step_default": {
            "type": "number",
            "description": "Service ID"
          },
          "service_step_hide": {
            "type": "boolean",
            "description": "Service Hiding Flag"
          },
          "master_step_default": {
            "type": "number",
            "description": "team member ID"
          },
          "master_step_hide": {
            "type": "boolean",
            "description": "team member hide flag"
          },
          "service_step_num": {
            "type": "number",
            "description": "Service serial number"
          },
          "master_step_num": {
            "type": "number",
            "description": "Team Member serial number"
          },
          "datetime_step_num": {
            "type": "number",
            "description": "Sequence number of date and time"
          },
          "show_button": {
            "type": "boolean",
            "description": "Button Visibility Step"
          },
          "button_position": {
            "type": "string",
            "description": "Button location on the page"
          },
          "form_position": {
            "type": "string",
            "description": "Panel position on the page"
          },
          "button_color": {
            "type": "string",
            "description": "Button color"
          },
          "button_animation": {
            "type": "boolean",
            "description": "Button animation enable flag"
          },
          "html_code": {
            "type": "string",
            "description": "Code for inserting a button on the site"
          },
          "ab_test_enabled": {
            "type": "boolean",
            "description": "Flag for enabling letterform ab-test"
          },
          "is_chain": {
            "type": "boolean",
            "description": "Chain booking form flag"
          },
          "sequence_type": {
            "type": "string",
            "description": "Sequence type (e.g., \"steps\")"
          },
          "service_step_title": {
            "type": "string",
            "description": "Service step title"
          },
          "master_step_title": {
            "type": "string",
            "description": "Team member step title"
          },
          "specialization_display_mode": {
            "type": "number",
            "description": "Specialization display mode"
          },
          "datetime_step_title": {
            "type": "string",
            "description": "Date/time step title"
          },
          "html_code_v2": {
            "type": "string",
            "description": "Version 2 of HTML code for button insertion"
          },
          "map_type": {
            "type": "number",
            "description": "Map type identifier"
          },
          "default_language_id": {
            "type": "number",
            "description": "Default language ID"
          },
          "group_id": {
            "type": "number",
            "description": "Group ID"
          },
          "facebook_pixel_id": {
            "type": "string",
            "description": "Facebook Pixel ID"
          },
          "vk_pixel_id": {
            "type": "string",
            "description": "VK Pixel ID"
          },
          "online_sales_group_id": {
            "type": "number",
            "description": "Online sales group ID"
          },
          "service_step_category_view_type": {
            "type": "string",
            "description": "Service step category view type (e.g., \"horizontal_tags\")"
          },
          "salon_select_type_code": {
            "type": "string",
            "description": "Location select type code (e.g., \"list\")"
          },
          "record_type_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "Appointment type ID"
          },
          "display_activity_type": {
            "type": "string",
            "description": "Display event type (e.g., \"all\")"
          },
          "is_multiple_activity_record": {
            "type": "boolean",
            "description": "Multiple event appointment flag"
          },
          "activity_record_count": {
            "type": "number",
            "description": "Event appointment count limit"
          },
          "header_images": {
            "type": [
              "object",
              "null"
            ],
            "description": "Header images configuration"
          },
          "is_weekly_view_enabled": {
            "type": "boolean",
            "description": "Weekly view enabled flag"
          },
          "show_weekly_view_without_online_booking": {
            "type": "boolean",
            "description": "Show weekly view without online booking flag"
          },
          "weekly_view_default_salon_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "Default location ID for weekly view"
          }
        },
        "description": "appointment Widget Settings"
      },
      "booking_form_list_response_data_type": {
        "required": [
          "data",
          "meta",
          "success"
        ],
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Array of data",
            "items": {
              "$ref": "#/components/schemas/bookform_settings_response"
            }
          },
          "meta": {
            "type": "object",
            "description": "Metadata (contains the total count of bookforms)",
            "properties": {
              "count": {
                "type": "number",
                "description": "Total count of booking forms"
              }
            }
          },
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          }
        },
        "description": "List of letterforms"
      },
      "bookform_create_request": {
        "title": "Root Type BookformCreateRequest",
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Name of the appointment widget"
          },
          "description": {
            "type": "string",
            "description": "appointment widget description",
            "default": ""
          },
          "is_default": {
            "type": "boolean",
            "description": "Default appointment widget flag",
            "default": false
          },
          "without_menu": {
            "type": "boolean",
            "description": "Step mode flag",
            "default": false
          },
          "service_step_default": {
            "type": "number",
            "description": "Service ID"
          },
          "service_step_hide": {
            "type": "boolean",
            "description": "Service Hiding Flag",
            "default": false
          },
          "master_step_default": {
            "type": "number",
            "description": "team member ID"
          },
          "master_step_hide": {
            "type": "boolean",
            "description": "team member hide flag",
            "default": false
          },
          "service_step_num": {
            "type": "number",
            "description": "Service step sequence number"
          },
          "master_step_num": {
            "type": "number",
            "description": "Sequence number of the wizard step"
          },
          "datetime_step_num": {
            "type": "number",
            "description": "Sequence number of the date and time step"
          },
          "show_button": {
            "type": "boolean",
            "description": "Button visibility flag",
            "default": true
          },
          "button_position": {
            "type": "string",
            "description": "Button location on the page",
            "default": "bottom right",
            "enum": [
              "bottom right",
              "bottom left",
              "top right",
              "top left "
            ]
          },
          "form_position": {
            "type": "string",
            "description": "Panel position on the page",
            "default": "right",
            "enum": [
              "right",
              "left"
            ]
          },
          "button_color": {
            "type": "string",
            "description": "Button color",
            "default": "#1c84c6"
          },
          "button_animation": {
            "type": "boolean",
            "description": "Button animation enable flag",
            "default": true
          }
        },
        "description": "Request to create a letterform"
      },
      "booking_form_response_data_type": {
        "required": [
          "data",
          "meta",
          "success"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/bookform_settings_response"
          },
          "meta": {
            "type": "array",
            "description": "Metadata",
            "items": {
              "type": "object"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Success status (true)"
          }
        },
        "description": "appointment Widget Settings"
      },
      "bookform_update_request": {
        "title": "Root Type for BookformUpdateRequest",
        "required": [
          "button_animation",
          "button_color",
          "button_position",
          "datetime_step_num",
          "description",
          "form_position",
          "is_default",
          "master_step_default",
          "master_step_hide",
          "master_step_num",
          "service_step_default",
          "service_step_hide",
          "service_step_num",
          "show_button",
          "title",
          "without_menu"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Name of the appointment widget"
          },
          "description": {
            "type": "string",
            "description": "appointment widget description"
          },
          "is_default": {
            "type": "boolean",
            "description": "Default appointment widget flag"
          },
          "without_menu": {
            "type": "boolean",
            "description": "Step mode flag"
          },
          "service_step_default": {
            "type": "number",
            "description": "Service ID"
          },
          "service_step_hide": {
            "type": "boolean",
            "description": "Service Hiding Flag"
          },
          "master_step_default": {
            "type": "number",
            "description": "team member ID"
          },
          "master_step_hide": {
            "type": "boolean",
            "description": "team member hide flag"
          },
          "service_step_num": {
            "type": "number",
            "description": "Service step sequence number"
          },
          "master_step_num": {
            "type": "number",
            "description": "Sequence number of the wizard step"
          },
          "datetime_step_num": {
            "type": "number",
            "description": "Sequence number of the date and time step"
          },
          "show_button": {
            "type": "boolean",
            "description": "Button Visibility Step"
          },
          "button_position": {
            "type": "string",
            "description": "Button location on the page",
            "enum": [
              "bottom right",
              "bottom left",
              "top right",
              "top left"
            ]
          },
          "form_position": {
            "type": "string",
            "description": "Panel position on the page",
            "enum": [
              "right",
              "left"
            ]
          },
          "button_color": {
            "type": "string",
            "description": "Button color"
          },
          "button_animation": {
            "type": "boolean",
            "description": "Button animation enable flag"
          }
        },
        "description": "Request to change the letterform"
      },
      "currency": {
        "title": "Root Type for Currency",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Currency identifier",
            "format": "int32"
          },
          "iso": {
            "maxLength": 3,
            "minLength": 3,
            "type": "string",
            "description": "Three-letter currency code according to ISO 4217"
          },
          "name": {
            "type": "string",
            "description": "Currency name"
          },
          "symbol": {
            "type": "string",
            "description": "Currency symbol next to the amount"
          },
          "is_symbol_after_amount": {
            "type": "boolean",
            "description": "Flag where to display the currency symbol relative to the amount (true - after the amount, false - before)"
          }
        },
        "description": "Currency",
        "example": {
          "id": 2,
          "iso": "USD",
          "name": "US Dollar",
          "symbol": "$",
          "is_symbol_after_amount": false
        }
      },
      "analytics_report_overall_sum_stats": {
        "title": "Root Type for AnalyticsReportOverallSumStats",
        "type": "object",
        "properties": {
          "current_sum": {
            "type": "string",
            "description": "The current value of the indicator"
          },
          "previous_sum": {
            "type": "string",
            "description": "The value of the indicator in the previous period"
          },
          "change_percent": {
            "type": "integer",
            "description": "The percentage change in the current value of the indicator relative to the past. Null if the previous value is 0 and the current value is not 0.",
            "format": "int32"
          },
          "currency": {
            "$ref": "#/components/schemas/currency"
          }
        },
        "description": "",
        "example": {
          "current_sum": 12.56,
          "previous_sum": 10.34,
          "change_percent": 21,
          "currency": {
            "symbol": "USD"
          }
        }
      },
      "analytics_report_overall_fullness_stats": {
        "title": "Root Type for AnalyticsReportOverallFullnessStats",
        "type": "object",
        "properties": {
          "current_percent": {
            "type": "number",
            "description": "Percentage of occupancy in the current period",
            "format": "double"
          },
          "previous_percent": {
            "type": "number",
            "description": "Percentage of occupancy in the previous period",
            "format": "double"
          },
          "change_percent": {
            "type": "integer",
            "description": "The percentage change in the current value of the indicator relative to the past. Null if the previous value is 0 and the current value is not 0.",
            "format": "int32"
          }
        },
        "description": "Summary indicators of the occupancy of the working hours of the location's team members",
        "example": {
          "current_percent": 12.1,
          "previous_percent": 10.2,
          "change_percent": 18
        }
      },
      "analytics_report_overall_record_stats": {
        "title": "Root Type for AnalyticsReportOverallRecordStats",
        "type": "object",
        "properties": {
          "current_completed_count": {
            "type": "integer",
            "description": "Number of completed appointments",
            "format": "int32"
          },
          "current_completed_percent": {
            "type": "integer",
            "description": "Percentage of completed appointments relative to the total. Null if the total is 0.",
            "format": "int32"
          },
          "current_pending_count": {
            "type": "integer",
            "description": "Number of pending appointments",
            "format": "int32"
          },
          "current_pending_percent": {
            "type": "integer",
            "description": "Percentage of incomplete records relative to the total. Null if the total is 0.",
            "format": "int32"
          },
          "current_canceled_count": {
            "type": "integer",
            "description": "Number of canceled appointments",
            "format": "int32"
          },
          "current_canceled_percent": {
            "type": "integer",
            "description": "The percentage of canceled appointments relative to the total. Null if the total is 0.",
            "format": "int32"
          },
          "current_total_count": {
            "type": "integer",
            "description": "Number of all appointments in the current period",
            "format": "int32"
          },
          "previous_total_count": {
            "type": "integer",
            "description": "Number of all appointments in the previous period",
            "format": "int32"
          },
          "change_percent": {
            "type": "integer",
            "description": "The percentage change in the current value of the total number of records relative to the past. Null if the number of records in the previous period is 0 and the current number is different from 0.",
            "format": "int32"
          }
        },
        "description": "Summary metrics by number of appointments",
        "example": {
          "current_completed_count": 150,
          "current_completed_percent": 75,
          "current_pending_count": 30,
          "current_pending_percent": 15,
          "current_canceled_count": 20,
          "current_canceled_percent": 10,
          "current_total_count": 200,
          "previous_total_count": 180,
          "change_percent": 11
        }
      },
      "analytics_report_overall_client_stats": {
        "title": "Root Type for AnalyticsReportOverallClientStats",
        "type": "object",
        "properties": {
          "total_count": {
            "type": "integer",
            "description": "Total number of clients",
            "format": "int32"
          },
          "new_count": {
            "type": "integer",
            "description": "Number of new clients in the analyzed period",
            "format": "int32"
          },
          "new_percent": {
            "type": "integer",
            "description": "Percentage of new customers relative to the number of active customers",
            "format": "int32"
          },
          "return_count": {
            "type": "integer",
            "description": "The number of customers who returned in the analyzed period",
            "format": "int32"
          },
          "return_percent": {
            "type": "integer",
            "description": "Percentage of returning customers relative to the number of active customers",
            "format": "int32"
          },
          "active_count": {
            "type": "integer",
            "description": "Number of active clients in the analyzed period",
            "format": "int32"
          },
          "lost_count": {
            "type": "integer",
            "description": "The number of lost customers in the analyzed period",
            "format": "int32"
          },
          "lost_percent": {
            "type": "integer",
            "description": "The percentage of lost customers relative to the total number of customers",
            "format": "int32"
          }
        },
        "description": "Summary indicators by number of clients",
        "example": {
          "total_count": 1000,
          "new_count": 50,
          "new_percent": 10,
          "return_count": 450,
          "return_percent": 90,
          "active_count": 500,
          "lost_count": 20,
          "lost_percent": 2
        }
      },
      "analytics_report_overall_stats": {
        "type": "object",
        "properties": {
          "income_total_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_sum_stats"
          },
          "income_services_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_sum_stats"
          },
          "income_goods_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_sum_stats"
          },
          "income_average_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_sum_stats"
          },
          "income_average_services_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_sum_stats"
          },
          "fullness_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_fullness_stats"
          },
          "record_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_record_stats"
          },
          "client_stats": {
            "$ref": "#/components/schemas/analytics_report_overall_client_stats"
          }
        },
        "description": "Summary indicators"
      },
      "company_analytics_overall_data_type": {
        "required": [
          "data",
          "meta",
          "success"
        ],
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/analytics_report_overall_stats"
          },
          "meta": {
            "type": "array",
            "description": "metadata",
            "items": {
              "type": "object"
            }
          },
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          }
        },
        "description": ""
      },
      "analytics_report_overall_chart_daily_row_item": {
        "type": "array",
        "description": "Data for one day. The first element is the timestamp of the beginning of the day in the UTC zone, the second element is the value of the indicator on that day.",
        "example": [
          "2026-09-21T23:00:00.000-05:00",
          1000
        ],
        "items": {
          "type": "integer",
          "format": "int32"
        }
      },
      "analytics_report_overall_chart_daily_row": {
        "title": "Root Type for AnalyticsReportOverallChartRow",
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Name of data series"
          },
          "data": {
            "type": "array",
            "description": "Data for each day. Each day is an array of two numbers. The first number is the timestamp of the beginning of the day in the UTC zone, the second number is the value of the indicator on that day.",
            "items": {
              "$ref": "#/components/schemas/analytics_report_overall_chart_daily_row_item"
            }
          }
        },
        "description": "Data for plotting a chart by day in the Key Indicators report",
        "example": {
          "label": "Revenue",
          "data": [
            [
              "2026-09-21T23:00:00.000-05:00",
              1000
            ],
            [
              "2026-09-21T23:00:00.000-05:00",
              500
            ]
          ]
        }
      },
      "analytics_report_overall_chart_scalar_item": {
        "title": "Root Type for AnalyticsReportOverallChartRow",
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Name of indicator"
          },
          "data": {
            "type": "integer",
            "description": "Indicator value"
          }
        },
        "description": "Data for building an aggregate chart in the Key indicators report"
      },
      "company_analytics_loyalty_programs_income_data_types": {
        "title": "Root Type for company_analytics_loyalty_programs_income_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "object",
            "properties": {
              "income_stats": {
                "type": "object",
                "properties": {
                  "new": {
                    "type": "object",
                    "properties": {
                      "all_sum": {
                        "type": "integer",
                        "description": "Revenue from new customers",
                        "format": "int32"
                      },
                      "returned_sum": {
                        "type": "integer",
                        "description": "Revenue from returning customers",
                        "format": "int32"
                      }
                    },
                    "description": "New clients"
                  },
                  "old": {
                    "type": "object",
                    "properties": {
                      "all_sum": {
                        "type": "integer",
                        "description": "Revenue from old customers",
                        "format": "int32"
                      },
                      "returned_sum": {
                        "type": "integer",
                        "description": "Revenue from returning customers",
                        "format": "int32"
                      }
                    },
                    "description": "Old clients"
                  },
                  "total": {
                    "type": "object",
                    "properties": {
                      "all_sum": {
                        "type": "integer",
                        "description": "Revenue for all customers",
                        "format": "int32"
                      },
                      "returned_sum": {
                        "type": "integer",
                        "description": "Revenue from returning customers",
                        "format": "int32"
                      }
                    },
                    "description": "Total amount"
                  }
                },
                "description": "revenue statistics"
              },
              "currency": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "Currency identifier",
                    "format": "int32"
                  },
                  "iso": {
                    "type": "string",
                    "description": "Name in the ISO system"
                  },
                  "name": {
                    "type": "string",
                    "description": "Full title"
                  },
                  "symbol": {
                    "type": "string",
                    "description": "Currency symbol"
                  },
                  "is_symbol_after_amount": {
                    "type": "boolean"
                  }
                },
                "description": "Currency"
              },
              "income_stats_by_day": {
                "type": "array",
                "description": "Revenue statistics by day",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "description": "date",
                      "format": "date"
                    },
                    "new_sum": {
                      "type": "integer",
                      "description": "Revenue from new customers",
                      "format": "int32"
                    },
                    "old_sum": {
                      "type": "integer",
                      "description": "Revenue from old customers",
                      "format": "int32"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "revenue statistics",
        "example": {
          "success": true,
          "data": {
            "income_stats": {
              "new": {
                "all_sum": 0,
                "returned_sum": 0
              },
              "old": {
                "all_sum": 0,
                "returned_sum": 0
              },
              "total": {
                "all_sum": 0,
                "returned_sum": 0
              }
            },
            "currency": {
              "id": 1,
              "iso": "USD",
              "name": "US Dollar",
              "symbol": "USD",
              "is_symbol_after_amount": true
            },
            "income_stats_by_day": [
              {
                "date": "2026-09-21",
                "new_sum": 0,
                "old_sum": 0
              },
              {
                "date": "2026-09-21",
                "new_sum": 0,
                "old_sum": 0
              }
            ]
          },
          "meta": []
        }
      },
      "company_analytics_loyalty_programs_staff_data_types": {
        "title": "Root Type for company_analytics_loyalty_programs_staff_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "array",
            "description": "Array with data objects",
            "items": {
              "type": "object",
              "properties": {
                "client_stats": {
                  "type": "object",
                  "properties": {
                    "all_count": {
                      "type": "integer",
                      "description": "Number of all clients",
                      "format": "int32"
                    },
                    "lost_count": {
                      "type": "integer",
                      "description": "Number of lost customers",
                      "format": "int32"
                    },
                    "returned_count": {
                      "type": "integer",
                      "description": "Number of returning customers",
                      "format": "int32"
                    },
                    "returned_percent": {
                      "type": "number",
                      "description": "Percentage of returning customers",
                      "format": "float"
                    }
                  },
                  "description": "Client statistics"
                },
                "staff": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "team member ID",
                      "format": "int32"
                    },
                    "name": {
                      "type": "string",
                      "description": "team member name"
                    }
                  },
                  "description": "team member"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of objects found)"
          }
        },
        "description": "Get team member turnover data.",
        "example": {
          "success": true,
          "data": [
            {
              "client_stats": {
                "all_count": 1,
                "lost_count": 0,
                "returned_count": 1,
                "returned_percent": 100
              },
              "staff": {
                "id": 1140369,
                "name": "Doniella Davy"
              }
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "company_analytics_loyalty_programs_visits_data_types": {
        "title": "Root Type for company_analytics_loyalty_programs_visits_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "object",
            "properties": {
              "client_stats": {
                "type": "object",
                "properties": {
                  "new": {
                    "type": "object",
                    "properties": {
                      "all_count": {
                        "type": "integer",
                        "description": "Total",
                        "format": "int32"
                      },
                      "lost_count": {
                        "type": "integer",
                        "description": "Lost Clients",
                        "format": "int32"
                      },
                      "returned_count": {
                        "type": "integer",
                        "description": "Returning clients",
                        "format": "int32"
                      },
                      "returned_percent": {
                        "type": "number",
                        "description": "Percentage of returning customers",
                        "format": "float"
                      }
                    },
                    "description": "New clients"
                  },
                  "old": {
                    "type": "object",
                    "properties": {
                      "all_count": {
                        "type": "integer",
                        "description": "Total",
                        "format": "int32"
                      },
                      "lost_count": {
                        "type": "integer",
                        "description": "Lost Clients",
                        "format": "int32"
                      },
                      "returned_count": {
                        "type": "integer",
                        "description": "Returning clients",
                        "format": "int32"
                      },
                      "returned_percent": {
                        "type": "number",
                        "description": "Percentage of returning customers",
                        "format": "float"
                      }
                    },
                    "description": "Old clients"
                  },
                  "total": {
                    "type": "object",
                    "properties": {
                      "all_count": {
                        "type": "integer",
                        "description": "Total",
                        "format": "int32"
                      },
                      "lost_count": {
                        "type": "integer",
                        "description": "Lost Clients",
                        "format": "int32"
                      },
                      "returned_count": {
                        "type": "integer",
                        "description": "Returning clients",
                        "format": "int32"
                      },
                      "returned_percent": {
                        "type": "number",
                        "description": "Percentage of returning customers",
                        "format": "float"
                      }
                    },
                    "description": "Total Quantity"
                  }
                },
                "description": "Client statistics"
              },
              "visits_stats_by_day": {
                "type": "array",
                "description": "Number of clients per day",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "description": "date",
                      "format": "date"
                    },
                    "new_count": {
                      "type": "integer",
                      "description": "Number of new clients",
                      "format": "int32"
                    },
                    "old_count": {
                      "type": "integer",
                      "description": "Number of old clients",
                      "format": "int32"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get customer statistics",
        "example": {
          "success": true,
          "data": {
            "client_stats": {
              "new": {
                "all_count": 0,
                "lost_count": 0,
                "returned_count": 0,
                "returned_percent": 0
              },
              "old": {
                "all_count": 0,
                "lost_count": 0,
                "returned_count": 0,
                "returned_percent": 0
              },
              "total": {
                "all_count": 0,
                "lost_count": 0,
                "returned_count": 0,
                "returned_percent": 0
              }
            },
            "visits_stats_by_day": [
              {
                "date": "2026-09-21",
                "new_count": 0,
                "old_count": 0
              },
              {
                "date": "2026-09-21",
                "new_count": 0,
                "old_count": 0
              }
            ]
          },
          "meta": []
        }
      },
      "z_report_response_data_types": {
        "title": "Root Type for z_report_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "stats": {
                "type": "object",
                "properties": {
                  "clients": {
                    "type": "integer",
                    "description": "Number of clients",
                    "format": "int32"
                  },
                  "clients_average": {
                    "type": "number",
                    "description": "Average payment per customer",
                    "format": "double"
                  },
                  "records": {
                    "type": "integer",
                    "description": "Number of records",
                    "format": "int32"
                  },
                  "records_average": {
                    "type": "number",
                    "description": "Average pay per appointment",
                    "format": "double"
                  },
                  "visit_records": {
                    "type": "integer",
                    "description": "Number of records with clients",
                    "format": "int32"
                  },
                  "visit_records_average": {
                    "type": "number",
                    "description": "Average payment for records with clients",
                    "format": "double"
                  },
                  "non_visit_records": {
                    "type": "integer",
                    "description": "Number of appointments without clients",
                    "format": "int32"
                  },
                  "non_visit_records_average": {
                    "type": "integer",
                    "description": "Average billing for records without clients",
                    "format": "int32"
                  },
                  "targets": {
                    "type": "integer",
                    "description": "Number of services",
                    "format": "int32"
                  },
                  "targets_paid": {
                    "type": "integer",
                    "description": "Payment for services",
                    "format": "int32"
                  },
                  "goods": {
                    "type": "integer",
                    "description": "Number of products",
                    "format": "int32"
                  },
                  "goods_paid": {
                    "type": "number",
                    "description": "Payment by products",
                    "format": "double"
                  },
                  "certificates": {
                    "type": "integer",
                    "description": "Number of certificates",
                    "format": "int32"
                  },
                  "certificates_paid": {
                    "type": "integer",
                    "description": "Payment for certificates",
                    "format": "int32"
                  },
                  "abonement": {
                    "type": "integer",
                    "description": "Number of subscriptions",
                    "format": "int32"
                  },
                  "abonement_paid": {
                    "type": "integer",
                    "description": "Subscription payment",
                    "format": "int32"
                  }
                },
                "description": "general Statistics"
              },
              "paids": {
                "type": "object",
                "properties": {
                  "accounts": {
                    "type": "array",
                    "description": "Payments at the box office",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Location account name"
                        },
                        "amount": {
                          "type": "integer",
                          "description": "Sum",
                          "format": "int32"
                        }
                      }
                    }
                  },
                  "discount": {
                    "type": "array",
                    "description": "Payment by discount and loyalty",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Discount/promotion name"
                        },
                        "amount": {
                          "type": "number",
                          "description": "Sum",
                          "format": "double"
                        }
                      }
                    }
                  },
                  "total": {
                    "type": "object",
                    "properties": {
                      "accounts": {
                        "type": "number",
                        "description": "Amounts for all location accounts",
                        "format": "double"
                      },
                      "discount": {
                        "type": "number",
                        "description": "Amount paid by all loyalty",
                        "format": "double"
                      }
                    },
                    "description": "Outcome"
                  }
                },
                "description": "Payments"
              },
              "z_data": {
                "type": "object",
                "properties": {
                  "1481101200": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "client_id": {
                          "type": "number",
                          "description": "Client ID"
                        },
                        "client_name": {
                          "type": "string",
                          "description": "Client name"
                        },
                        "client_phone": {
                          "type": "string",
                          "description": "Customer phone"
                        },
                        "client_email": {
                          "type": "string",
                          "description": "Client's email address"
                        },
                        "masters": {
                          "type": "array",
                          "description": "team members",
                          "items": {
                            "type": "object",
                            "properties": {
                              "master_id": {
                                "type": "number",
                                "description": "team member ID"
                              },
                              "master_name": {
                                "type": "string",
                                "description": "team member name"
                              },
                              "service": {
                                "type": "array",
                                "description": "Services",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "item_title": {
                                      "type": "string",
                                      "description": "Service name"
                                    },
                                    "first_cost": {
                                      "type": "number",
                                      "description": "Initial cost",
                                      "format": "float"
                                    },
                                    "discount": {
                                      "type": "number",
                                      "description": "Discount",
                                      "format": "float"
                                    },
                                    "result_cost": {
                                      "type": "number",
                                      "description": "the total cost",
                                      "format": "float"
                                    },
                                    "transactions": {
                                      "type": "array",
                                      "description": "Transactions",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "accounts_amount": {
                                            "type": "number",
                                            "description": "Amount paid to the location account",
                                            "format": "float"
                                          },
                                          "loyalty_amount": {
                                            "type": "number",
                                            "description": "Amount paid by loyalty",
                                            "format": "float"
                                          },
                                          "payment_type": {
                                            "type": "string",
                                            "description": "Payment type"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "good": {
                                "type": "array",
                                "description": "Products",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "item_title": {
                                      "type": "string",
                                      "description": "Product Name"
                                    },
                                    "first_cost": {
                                      "type": "number",
                                      "description": "Initial cost",
                                      "format": "float"
                                    },
                                    "discount": {
                                      "type": "number",
                                      "description": "Discount",
                                      "format": "double"
                                    },
                                    "result_cost": {
                                      "type": "number",
                                      "description": "the total cost",
                                      "format": "double"
                                    },
                                    "transactions": {
                                      "type": "array",
                                      "description": "Transactions",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "accounts_amount": {
                                            "type": "number",
                                            "description": "Amount paid to the location account",
                                            "format": "double"
                                          },
                                          "loyalty_amount": {
                                            "type": "integer",
                                            "description": "Amount paid by loyalty",
                                            "format": "int32"
                                          },
                                          "payment_type": {
                                            "type": "string",
                                            "description": "Payment type"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "others": {
                                "type": "object",
                                "properties": {
                                  "item_title": {
                                    "type": "string",
                                    "description": "Product/service name"
                                  },
                                  "first_cost": {
                                    "type": "number",
                                    "description": "Initial cost",
                                    "format": "float"
                                  },
                                  "discount": {
                                    "type": "number",
                                    "description": "Discount",
                                    "format": "double"
                                  },
                                  "result_cost": {
                                    "type": "number",
                                    "description": "the total cost",
                                    "format": "double"
                                  },
                                  "transactions": {
                                    "type": "array",
                                    "description": "Transactions",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "accounts_amount": {
                                          "type": "number",
                                          "description": "Amount paid to the location account",
                                          "format": "double"
                                        },
                                        "loyalty_amount": {
                                          "type": "integer",
                                          "description": "Amount paid by loyalty",
                                          "format": "int32"
                                        },
                                        "payment_type": {
                                          "type": "string",
                                          "description": "Payment type"
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "description": "Data report"
              },
              "currency": {
                "type": "string",
                "description": "Currency"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get Z-Report data",
        "example": {
          "success": true,
          "data": {
            "stats": {
              "clients": 7,
              "clients_average": 123.45,
              "records": 14,
              "records_average": 4231.51,
              "visit_records": 13,
              "visit_records_average": 100500.01,
              "non_visit_records": 1,
              "non_visit_records_average": 200,
              "targets": 14,
              "targets_paid": 10255,
              "goods": 4,
              "goods_paid": 12452.18,
              "certificates": 1,
              "certificates_paid": 9876,
              "abonement": 0,
              "abonement_paid": 0
            },
            "paids": {
              "accounts": [
                {
                  "title": "Cards",
                  "amount": 6987
                },
                {
                  "title": "Cash",
                  "amount": 54321.13
                },
                {
                  "title": "Location account",
                  "amount": 12531
                }
              ],
              "discount": [
                {
                  "title": "Advance Discount",
                  "amount": 1816.875
                },
                {
                  "title": "Written off bonuses",
                  "amount": 800
                },
                {
                  "title": "Promotion Discount",
                  "amount": 123
                }
              ],
              "total": {
                "accounts": 2657.13,
                "discount": 1241.875
              }
            },
            "z_data": {
              "1481101200": [
                {
                  "client_id": 11223344,
                  "client_name": "John Smith",
                  "client_phone": "+13155550175",
                  "client_email": "",
                  "masters": [
                    {
                      "master_id": 321123,
                      "master_name": "Robert Brown",
                      "service": [
                        {
                          "item_title": "Highlighting from 9 strands",
                          "first_cost": 3500,
                          "discount": 0,
                          "result_cost": 3500,
                          "transactions": [
                            {
                              "accounts_amount": 0,
                              "loyalty_amount": 700,
                              "payment_type": "Card: Gold Card"
                            },
                            {
                              "accounts_amount": 0,
                              "loyalty_amount": 100,
                              "payment_type": "Card: Gold Card"
                            },
                            {
                              "accounts_amount": 0,
                              "loyalty_amount": 1,
                              "payment_type": "Card: Bonus card"
                            }
                          ]
                        }
                      ],
                      "good": [
                        {
                          "item_title": "Spray For Hair",
                          "first_cost": 15,
                          "discount": 2.25,
                          "result_cost": 12.75,
                          "transactions": [
                            {
                              "accounts_amount": 12.75,
                              "loyalty_amount": 0,
                              "payment_type": "Cash"
                            }
                          ]
                        }
                      ],
                      "others": {
                        "item_title": "Other operations",
                        "first_cost": 347,
                        "discount": 0,
                        "result_cost": 347,
                        "transactions": [
                          {
                            "accounts_amount": 23,
                            "loyalty_amount": 0,
                            "payment_type": "Cash"
                          },
                          {
                            "accounts_amount": 324,
                            "loyalty_amount": 0,
                            "payment_type": "Cash"
                          }
                        ]
                      }
                    }
                  ]
                }
              ]
            },
            "currency": "USD"
          },
          "meta": []
        }
      },
      "tags_create_response200_data_types": {
        "title": "Root Type for tags_create_response200_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "name of tag"
              },
              "salon_id": {
                "type": "number",
                "description": "ID of the location that the tag belongs to"
              },
              "color": {
                "type": "string",
                "description": "Tag color in #RRGGBB format"
              },
              "entity": {
                "type": "number",
                "description": "Tag type (1 - tag for customers, 2 - tag for appointments)"
              },
              "id": {
                "type": "integer",
                "description": "Tag ID"
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Create a tag",
        "example": {
          "success": true,
          "data": {
            "title": "test",
            "salon_id": 68570,
            "color": "#00ff11",
            "entity": 1,
            "id": 3599560
          },
          "meta": []
        }
      },
      "tags_company_entity_response200_data_types": {
        "title": "Root Type for tags_company_entity",
        "type": "object",
        "description": "Get location tags by entity type",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "array",
            "description": "Array of tag objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Tag ID"
                },
                "salon_id": {
                  "type": "string",
                  "description": "Location ID"
                },
                "title": {
                  "type": "string",
                  "description": "Tag name"
                },
                "color": {
                  "type": "string",
                  "description": "Tag color in #RRGGBB format"
                },
                "icon": {
                  "type": "string",
                  "description": "Icon name"
                },
                "slug": {
                  "type": "string",
                  "description": "Tag slug"
                },
                "entity": {
                  "type": "string",
                  "description": "Tag type (1 - client, 2 - appointment, 3 - event)"
                },
                "deleted": {
                  "type": "string",
                  "description": "Delete mark (0 - active, 1 - deleted)"
                },
                "not_editable": {
                  "type": "string",
                  "description": "Whether tag changes are allowed (0 - allowed, 1 - not allowed)"
                },
                "font_color": {
                  "type": "string",
                  "description": "Font color in #RRGGBB format"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)"
          }
        },
        "example": {
          "success": true,
          "data": [
            {
              "id": 241625,
              "salon_id": 68570,
              "title": "VIP client",
              "color": "#ff2828",
              "icon": "star",
              "entity": 1,
              "deleted": 0,
              "not_editable": 0
            },
            {
              "id": 241626,
              "salon_id": 68570,
              "title": "Regular client",
              "color": "#009800",
              "icon": "user",
              "entity": 1,
              "deleted": 0,
              "not_editable": 0
            }
          ],
          "meta": []
        }
      },
      "tags_update_request_data_types": {
        "title": "Root Type for tags_update_request_data_types",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "name of tag"
          },
          "color": {
            "type": "string",
            "description": "Tag color in #RRGGBB format"
          },
          "entity": {
            "type": "number",
            "description": "Tag type (1 - tag for customers, 2 - tag for appointments)"
          },
          "icon": {
            "type": "string",
            "description": "Icon name"
          }
        },
        "description": "Update Tag",
        "example": {
          "title": "Testway2",
          "color": "#aa11ff",
          "entity": 2,
          "icon": "Test"
        }
      },
      "deposit_operation_response_data_types": {
        "title": "Root Type for deposit_operation_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "Document ID"
                  },
                  "user_id": {
                    "type": "number",
                    "description": "User ID"
                  },
                  "salon_id": {
                    "type": "number",
                    "description": "location ID"
                  },
                  "type_id": {
                    "type": "number",
                    "description": "Document type identifier"
                  },
                  "type": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "Document type identifier"
                      },
                      "title": {
                        "type": "string",
                        "description": "Document type name"
                      }
                    },
                    "description": "Document Type"
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment"
                  },
                  "number": {
                    "type": "number",
                    "description": "Document Number"
                  },
                  "salon": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "location ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "location name"
                      },
                      "public_title": {
                        "type": "string",
                        "description": "location name for display on external resources"
                      },
                      "business_group_id": {
                        "type": "number",
                        "description": "Business group ID"
                      },
                      "business_type_id": {
                        "type": "number",
                        "description": "Business type ID"
                      },
                      "country_id": {
                        "type": "number",
                        "description": "Identifier of the country in which the location is located"
                      },
                      "city_id": {
                        "type": "number",
                        "description": "City ID where the location is located"
                      },
                      "timezone": {
                        "type": "number",
                        "description": "location time zone"
                      },
                      "timezone_name": {
                        "type": "string",
                        "description": "Time zone name"
                      },
                      "address": {
                        "type": "string",
                        "description": "Address where the location is located"
                      },
                      "coordinate_lat": {
                        "type": "number",
                        "description": "Latitude",
                        "format": "double"
                      },
                      "coordinate_lon": {
                        "type": "number",
                        "description": "Longitude",
                        "format": "double"
                      },
                      "logo": {
                        "type": "string",
                        "description": "The path to the image with the location logo"
                      },
                      "zip": {
                        "type": "string",
                        "description": "Postcode"
                      },
                      "phone": {
                        "type": "string",
                        "description": "Telephong"
                      },
                      "phones": {
                        "type": "array",
                        "description": "Phones",
                        "items": {
                          "type": "string"
                        }
                      },
                      "site": {
                        "type": "string",
                        "description": "The site of the location"
                      },
                      "allow_delete_record": {
                        "type": "boolean",
                        "description": "Is it possible to delete an appointment"
                      },
                      "allow_change_record": {
                        "type": "boolean",
                        "description": "Is it possible to change the appointment"
                      }
                    }
                  },
                  "user": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "User ID"
                      },
                      "name": {
                        "type": "string",
                        "description": "Username"
                      },
                      "phone": {
                        "type": "string",
                        "description": "User phone"
                      }
                    },
                    "description": "User"
                  }
                }
              },
              "deposits_transactions": {
                "type": "array",
                "description": "Client account transaction",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client account transaction ID"
                    },
                    "salon_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "salon_group_id": {
                      "type": "number",
                      "description": "Chain ID"
                    },
                    "document_id": {
                      "type": "number",
                      "description": "Document ID"
                    },
                    "deposit_id": {
                      "type": "number",
                      "description": "Personal account ID"
                    },
                    "deposit_type_id": {
                      "type": "number",
                      "description": "Personal account type identifier"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "user_id": {
                      "type": "number",
                      "description": "User ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Top-up amount",
                      "format": "double"
                    },
                    "balance_after": {
                      "type": "number",
                      "description": "Personal account balance after this transaction",
                      "format": "double"
                    },
                    "reserved_balance_after": {
                      "type": "number",
                      "description": "Personal account reserved balance after this transaction",
                      "format": "double"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "date_create": {
                      "type": "string",
                      "description": "date of creation"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Has the transaction been deleted?"
                    },
                    "date_delete": {
                      "type": "string",
                      "description": "Deletion date"
                    },
                    "deposit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Personal account ID"
                        },
                        "deposit_type_id": {
                          "type": "integer",
                          "description": "Personal account type identifier"
                        },
                        "salon_group_id": {
                          "type": "integer",
                          "description": "Chain ID"
                        },
                        "initial_balance": {
                          "type": "number",
                          "description": "Starting balance",
                          "format": "double"
                        },
                        "balance": {
                          "type": "number",
                          "description": "Available balance (current balance minus reserved balance)",
                          "format": "double"
                        },
                        "reserved_balance": {
                          "type": "number",
                          "description": "Amount currently reserved by active holds",
                          "format": "double"
                        },
                        "blocked": {
                          "type": "boolean",
                          "description": "Is the personal account blocked"
                        },
                        "date_create": {
                          "type": "string",
                          "description": "date of creation"
                        }
                      },
                      "description": "Personal account"
                    },
                    "deposit_type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Personal account type identifier"
                        },
                        "salon_group_id": {
                          "type": "number",
                          "description": "Chain ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Name of personal account type"
                        },
                        "date_create": {
                          "type": "string",
                          "description": "date of creation"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Has the personal account type been removed?"
                        },
                        "date_delete": {
                          "type": "string",
                          "description": "Deletion date"
                        }
                      },
                      "description": "Type of personal account"
                    }
                  }
                }
              },
              "payment_transactions": {
                "type": "array",
                "description": "Payment transaction",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Payment transaction ID"
                    },
                    "document_id": {
                      "type": "integer",
                      "description": "Document ID"
                    },
                    "date": {
                      "type": "string",
                      "description": "date of payment",
                      "format": "date-time"
                    },
                    "type_id": {
                      "type": "number",
                      "description": "Document type identifier"
                    },
                    "expense_id": {
                      "type": "number",
                      "description": "Payment Item ID"
                    },
                    "account_id": {
                      "type": "number",
                      "description": "Checkout ID"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Transaction amount",
                      "format": "double"
                    },
                    "client_id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "master_id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "supplier_id": {
                      "type": "number",
                      "description": "Vendor ID"
                    },
                    "comment": {
                      "type": "string",
                      "description": "A comment"
                    },
                    "item_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "target_type_id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "record_id": {
                      "type": "integer",
                      "description": "Appointment ID"
                    },
                    "goods_transaction_id": {
                      "type": "integer",
                      "description": "Commodity transaction ID"
                    },
                    "type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Transaction type identifier"
                        },
                        "title": {
                          "type": "string",
                          "description": "Transaction name"
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Creating a personal account replenishment operation",
        "example": {
          "success": true,
          "data": {
            "document": {
              "id": 1,
              "user_id": 1,
              "salon_id": 1,
              "type_id": 9,
              "type": {
                "id": 9,
                "title": "Account replenishment (advance payment)"
              },
              "comment": "",
              "number": 1,
              "salon": {
                "id": 1,
                "title": "Location in New York",
                "public_title": "Location in New York",
                "business_group_id": 1,
                "business_type_id": 1,
                "country_id": 7,
                "city_id": 2,
                "timezone": "-5",
                "timezone_name": "America/New_York",
                "address": "New York, 787 Jackson Drive",
                "coordinate_lat": 40.73061,
                "coordinate_lon": -73.935242,
                "logo": "http://app.alteg.io/images/icon.png",
                "zip": "129090",
                "phone": "+13155550175",
                "phones": [],
                "site": "www.example.com",
                "allow_delete_record": true,
                "allow_change_record": true
              },
              "user": {
                "id": 1,
                "name": "James Smith",
                "phone": "+13155550175"
              }
            },
            "deposits_transactions": [
              {
                "id": 1,
                "salon_id": 1,
                "salon_group_id": 1,
                "document_id": 1,
                "deposit_id": 1,
                "deposit_type_id": 1,
                "master_id": 1,
                "user_id": 1,
                "amount": 100.5,
                "balance_after": 12239.56,
                "reserved_balance_after": 0,
                "comment": "",
                "date_create": "2026-09-21T23:00:00.000-05:00",
                "deleted": false,
                "deposit": {
                  "id": 1,
                  "deposit_type_id": 1,
                  "salon_group_id": 1,
                  "initial_balance": 10000,
                  "balance": 12239.56,
                  "reserved_balance": 0,
                  "blocked": false,
                  "date_create": "2026-09-21T23:00:00.000-05:00"
                },
                "deposit_type": {
                  "id": 1,
                  "salon_group_id": 1,
                  "title": "Account type 1",
                  "date_create": "2026-09-21T23:00:00.000-05:00",
                  "deleted": false
                }
              }
            ],
            "payment_transactions": [
              {
                "id": 1,
                "document_id": 1,
                "date": "2026-09-21T23:00:00.000-05:00",
                "type_id": 10,
                "expense_id": 10,
                "account_id": 1,
                "amount": 100.5,
                "client_id": 1,
                "master_id": 1,
                "supplier_id": 0,
                "comment": "",
                "item_id": 1,
                "target_type_id": 0,
                "record_id": 0,
                "goods_transaction_id": 0,
                "type": {
                  "id": 10,
                  "title": "Refill"
                }
              }
            ]
          },
          "meta": []
        }
      },
      "loyalty_cards_response_data_types": {
        "title": "Root Type for loyalty_cards_response_data_types",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Loyalty card ID",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "description": "Loyalty card balance",
            "format": "float"
          },
          "points": {
            "type": "integer",
            "format": "int32"
          },
          "paid_amount": {
            "type": "number",
            "description": "Amount Paid",
            "format": "float"
          },
          "sold_amount": {
            "type": "number",
            "description": "Amount \"Sold\"",
            "format": "float"
          },
          "visits_count": {
            "type": "integer",
            "description": "Number of visits",
            "format": "int32"
          },
          "number": {
            "type": "string",
            "description": "Card number"
          },
          "type_id": {
            "type": "integer",
            "description": "Loyalty card type identifier",
            "format": "int32"
          },
          "salon_group_id": {
            "type": "integer",
            "description": "ID of the chain where the card was created",
            "format": "int32"
          },
          "type": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "title": {
                "type": "string"
              },
              "salon_group_id": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "An object that contains the \"id\" and \"title\" fields: card type identifier and card type name, respectively"
          },
          "salon_group": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "format": "int32"
              },
              "title": {
                "type": "string"
              }
            },
            "description": "An object that contains the \"id\" and \"title\" fields: the identifier of the chain where the card type was created and the name of this chain"
          },
          "programs": {
            "type": "array",
            "description": "An array with information about promotions linked to a loyalty card",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Promotion ID",
                  "format": "int32"
                },
                "title": {
                  "type": "string",
                  "description": "Share name"
                },
                "value": {
                  "type": "integer",
                  "description": "The value from which the rule will work",
                  "format": "int32"
                },
                "loyalty_type_id": {
                  "type": "integer",
                  "description": "Promotion type ID",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Is cashback earned on products?",
                  "format": "int32"
                },
                "value_unit_id": {
                  "type": "integer",
                  "description": "Bonus field. Discount % or Fixed. sum",
                  "format": "int32"
                },
                "group_id": {
                  "type": "integer",
                  "description": "ID of the chain where the promotion was created",
                  "format": "int32"
                },
                "loyalty_type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Promotion type ID",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Share type name"
                    },
                    "is_discount": {
                      "type": "boolean",
                      "description": "Discount"
                    },
                    "is_cashback": {
                      "type": "boolean",
                      "description": "Cashback"
                    },
                    "is_static": {
                      "type": "boolean",
                      "description": "Fixed discount"
                    },
                    "is_accumulative": {
                      "type": "boolean",
                      "description": "Accumulative discount"
                    }
                  },
                  "description": "Object with information about the promotion"
                },
                "rules": {
                  "type": "array",
                  "description": "An array with information about the rules configured in the promotion",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Rule ID",
                        "format": "int32"
                      },
                      "loyalty_program_id": {
                        "type": "integer",
                        "description": "Identifier of the stock to which the rule is attached",
                        "format": "int32"
                      },
                      "loyalty_type_id": {
                        "type": "integer",
                        "description": "Promotion type ID",
                        "format": "int32"
                      },
                      "value": {
                        "type": "integer",
                        "description": "The value from which the rule will work",
                        "format": "int32"
                      },
                      "parameter": {
                        "type": "integer",
                        "format": "int32"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Get a list of customer cards",
        "example": {
          "id": 9210520,
          "balance": 100,
          "points": 0,
          "paid_amount": 1000,
          "sold_amount": 1000,
          "visits_count": 1,
          "number": 14507109210520,
          "type_id": 10992,
          "salon_group_id": 145071,
          "type": {
            "id": 10992,
            "title": "5+2",
            "salon_group_id": 145071
          },
          "salon_group": {
            "id": 145071,
            "title": "Dough chain1."
          },
          "programs": [
            {
              "id": 18005,
              "title": "5+2",
              "value": 0,
              "loyalty_type_id": 13,
              "item_type_id": 3,
              "value_unit_id": 1,
              "group_id": 145071,
              "loyalty_type": {
                "id": 13,
                "title": "Discount for a given number of accumulated services",
                "is_discount": true,
                "is_cashback": false,
                "is_static": false,
                "is_accumulative": false
              },
              "rules": [
                {
                  "id": 72803,
                  "loyalty_program_id": 18005,
                  "loyalty_type_id": 13,
                  "value": 20,
                  "parameter": 0
                },
                {
                  "id": 72804,
                  "loyalty_program_id": 18005,
                  "loyalty_type_id": 13,
                  "value": 10,
                  "parameter": 0
                },
                {
                  "id": 72805,
                  "loyalty_program_id": 18005,
                  "loyalty_type_id": 13,
                  "value": 100,
                  "parameter": 0
                }
              ]
            }
          ]
        }
      },
      "loyalty_card_types_response_data_types": {
        "title": "Root Type for loyalty_card_types_response_data_types",
        "type": "array",
        "description": "Get a list of loyalty cards",
        "example": [
          {
            "id": 10992,
            "title": "Cashback",
            "salon_group_id": 145071,
            "salon_group": {
              "id": 145071,
              "title": "Chain 1"
            }
          },
          {
            "id": 8230,
            "title": "Referral program",
            "salon_group_id": 145071,
            "salon_group": {
              "id": 145071,
              "title": "Chain 1"
            }
          }
        ],
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "Card type identifier",
              "format": "int32"
            },
            "title": {
              "type": "string",
              "description": "Card type name"
            },
            "salon_group_id": {
              "type": "integer",
              "description": "ID of the chain where the card type was created",
              "format": "int32"
            },
            "salon_group": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "ID of the chain where the card type was created",
                  "format": "int32"
                },
                "title": {
                  "type": "string",
                  "description": "The name of the chain where the map type was created"
                }
              },
              "description": "An object that contains the \"id\" and \"title\" fields: the identifier of the chain where the card type was created and the name of this chain"
            }
          }
        }
      },
      "loyalty_card_type": {
        "title": "Root Type for LoyaltyCardType",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Card type identifier",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "Card type name"
          }
        },
        "description": "Loyalty card type",
        "example": {
          "id": 123,
          "title": "Loyalty card type"
        }
      },
      "loyalty_cards_request_data_types": {
        "title": "Root Type for loyalty_cards_request_data_types",
        "type": "object",
        "properties": {
          "loyalty_card_number": {
            "type": "string",
            "description": "Loyalty card number"
          },
          "loyalty_card_type_id": {
            "type": "string",
            "description": "Loyalty card type identifier"
          },
          "phone": {
            "type": "number",
            "description": "Customer phone number (e.g., 13155550175 for +13155550175)"
          }
        },
        "description": "Issue a Loyalty Card",
        "example": {
          "loyalty_card_number": "9090909",
          "loyalty_card_type_id": "8230",
          "phone": 13155550175
        }
      },
      "loyalty_card": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Loyalty card ID"
          },
          "balance": {
            "type": "number",
            "description": "Card balance"
          },
          "points": {
            "type": "number",
            "description": "Points"
          },
          "paid_amount": {
            "type": "number",
            "description": "\\\"Paid\\\" amount"
          },
          "sold_amount": {
            "type": "number",
            "description": "\\\"Sold\\\" amount"
          },
          "visits_count": {
            "type": "number",
            "description": "Visits count"
          },
          "number": {
            "type": "string",
            "description": "Loyalty card number"
          },
          "type_id": {
            "type": "number",
            "description": "Loyalty card type ID"
          },
          "salon_group_id": {
            "type": "number",
            "description": "Chain ID"
          },
          "max_discount_percent": {
            "type": "number",
            "description": "Maximum discount percent"
          },
          "max_discount_amount": {
            "type": "number",
            "description": "Maximum discount amount"
          }
        },
        "description": "Loyalty card"
      },
      "loyalty_abonements_response_data_types": {
        "title": "Root Type for loyalty_abonements_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Membership ID",
                  "format": "int32"
                },
                "number": {
                  "type": "string",
                  "description": "Subscription code"
                },
                "balance_string": {
                  "type": "string",
                  "description": "Service name, with number of uses"
                },
                "is_frozen": {
                  "type": "boolean",
                  "description": "Is the membership frozen?"
                },
                "freeze_period": {
                  "type": "integer",
                  "description": "The period the membership was frozen",
                  "format": "int32"
                },
                "period": {
                  "type": "integer",
                  "description": "Subscription expiration value",
                  "format": "int32"
                },
                "period_unit_id": {
                  "type": "integer",
                  "description": "Identifier of the expiration units. 1 - day, 2 - week, 3 - month, 4 - year",
                  "format": "int32"
                },
                "expiration_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Subscription expiration date",
                  "format": "date-time"
                },
                "created_date": {
                  "type": "string",
                  "description": "Subscription creation date",
                  "format": "date-time"
                },
                "activated_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Subscription activation date",
                  "format": "date-time"
                },
                "is_united_balance": {
                  "type": "boolean",
                  "description": "Whether membership has unified balance"
                },
                "is_united_balance_unlimited": {
                  "type": "boolean",
                  "description": "Whether unified balance is unlimited"
                },
                "united_balance_services_count": {
                  "type": "integer",
                  "description": "Number of services for unified balance"
                },
                "goods_transaction_id": {
                  "type": "integer",
                  "description": "Product transaction ID"
                },
                "slug": {
                  "type": "string",
                  "description": "Subscription type slug"
                },
                "status": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Status ID",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Status name"
                    },
                    "extended_title": {
                      "type": "string",
                      "description": "Full status name"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Status slug"
                    },
                    "category": {
                      "type": "string",
                      "description": "Status category"
                    }
                  },
                  "description": "Current membership status"
                },
                "balance_container": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "type": "array",
                      "description": "Array of services covered by the membership",
                      "items": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "description": "Number of applications",
                            "format": "int32"
                          },
                          "is_unlimited": {
                            "type": "boolean",
                            "description": "Whether count is unlimited"
                          },
                          "service": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer"
                              },
                              "category_id": {
                                "type": "integer"
                              },
                              "is_category": {
                                "type": "boolean"
                              },
                              "title": {
                                "type": "string"
                              },
                              "online_sale_title": {
                                "type": "string"
                              },
                              "is_chain": {
                                "type": "boolean"
                              },
                              "chain_price_min": {
                                "type": "number"
                              },
                              "chain_price_max": {
                                "type": "number"
                              },
                              "category": {
                                "type": "object"
                              }
                            },
                            "description": "Service details"
                          },
                          "category": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Service ID",
                                "format": "int32"
                              },
                              "category_id": {
                                "type": "integer",
                                "description": "Service Category ID",
                                "format": "int32"
                              },
                              "title": {
                                "type": "string",
                                "description": "Service name"
                              },
                              "is_category": {
                                "type": "boolean"
                              },
                              "online_sale_title": {
                                "type": "string"
                              },
                              "is_chain": {
                                "type": "boolean"
                              },
                              "chain_price_min": {
                                "type": "number"
                              },
                              "chain_price_max": {
                                "type": "number"
                              },
                              "category": {
                                "type": "object"
                              }
                            },
                            "description": "Service category"
                          }
                        }
                      }
                    }
                  },
                  "description": "An object that includes the links array with information about the membership balance"
                },
                "type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Membership type ID",
                      "format": "int32"
                    },
                    "salon_group_id": {
                      "type": "integer",
                      "description": "Identifier of the chain in which the membership type is valid",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Membership type name"
                    },
                    "period": {
                      "type": "integer",
                      "description": "Subscription expiration date (0 if not set)",
                      "format": "int32"
                    },
                    "period_unit_id": {
                      "type": "integer",
                      "description": "Subscription validity period unit (list of possible values, if not set - 0)",
                      "format": "int32"
                    },
                    "allow_freeze": {
                      "type": "boolean",
                      "description": "Is it possible to freeze memberships? true - allowed, false - not allowed"
                    },
                    "freeze_limit": {
                      "type": "integer",
                      "description": "Maximum total freezing period (days)",
                      "format": "int32"
                    },
                    "freeze_limit_unit_id": {
                      "type": "integer",
                      "description": "Freeze period unit: 1 = day, 2 = week, 3 = month, 4 = year"
                    },
                    "is_booking_when_frozen_allowed": {
                      "type": "boolean",
                      "description": "Allow booking when membership is frozen"
                    },
                    "category_id": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Category ID restriction"
                    },
                    "is_allow_empty_code": {
                      "type": "boolean",
                      "description": "Allow the sale of a membership without a code? true - allow, false - do not allow"
                    },
                    "is_united_balance": {
                      "type": "boolean",
                      "description": "Total or separate membership balance: true - total, false - separate"
                    },
                    "united_balance_services_count": {
                      "type": "integer",
                      "description": "Number of visits for total balance",
                      "format": "int32"
                    },
                    "is_united_balance_unlimited": {
                      "type": "boolean",
                      "description": "Whether unified balance is unlimited"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Subscription type slug"
                    },
                    "is_code_required": {
                      "type": "boolean",
                      "description": "Whether activation code is required"
                    },
                    "balance_edit_type_id": {
                      "type": "integer",
                      "description": "Balance edit permission level"
                    },
                    "cost": {
                      "type": "number",
                      "description": "Subscription price"
                    },
                    "is_archived": {
                      "type": "boolean",
                      "description": "Whether membership type is archived"
                    },
                    "date_archived": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Date when archived"
                    },
                    "expiration_type_id": {
                      "type": "integer",
                      "description": "Activation type: 1 = on sale, 2 = on first use, 3 = from specific date"
                    },
                    "expiration_type_title": {
                      "type": "string",
                      "description": "Human-readable expiration type"
                    },
                    "service_price_correction": {
                      "type": "boolean",
                      "description": "Whether service price can be adjusted"
                    },
                    "is_online_sale_enabled": {
                      "type": "boolean",
                      "description": "Whether online sale is enabled"
                    },
                    "online_sale_title": {
                      "type": "string",
                      "description": "Title for online sale"
                    },
                    "online_sale_description": {
                      "type": "string",
                      "description": "Description for online sale"
                    },
                    "online_sale_price": {
                      "type": "number",
                      "description": "Price for online sale"
                    },
                    "autoactivation_time": {
                      "type": "integer",
                      "description": "Time units for autoactivation"
                    },
                    "autoactivation_time_unit_id": {
                      "type": "integer",
                      "description": "Autoactivation time unit: 1 = days, 2 = weeks, 3 = months, 4 = years"
                    },
                    "weight": {
                      "type": "integer",
                      "description": "Sort order weight"
                    },
                    "category": {
                      "type": "string",
                      "description": "Subscription type category"
                    },
                    "balance_container": {
                      "type": "object",
                      "properties": {
                        "links": {
                          "type": "array",
                          "description": "Array of services covered by the membership",
                          "items": {
                            "type": "object",
                            "properties": {
                              "count": {
                                "type": "integer",
                                "description": "Number of applications",
                                "format": "int32"
                              },
                              "is_unlimited": {
                                "type": "boolean",
                                "description": "Whether count is unlimited"
                              },
                              "service": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "category_id": {
                                    "type": "integer"
                                  },
                                  "is_category": {
                                    "type": "boolean"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "online_sale_title": {
                                    "type": "string"
                                  },
                                  "is_chain": {
                                    "type": "boolean"
                                  },
                                  "chain_price_min": {
                                    "type": "number"
                                  },
                                  "chain_price_max": {
                                    "type": "number"
                                  },
                                  "category": {
                                    "type": "object"
                                  }
                                },
                                "description": "Service details"
                              },
                              "category": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "description": "Service ID",
                                    "format": "int32"
                                  },
                                  "category_id": {
                                    "type": "integer",
                                    "description": "Service Category ID",
                                    "format": "int32"
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "Service name"
                                  },
                                  "is_category": {
                                    "type": "boolean"
                                  },
                                  "online_sale_title": {
                                    "type": "string"
                                  },
                                  "is_chain": {
                                    "type": "boolean"
                                  },
                                  "chain_price_min": {
                                    "type": "number"
                                  },
                                  "chain_price_max": {
                                    "type": "number"
                                  },
                                  "category": {
                                    "type": "object"
                                  }
                                },
                                "description": "Service category"
                              }
                            }
                          }
                        }
                      },
                      "description": "An object that includes the links array with information about the membership balance"
                    }
                  },
                  "description": "Object with information about membership type"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of subscriptions found)"
          }
        },
        "description": "Get a list of customer subscriptions",
        "example": {
          "success": true,
          "data": [
            {
              "id": 659878,
              "number": 788376,
              "balance_string": "Surfing (x10)",
              "is_frozen": false,
              "freeze_period": 0,
              "period": 9999,
              "period_unit_id": 3,
              "status": {
                "id": 1,
                "title": "Released",
                "extended_title": "Released"
              },
              "balance_container": {
                "links": [
                  {
                    "count": 10,
                    "category": {
                      "id": 3129591,
                      "category_id": 1,
                      "title": "Surfing"
                    }
                  }
                ]
              },
              "type": {
                "id": 97804,
                "salon_group_id": 145071,
                "title": 89999,
                "period": 9999,
                "period_unit_id": 3,
                "allow_freeze": false,
                "freeze_limit": 0,
                "is_allow_empty_code": false,
                "is_united_balance": false,
                "united_balance_services_count": 0,
                "balance_container": {
                  "links": [
                    {
                      "count": 10,
                      "category": {
                        "id": 3129591,
                        "category_id": 1,
                        "title": "Surfing"
                      }
                    }
                  ]
                }
              }
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "loyalty_abonements_type_search_response_data_types": {
        "title": "Root Type for loyalty_abonements_type_search_reaponse_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array with data objects",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Membership type ID"
                },
                "salon_group_id": {
                  "type": "number",
                  "description": "Identifier of the chain in which the membership type is valid"
                },
                "title": {
                  "type": "string",
                  "description": "Membership type name"
                },
                "period": {
                  "type": "number",
                  "description": "Subscription expiration date (0 if not set)"
                },
                "period_unit_id": {
                  "type": "number",
                  "description": "Subscription validity period unit (list of possible values, if not set - 0)"
                },
                "allow_freeze": {
                  "type": "boolean",
                  "description": "Is it possible to freeze memberships? true - allowed, false - not allowed"
                },
                "freeze_limit": {
                  "type": "number",
                  "description": "Maximum total freezing period (days)"
                },
                "is_allow_empty_code": {
                  "type": "boolean",
                  "description": "Allow the sale of a membership without a code? true - allow, false - do not allow"
                },
                "is_united_balance": {
                  "type": "boolean",
                  "description": "Total or separate membership balance: true - total, false - separate"
                },
                "united_balance_services_count": {
                  "type": "number",
                  "description": "Number of visits for total balance"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of membership types found)"
          }
        },
        "description": "Get a List of Available Membership Types",
        "example": {
          "success": true,
          "data": [
            {
              "id": 12233,
              "salon_group_id": 123,
              "title": "Subscription with the possibility of freezing for 14 days",
              "period": 0,
              "period_unit_id": 0,
              "allow_freeze": true,
              "freeze_limit": 14,
              "is_allow_empty_code": false,
              "is_united_balance": false,
              "united_balance_services_count": 0
            },
            {
              "id": 255789,
              "salon_group_id": 456,
              "title": "Subscription for 6 months",
              "period": 6,
              "period_unit_id": 3,
              "allow_freeze": false,
              "freeze_limit": 0,
              "is_allow_empty_code": false,
              "is_united_balance": false,
              "united_balance_services_count": 0
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "chain_loyalty_membership_type": {
        "title": "Subscription Type",
        "description": "Chain-level membership type object",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Subscription type ID",
            "example": 777
          },
          "salon_group_id": {
            "type": "integer",
            "description": "Chain ID where membership type is available",
            "example": 333
          },
          "category_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Category ID restriction (null if no category restriction)",
            "example": null
          },
          "title": {
            "type": "string",
            "description": "Subscription type name",
            "example": "10-visit subscription"
          },
          "period": {
            "type": "integer",
            "description": "Validity period (0 if not set)",
            "example": 10
          },
          "period_unit_id": {
            "type": "integer",
            "description": "Period unit: 1 = day, 2 = week, 3 = month, 4 = year, 0 = not set",
            "example": 3
          },
          "allow_freeze": {
            "type": "boolean",
            "description": "Whether freezing is allowed",
            "example": true
          },
          "freeze_limit": {
            "type": "integer",
            "description": "Maximum total freeze period",
            "example": 30
          },
          "freeze_limit_unit_id": {
            "type": "integer",
            "description": "Freeze period unit: 1 = day, 2 = week, 3 = month, 4 = year",
            "example": 1
          },
          "is_booking_when_frozen_allowed": {
            "type": "boolean",
            "description": "Allow booking appointments when membership is frozen",
            "example": false
          },
          "is_allow_empty_code": {
            "type": "boolean",
            "description": "Allow sale without code: true = personal membership, false = shared with code",
            "example": false
          },
          "is_united_balance": {
            "type": "boolean",
            "description": "Balance type: true = unified, false = separate",
            "example": true
          },
          "is_united_balance_unlimited": {
            "type": "boolean",
            "description": "Whether unified balance is unlimited",
            "example": false
          },
          "is_code_required": {
            "type": "boolean",
            "description": "Whether activation code is required",
            "example": false
          },
          "balance_edit_type_id": {
            "type": "integer",
            "description": "Balance edit type: 1 = editable, 2 = not editable",
            "example": 1
          },
          "cost": {
            "type": "number",
            "format": "float",
            "description": "Subscription price",
            "example": 1000
          },
          "chain_price_min": {
            "type": "number",
            "format": "float",
            "description": "Minimum price across chain locations",
            "example": 1000
          },
          "chain_price_max": {
            "type": "number",
            "format": "float",
            "description": "Maximum price across chain locations",
            "example": 1500
          },
          "is_chain": {
            "type": "boolean",
            "description": "Whether this is a chain-level membership type",
            "example": true
          },
          "expiration_type_id": {
            "type": "integer",
            "description": "Activation type: 1 = on sale, 2 = on first use, 3 = from specific date",
            "example": 1
          },
          "expiration_type_title": {
            "type": "string",
            "description": "Human-readable expiration type",
            "example": "On sale"
          },
          "category": {
            "type": [
              "object",
              "null",
              "string"
            ],
            "description": "Service category restriction (can be object, null, or string like \"standard\")",
            "example": null
          },
          "weight": {
            "type": "integer",
            "description": "Sort order weight",
            "example": 0
          },
          "abonements_count": {
            "type": "integer",
            "description": "Number of active subscriptions of this type",
            "example": 0
          },
          "is_online_sale_enabled": {
            "type": "boolean",
            "description": "Online sale: true = enabled, false = disabled",
            "example": false
          },
          "online_sale_title": {
            "type": "string",
            "description": "Title for online sale",
            "example": "10-visit subscription"
          },
          "online_sale_description": {
            "type": "string",
            "description": "Description for online sale",
            "example": "Sold online with discount"
          },
          "online_sale_price": {
            "type": "number",
            "format": "float",
            "description": "Price for online sale",
            "example": 550
          },
          "service_price_correction": {
            "type": "boolean",
            "description": "Whether service price can be adjusted when applying membership",
            "example": true
          },
          "united_balance_services_count": {
            "type": "integer",
            "description": "Number of visits for unified balance",
            "example": 10
          },
          "autoactivation_time": {
            "type": "integer",
            "description": "Time units for autoactivation",
            "example": 10
          },
          "autoactivation_time_unit_id": {
            "type": "integer",
            "description": "Autoactivation time unit: 1 = days, 2 = weeks, 3 = months, 4 = years",
            "example": 1
          },
          "attached_location_ids": {
            "type": "array",
            "description": "List of location IDs attached to this membership type",
            "items": {
              "type": "integer"
            },
            "example": [
              1,
              2,
              3
            ]
          },
          "attached_salon_ids": {
            "type": "array",
            "description": "Alternative name for attached_location_ids",
            "items": {
              "type": "integer"
            },
            "example": [
              1,
              2,
              3
            ]
          },
          "online_sale_image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Image URL for online sale",
            "example": "https://example.com/images/subscription_type.png"
          },
          "is_archived": {
            "type": "boolean",
            "description": "Whether membership type is archived",
            "example": false
          },
          "date_archived": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Date when membership type was archived",
            "example": null
          },
          "availability": {
            "type": "array",
            "description": "Time-based availability rules",
            "items": {
              "type": "object",
              "properties": {
                "week_days": {
                  "type": "array",
                  "description": "Days of week: 1 = Monday, 7 = Sunday",
                  "items": {
                    "type": "integer"
                  },
                  "example": [
                    1,
                    2,
                    3
                  ]
                },
                "intervals": {
                  "type": "array",
                  "description": "Time intervals (seconds from midnight)",
                  "items": {
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "integer",
                        "description": "Interval start",
                        "example": 3600
                      },
                      "to": {
                        "type": "integer",
                        "description": "Interval end",
                        "example": 7200
                      }
                    }
                  }
                }
              }
            },
            "example": [
              {
                "week_days": [
                  1,
                  2,
                  3
                ],
                "intervals": [
                  {
                    "from": 3600,
                    "to": 7200
                  },
                  {
                    "from": 10800,
                    "to": 14400
                  }
                ]
              },
              {
                "week_days": [
                  6,
                  7
                ],
                "intervals": [
                  {
                    "from": 36000,
                    "to": 72000
                  }
                ]
              }
            ]
          },
          "balance_container": {
            "type": "object",
            "description": "Container with attached services and/or categories and their balance",
            "properties": {
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Number of visits for this service/category",
                      "example": 10
                    },
                    "is_unlimited": {
                      "type": "boolean",
                      "description": "Whether count is unlimited",
                      "example": false
                    },
                    "service": {
                      "type": "object",
                      "description": "Service details (if link is to a service)",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 45
                        },
                        "is_category": {
                          "type": "boolean",
                          "example": false
                        },
                        "category_id": {
                          "type": "integer",
                          "example": 90
                        },
                        "title": {
                          "type": "string",
                          "example": "Service in location"
                        },
                        "online_sale_title": {
                          "type": "string",
                          "description": "Online sale title for service",
                          "example": ""
                        },
                        "is_chain": {
                          "type": "boolean",
                          "description": "Whether service belongs to chain",
                          "example": false
                        },
                        "chain_price_min": {
                          "type": "number",
                          "description": "Minimum service price across chain",
                          "example": 0
                        },
                        "chain_price_max": {
                          "type": "number",
                          "description": "Maximum service price across chain",
                          "example": 0
                        },
                        "category": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 90
                            },
                            "is_category": {
                              "type": "boolean",
                              "example": true
                            },
                            "category_id": {
                              "type": "integer",
                              "example": 1
                            },
                            "title": {
                              "type": "string",
                              "example": "First service category in location"
                            },
                            "online_sale_title": {
                              "type": "string",
                              "description": "Online sale title for category",
                              "example": ""
                            },
                            "is_chain": {
                              "type": "boolean",
                              "description": "Whether category belongs to chain",
                              "example": false
                            },
                            "chain_price_min": {
                              "type": "number",
                              "description": "Minimum price across chain",
                              "example": 0
                            },
                            "chain_price_max": {
                              "type": "number",
                              "description": "Maximum price across chain",
                              "example": 0
                            },
                            "category": {
                              "anyOf": [
                                {
                                  "type": "array",
                                  "description": "Nested categories as array",
                                  "items": {
                                    "type": "object"
                                  }
                                },
                                {
                                  "type": "object",
                                  "description": "Nested category as object",
                                  "properties": {
                                    "id": {
                                      "type": "integer"
                                    },
                                    "category_id": {
                                      "type": "integer"
                                    },
                                    "is_category": {
                                      "type": "boolean"
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "online_sale_title": {
                                      "type": "string"
                                    }
                                  }
                                }
                              ]
                            }
                          }
                        }
                      }
                    },
                    "category": {
                      "type": "object",
                      "description": "Category details (if link is to a category)",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 91
                        },
                        "is_category": {
                          "type": "boolean",
                          "example": true
                        },
                        "category_id": {
                          "type": "integer",
                          "example": 1
                        },
                        "title": {
                          "type": "string",
                          "example": "Second service category in location"
                        },
                        "online_sale_title": {
                          "type": "string",
                          "description": "Online sale title for category",
                          "example": ""
                        },
                        "is_chain": {
                          "type": "boolean",
                          "description": "Whether category belongs to chain",
                          "example": false
                        },
                        "chain_price_min": {
                          "type": "number",
                          "description": "Minimum price across chain",
                          "example": 0
                        },
                        "chain_price_max": {
                          "type": "number",
                          "description": "Maximum price across chain",
                          "example": 0
                        },
                        "category": {
                          "anyOf": [
                            {
                              "type": "array",
                              "description": "Nested categories as array",
                              "items": {
                                "type": "object"
                              }
                            },
                            {
                              "type": "object",
                              "description": "Nested category as object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "category_id": {
                                  "type": "integer"
                                },
                                "is_category": {
                                  "type": "boolean"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "online_sale_title": {
                                  "type": "string"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "loyalty_certificates_response_data_types": {
        "title": "Root Type for loyalty_certificates_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Certificate ID",
                  "format": "int32"
                },
                "number": {
                  "type": "string",
                  "description": "Certificate number"
                },
                "balance": {
                  "type": "number",
                  "description": "Current balance",
                  "format": "float"
                },
                "default_balance": {
                  "type": "number",
                  "description": "Starting balance",
                  "format": "float"
                },
                "type_id": {
                  "type": "integer",
                  "description": "Certificate type identifier",
                  "format": "int32"
                },
                "status_id": {
                  "type": "integer",
                  "description": "Status ID",
                  "format": "int32"
                },
                "created_date": {
                  "type": "string",
                  "description": "Date of sale",
                  "format": "date-time"
                },
                "expiration_date": {
                  "type": "string",
                  "description": "Burn date",
                  "format": "date-time"
                },
                "type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Certificate type identifier",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Gift card type name"
                    },
                    "balance": {
                      "type": "integer",
                      "description": "Certificate denomination",
                      "format": "int32"
                    },
                    "is_multi": {
                      "type": "boolean",
                      "description": "Is it available for multiple debits"
                    },
                    "company_group_id": {
                      "type": "integer",
                      "description": "ID of the chain where the certificate type was created",
                      "format": "int32"
                    },
                    "item_type_id": {
                      "type": "integer",
                      "description": "Restriction on the use of redemption points. 0 - no restrictions, 1 - only services, 2 - some services + all products, 3 - some services, 4 - only products",
                      "format": "int32"
                    },
                    "expiration_type_id": {
                      "type": "integer",
                      "description": "The ID of the expiration limit. 0 - unlimited, 1 - fixed date, 2 - fixed period",
                      "format": "int32"
                    },
                    "expiration_date": {
                      "type": "string",
                      "description": "Burn date of all certificates. Populated with expiration_type_id = 1",
                      "format": "date-time"
                    },
                    "expiration_timeout": {
                      "type": "integer",
                      "description": "Validity period of certificates. Populated with expiration_type_id = 2",
                      "format": "int32"
                    },
                    "expiration_timeout_unit_id": {
                      "type": "integer",
                      "description": "Time units. 1 - Day, 2 - Week, 3 - Month, 4 - Year",
                      "format": "int32"
                    },
                    "is_allow_empty_code": {
                      "type": "boolean",
                      "description": "Sale without code"
                    },
                    "item_type": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Identifier of the expiration limit",
                          "format": "int32"
                        },
                        "title": {
                          "type": "string",
                          "description": "Name of the constraint"
                        }
                      },
                      "description": "Object with item_type_id and its name"
                    }
                  },
                  "description": "Object with certificate type information"
                },
                "status": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Status ID",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Status name"
                    }
                  },
                  "description": "An object with information about the current status of the certificate"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of certificates found)"
          }
        },
        "description": "Get certificates",
        "example": {
          "success": true,
          "data": [
            {
              "id": 409726,
              "number": 888,
              "balance": 9000,
              "default_balance": 9000,
              "type_id": 27841,
              "status_id": 2,
              "created_date": "2026-09-21T23:00:00.000-05:00",
              "expiration_date": "2026-09-21T23:00:00.000-05:00",
              "type": {
                "id": 27841,
                "title": "certificate 9000",
                "balance": 9000,
                "is_multi": true,
                "company_group_id": 128284,
                "item_type_id": 0,
                "expiration_type_id": 2,
                "expiration_timeout": 365,
                "expiration_timeout_unit_id": 1,
                "is_allow_empty_code": false,
                "item_type": {
                  "id": 0,
                  "title": "No limits"
                }
              },
              "status": {
                "id": 2,
                "title": "activated"
              }
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "loyalty_certificate_type_search_response_data_types": {
        "title": "Root Type for loyalty_certificate_type_search_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Certificate type identifier"
                },
                "title": {
                  "type": "string",
                  "description": "Gift card type name"
                },
                "balance": {
                  "type": "number",
                  "description": "Certificate denomination"
                },
                "is_multi": {
                  "type": "boolean",
                  "description": "Write-off type: true - multiple write-off, false - single write-off"
                },
                "company_group_id": {
                  "type": "number",
                  "description": "ID of the chain where the certificate type is valid"
                },
                "item_type_id": {
                  "type": "number",
                  "description": "Application restriction (list of possible values)"
                },
                "expiration_type_id": {
                  "type": "number",
                  "description": "Expiration limit (list of possible values)"
                },
                "expiration_date": {
                  "type": "string",
                  "description": "Fixed burn date in ISO8601 format (null if not set)",
                  "format": "date-time"
                },
                "expiration_timeout": {
                  "type": "number",
                  "description": "Certificate validity period from the date of sale (0 if not set)"
                },
                "expiration_timeout_unit_id": {
                  "type": "number",
                  "description": "The unit of measurement of the validity period of the certificate from the moment of sale (the list of possible values, if not specified - 0)"
                },
                "is_allow_empty_code": {
                  "type": "boolean",
                  "description": "Allow sale of certificate without code? true - allow, false - do not allow"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of certificate types found)"
          }
        },
        "description": "Get a List of Available Gift Card Types",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "title": "Fixed burn date certificate without application restrictions",
              "balance": 10,
              "is_multi": true,
              "company_group_id": 12,
              "item_type_id": 0,
              "expiration_type_id": 1,
              "expiration_date": "2026-09-21T23:00:00.000-05:00",
              "expiration_timeout": 0,
              "expiration_timeout_unit_id": 0,
              "is_allow_empty_code": true
            },
            {
              "id": 11,
              "title": "Certificate valid for 6 months from the date of sale for any goods without services",
              "balance": 100,
              "is_multi": false,
              "company_group_id": 12,
              "item_type_id": 2,
              "expiration_type_id": 2,
              "expiration_timeout": 6,
              "expiration_timeout_unit_id": 3,
              "is_allow_empty_code": false
            }
          ],
          "meta": {
            "count": 2
          }
        }
      },
      "company_loyalty_programs_search_data_types": {
        "title": "Root Type for company_loyalty_programs_search_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status."
          },
          "data": {
            "type": "array",
            "description": "An array of data objects.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Promotion ID",
                  "format": "int32"
                },
                "title": {
                  "type": "string",
                  "description": "Share name"
                },
                "type": {
                  "type": "string",
                  "description": "Promotion type",
                  "enum": [
                    "discount_static",
                    "discount_accumulative_visits",
                    "discount_accumulative_sold",
                    "discount_accumulative_paid",
                    "cashback_static_sold",
                    "cashback_static_paid",
                    "cashback_accumulative_paid",
                    "cashback_accumulative_sold",
                    "cashback_accumulative_paid_visits",
                    "cashback_accumulative_sold_visits",
                    "cashback_sold_visits",
                    "cashback_paid_visits",
                    "package_discount"
                  ]
                },
                "loyalty_type_id": {
                  "type": "integer",
                  "description": "Promotion type ID",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Identifier of the discount application type",
                  "format": "int32"
                },
                "service_item_type": {
                  "type": "string",
                  "description": "Type of application to services",
                  "enum": [
                    "any_allowed",
                    "not_allowed",
                    "custom_allowed"
                  ]
                },
                "good_item_type": {
                  "type": "string",
                  "description": "Type of application to products",
                  "enum": [
                    "any_allowed",
                    "not_allowed",
                    "custom_allowed"
                  ]
                },
                "value_unit_id": {
                  "type": "integer",
                  "description": "Unit ID of the bonus or discount",
                  "format": "int32"
                },
                "value_unit": {
                  "type": "string",
                  "description": "Bonus or discount measurement unit (percentage, fixed amount)",
                  "enum": [
                    "percent",
                    "amount"
                  ]
                },
                "group_id": {
                  "type": "integer",
                  "description": "Chain ID",
                  "format": "int32"
                },
                "usage_limit": {
                  "type": "integer",
                  "description": "Limit on the number of applications (only for cashback)",
                  "format": "int32"
                },
                "visit_multiplicity": {
                  "type": "integer",
                  "description": "Multiplicity of application by visits (only for cashback)",
                  "format": "int32"
                },
                "sold_items_multiplicity": {
                  "type": "integer",
                  "description": "How many services you need to pay to get a discount on promotional services (only for the promotion type \"Discount by condition\")",
                  "format": "int32"
                },
                "current_package_progress": {
                  "type": "integer",
                  "description": "The current number of uses of the promotion",
                  "format": "int32"
                },
                "allowed_usages_amount": {
                  "type": "integer",
                  "description": "Limitation on the number of allowed uses",
                  "format": "int32"
                },
                "expiration_timeout": {
                  "type": "integer",
                  "description": "Expiration date of bonuses or discounts",
                  "format": "int32"
                },
                "expiration_timeout_unit": {
                  "type": "string",
                  "description": "The unit of measurement for the expiration date of bonuses or discounts",
                  "enum": [
                    "day",
                    "week",
                    "month",
                    "year"
                  ]
                },
                "expiration_notification_timeout": {
                  "type": "integer",
                  "description": "How many days before the bonus or discount expires, you need to send a notification to the client",
                  "format": "int32"
                },
                "params_source_type": {
                  "type": "string",
                  "description": "Where to get the client's history to calculate the size of the bonus or discount (for accumulation promotions or conditional discounts)",
                  "enum": [
                    "loyalty_card",
                    "active_companies",
                    "chain"
                  ]
                },
                "history_start_date": {
                  "type": "string",
                  "description": "From what date to take into account the client's history to calculate the size of the bonus or discount (for accumulative promotions or conditional discounts)"
                },
                "on_changed_notification_template_id": {
                  "type": "integer",
                  "description": "Notification template ID when changing bonus or discount",
                  "format": "int32"
                },
                "on_expiration_notification_template_id": {
                  "type": "integer",
                  "description": "Identifier of the notification template when a bonus or discount burns",
                  "format": "int32"
                },
                "first_transaction_date": {
                  "type": "string",
                  "description": "Date of first stock transaction"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of objects found",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of objects found)"
          }
        },
        "description": "Getting a list of stocks available for a location",
        "example": {
          "success": true,
          "data": [
            {
              "id": 53591,
              "title": "100 USD discount on Altegio Implementation Consultation",
              "type": "discount_static",
              "loyalty_type_id": 1,
              "item_type_id": 4,
              "service_item_type": "custom_allowed",
              "good_item_type": "any_allowed",
              "value_unit_id": 2,
              "value_unit": "amount",
              "group_id": 502054,
              "usage_limit": 0,
              "visit_multiplicity": 1,
              "sold_items_multiplicity": 1,
              "current_package_progress": 0,
              "allowed_usages_amount": 0,
              "expiration_timeout": 0,
              "expiration_timeout_unit": "day",
              "expiration_notification_timeout": 0,
              "params_source_type": "loyalty_card",
              "on_changed_notification_template_id": 0,
              "on_expiration_notification_template_id": 0
            }
          ],
          "meta": {
            "count": 1
          }
        }
      },
      "visit_loyalty_transaction_reaponse_data_types": {
        "title": "Root Type for visit_loyalty_transaction_reaponse_data_types",
        "type": "array",
        "description": "Get loyalty transactions by visit",
        "example": [
          {
            "id": 22989715,
            "status_id": 1,
            "amount": 100,
            "type_id": 1,
            "program_id": 12705,
            "card_id": 0,
            "salon_group_id": 145071,
            "item_id": 5048371,
            "item_type_id": 7,
            "item_record_id": 0,
            "goods_transaction_id": 96082477,
            "is_discount": true,
            "is_loyalty_withdraw": false,
            "type": {
              "id": 1,
              "title": "Promotion Discount"
            },
            "program": {
              "id": 12705,
              "title": "invited",
              "value": 10,
              "loyalty_type_id": 1,
              "item_type_id": 0,
              "value_unit_id": 1,
              "group_id": 145071
            }
          },
          {
            "id": 22994127,
            "status_id": 1,
            "amount": 100,
            "type_id": 4,
            "program_id": 19044,
            "card_id": 9234863,
            "salon_group_id": 145071,
            "item_id": 0,
            "item_type_id": 0,
            "item_record_id": 0,
            "goods_transaction_id": 0,
            "is_discount": false,
            "is_loyalty_withdraw": false,
            "type": {
              "id": 4,
              "title": "Referral program accrual"
            },
            "program": {
              "id": 19044,
              "title": "inviter 2",
              "value": 100,
              "loyalty_type_id": 6,
              "item_type_id": 0,
              "value_unit_id": 2,
              "group_id": 145071
            }
          }
        ],
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "Loyalty transaction ID",
              "format": "int32"
            },
            "status_id": {
              "type": "integer",
              "description": "Status ID",
              "format": "int32"
            },
            "amount": {
              "type": "number",
              "description": "Transaction amount",
              "format": "float"
            },
            "type_id": {
              "type": "integer",
              "description": "Transaction type identifier",
              "format": "int32"
            },
            "program_id": {
              "type": "integer",
              "description": "Loyalty program ID",
              "format": "int32"
            },
            "card_id": {
              "type": "integer",
              "description": "Loyalty card ID",
              "format": "int32"
            },
            "salon_group_id": {
              "type": "integer",
              "description": "ID of the chain to which the loyalty belongs",
              "format": "int32"
            },
            "item_id": {
              "type": "integer",
              "description": "Identifier of the product/service to which the promotion applies",
              "format": "int32"
            },
            "item_type_id": {
              "type": "integer",
              "description": "Operation type identifier",
              "format": "int32"
            },
            "item_record_id": {
              "type": "integer",
              "description": "Identifier of the appointment to which the service/product belongs",
              "format": "int32"
            },
            "goods_transaction_id": {
              "type": "integer",
              "description": "Commodity transaction ID",
              "format": "int32"
            },
            "is_discount": {
              "type": "boolean",
              "description": "Is a discount"
            },
            "is_loyalty_withdraw": {
              "type": "boolean",
              "description": "Is the application of loyalty canceled"
            },
            "type": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Loyalty type identifier",
                  "format": "int32"
                },
                "title": {
                  "type": "string",
                  "description": "Loyalty type name"
                }
              },
              "description": "Loyalty type"
            },
            "program": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Promotion ID",
                  "format": "int32"
                },
                "title": {
                  "type": "string",
                  "description": "Share name"
                },
                "value": {
                  "type": "integer",
                  "description": "Discount value",
                  "format": "int32"
                },
                "loyalty_type_id": {
                  "type": "integer",
                  "description": "Promotion type ID",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Is cashback earned on products?",
                  "format": "int32"
                },
                "value_unit_id": {
                  "type": "integer",
                  "description": "Bonus field. Discount % or Fixed. sum",
                  "format": "int32"
                },
                "group_id": {
                  "type": "integer",
                  "description": "ID of the chain where the action was created",
                  "format": "int32"
                }
              },
              "description": "Promotion Information"
            }
          }
        }
      },
      "loyalty_generate_code200_data_option": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Generated code"
          }
        }
      },
      "loyalty_generate_code200_option": {
        "required": [
          "data",
          "meta",
          "success"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "flag indicating that the response was completed without errors (true)"
          },
          "data": {
            "$ref": "#/components/schemas/loyalty_generate_code200_data_option"
          },
          "meta": {
            "type": "array",
            "description": "metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "loyalty_generate_code_error_option": {
        "required": [
          "data",
          "success"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Error"
          },
          "data": {
            "type": "string",
            "description": "Error data"
          }
        }
      },
      "loyalty_generate_code_error_meta_option": {
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message"
          }
        }
      },
      "visit_loyalty_withdrawl_request_data_types": {
        "title": "Root Type for visit_loyalty_withdrawl_request_data_types",
        "required": [
          "amount",
          "record_id",
          "visit_id"
        ],
        "type": "object",
        "properties": {
          "record_id": {
            "type": "number",
            "description": "Appointment ID"
          },
          "visit_id": {
            "type": "number",
            "description": "Visit ID"
          },
          "amount": {
            "type": "number",
            "description": "Number of points to redeem"
          }
        },
        "description": "Apply Deduction from the Loyalty Card in the Visit",
        "example": {
          "record_id": 140967944,
          "visit_id": 118389447,
          "amount": 100
        }
      },
      "visit_loyalty_apply_response_data_types": {
        "title": "Root Type for visit_loyalty_apply_response_data_types",
        "type": "object",
        "properties": {
          "payment_transactions": {
            "type": "array",
            "description": "Array with information about the financial transactions of the appointment",
            "items": {
              "type": "object"
            }
          },
          "loyalty_transactions": {
            "type": "array",
            "description": "An array with information about applied loyalty transactions in a visit",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Loyalty transaction ID",
                  "format": "int32"
                },
                "status_id": {
                  "type": "integer",
                  "description": "Status ID",
                  "format": "int32"
                },
                "amount": {
                  "type": "number",
                  "description": "Transaction amount",
                  "format": "float"
                },
                "type_id": {
                  "type": "integer",
                  "description": "Transaction type ID",
                  "format": "int32"
                },
                "program_id": {
                  "type": "integer",
                  "description": "Loyalty program ID",
                  "format": "int32"
                },
                "card_id": {
                  "type": "integer",
                  "description": "Loyalty card ID",
                  "format": "int32"
                },
                "salon_group_id": {
                  "type": "integer",
                  "description": "ID of the chain to which the loyalty belongs",
                  "format": "int32"
                },
                "item_id": {
                  "type": "integer",
                  "description": "Identifier of the product/service to which the promotion applies",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Operation type identifier",
                  "format": "int32"
                },
                "item_record_id": {
                  "type": "integer",
                  "description": "Identifier of the appointment to which the service/product belongs",
                  "format": "int32"
                },
                "goods_transaction_id": {
                  "type": "integer",
                  "description": "Commodity transaction ID",
                  "format": "int32"
                },
                "is_discount": {
                  "type": "boolean",
                  "description": "Is a discount"
                },
                "is_loyalty_withdraw": {
                  "type": "boolean",
                  "description": "Is the application of loyalty canceled"
                },
                "type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Loyalty type identifier",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string",
                      "description": "Loyalty type name"
                    }
                  },
                  "description": "Loyalty type"
                }
              }
            }
          },
          "kkm_transaction_details_container": {
            "type": "object",
            "properties": {
              "last_operation_type": {
                "type": "integer",
                "description": "Is the receipt printed (0 - return receipt, 1 - sale receipt)",
                "format": "int32"
              },
              "transactions": {
                "type": "array",
                "description": "Array of KKM transactions",
                "items": {
                  "type": "object"
                }
              }
            },
            "description": "An object that holds details about transactions recorded by the POS system"
          },
          "items": {
            "type": "array",
            "description": "Array with information about products and services of the appointment",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Object ID",
                  "format": "int32"
                },
                "item_id": {
                  "type": "integer",
                  "description": "Product/service identifier",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Operation type identifier",
                  "format": "int32"
                },
                "record_id": {
                  "type": "integer",
                  "description": "Appointment ID",
                  "format": "int32"
                },
                "item_title": {
                  "type": "string",
                  "description": "Product/service name"
                },
                "amount": {
                  "type": "integer",
                  "description": "Number of products/services",
                  "format": "int32"
                },
                "first_cost": {
                  "type": "number",
                  "description": "Initial cost",
                  "format": "float"
                },
                "manual_cost": {
                  "type": "number",
                  "description": "Cost changed manually",
                  "format": "float"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount",
                  "format": "float"
                },
                "cost": {
                  "type": "number",
                  "description": "the total cost",
                  "format": "float"
                },
                "master_id": {
                  "type": "integer",
                  "description": "team member ID",
                  "format": "int32"
                },
                "good_id": {
                  "type": "integer",
                  "description": "Item ID",
                  "format": "int32"
                },
                "service_id": {
                  "type": "integer",
                  "description": "Service ID",
                  "format": "int32"
                },
                "event_id": {
                  "type": "integer",
                  "description": "Promotion ID",
                  "format": "int32"
                },
                "is_service": {
                  "type": "boolean",
                  "description": "Is a service"
                },
                "is_event": {
                  "type": "boolean",
                  "description": "Is a stock"
                },
                "is_good": {
                  "type": "boolean",
                  "description": "Is the commodity"
                }
              }
            }
          }
        },
        "description": "Application of loyalty in a visit",
        "example": {
          "payment_transactions": [],
          "loyalty_transactions": [
            {
              "id": 22985556,
              "status_id": 1,
              "amount": 20,
              "type_id": 1,
              "program_id": 20802,
              "card_id": 9223622,
              "salon_group_id": 145071,
              "item_id": 5048384,
              "item_type_id": 7,
              "item_record_id": 0,
              "goods_transaction_id": 96063258,
              "is_discount": true,
              "is_loyalty_withdraw": false,
              "type": {
                "id": 1,
                "title": "Promotion discount"
              }
            }
          ],
          "kkm_transaction_details_container": {
            "last_operation_type": 1,
            "transactions": []
          },
          "items": [
            {
              "id": 96063258,
              "item_id": 5048384,
              "item_type_id": 7,
              "record_id": 0,
              "item_title": "test two",
              "amount": 1,
              "first_cost": 20,
              "manual_cost": 20,
              "discount": 0,
              "cost": 20,
              "master_id": 548096,
              "good_id": 5048384,
              "service_id": 0,
              "event_id": 0,
              "is_service": false,
              "is_event": false,
              "is_good": true
            },
            {
              "id": 0,
              "item_id": 2560779,
              "item_type_id": 1,
              "record_id": 140878948,
              "item_title": "Deep bikini",
              "amount": 1,
              "first_cost": 3000,
              "manual_cost": 3000,
              "discount": 0,
              "cost": 3000,
              "master_id": 140878948,
              "good_id": 0,
              "service_id": 2560779,
              "event_id": 0,
              "is_service": true,
              "is_event": false,
              "is_good": false
            }
          ]
        }
      },
      "visit_loyalty_request_data_types": {
        "title": "Root Type for visit_loyalty_request_data_types",
        "required": [
          "record_id",
          "visit_id"
        ],
        "type": "object",
        "properties": {
          "record_id": {
            "type": "number",
            "description": "Appointment ID"
          },
          "visit_id": {
            "type": "number",
            "description": "Visit ID"
          }
        },
        "description": "Apply promotion",
        "example": {
          "record_id": 0,
          "visit_id": 0
        }
      },
      "visit_loyalty_cancel_response_data_types": {
        "title": "Root Type for visit_loyalty_cancel_response_data_types",
        "type": "object",
        "properties": {
          "payment_transactions": {
            "type": "array",
            "description": "Array with information about the financial transactions of the appointment",
            "items": {
              "type": "object"
            }
          },
          "loyalty_transactions": {
            "type": "array",
            "description": "An array with information about applied loyalty transactions in a visit",
            "items": {
              "type": "object"
            }
          },
          "kkm_transaction_details_container": {
            "type": "object",
            "properties": {
              "last_operation_type": {
                "type": "integer",
                "format": "int32"
              },
              "transactions": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            },
            "description": "An object that holds details about transactions recorded by the POS system"
          },
          "items": {
            "type": "array",
            "description": "Array with information about products and services of the appointment",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Object ID",
                  "format": "int32"
                },
                "item_id": {
                  "type": "integer",
                  "description": "Product/service identifier",
                  "format": "int32"
                },
                "item_type_id": {
                  "type": "integer",
                  "description": "Operation type identifier",
                  "format": "int32"
                },
                "record_id": {
                  "type": "integer",
                  "description": "Appointment ID",
                  "format": "int32"
                },
                "item_title": {
                  "type": "string",
                  "description": "Product/service name"
                },
                "amount": {
                  "type": "integer",
                  "description": "Number of products/services",
                  "format": "int32"
                },
                "first_cost": {
                  "type": "number",
                  "description": "Initial cost",
                  "format": "float"
                },
                "manual_cost": {
                  "type": "number",
                  "description": "Cost changed manually",
                  "format": "float"
                },
                "discount": {
                  "type": "number",
                  "description": "Discount",
                  "format": "float"
                },
                "cost": {
                  "type": "number",
                  "description": "the total cost",
                  "format": "float"
                },
                "master_id": {
                  "type": "integer",
                  "description": "team member ID",
                  "format": "int32"
                },
                "good_id": {
                  "type": "integer",
                  "description": "Item ID",
                  "format": "int32"
                },
                "service_id": {
                  "type": "integer",
                  "description": "Service ID",
                  "format": "int32"
                },
                "event_id": {
                  "type": "integer",
                  "description": "Promotion ID",
                  "format": "int32"
                },
                "is_service": {
                  "type": "boolean",
                  "description": "Is a service"
                },
                "is_event": {
                  "type": "boolean",
                  "description": "Is a stock"
                },
                "is_good": {
                  "type": "boolean",
                  "description": "Is the commodity"
                }
              }
            }
          }
        },
        "description": "Cancellation of loyalty in a visit",
        "example": {
          "payment_transactions": [],
          "loyalty_transactions": [],
          "kkm_transaction_details_container": {
            "last_operation_type": 1,
            "transactions": []
          },
          "items": [
            {
              "id": 96063258,
              "item_id": 5048384,
              "item_type_id": 7,
              "record_id": 0,
              "item_title": "test two",
              "amount": 1,
              "first_cost": 20,
              "manual_cost": 20,
              "discount": 0,
              "cost": 20,
              "master_id": 548096,
              "good_id": 5048384,
              "service_id": 0,
              "event_id": 0,
              "is_service": false,
              "is_event": false,
              "is_good": true
            },
            {
              "id": 0,
              "item_id": 2560779,
              "item_type_id": 1,
              "record_id": 140878948,
              "item_title": "Deep bikini",
              "amount": 1,
              "first_cost": 3000,
              "manual_cost": 3000,
              "discount": 0,
              "cost": 3000,
              "master_id": 140878948,
              "good_id": 0,
              "service_id": 2560779,
              "event_id": 0,
              "is_service": true,
              "is_event": false,
              "is_good": false
            }
          ]
        }
      },
      "visit_loyalty_referral_request_data_types": {
        "title": "Root Type for visit_loyalty_referral_request_data_types",
        "required": [
          "record_id",
          "referrer_phone",
          "visit_id"
        ],
        "type": "object",
        "properties": {
          "record_id": {
            "type": "number",
            "description": "Appointment ID"
          },
          "visit_id": {
            "type": "number",
            "description": "Visit ID"
          },
          "referrer_phone": {
            "type": "number",
            "description": "Phone number of the inviter"
          }
        },
        "description": "Apply referral program in a visit",
        "example": {
          "record_id": 140967944,
          "visit_id": 118389447,
          "referrer_phone": 13155550175
        }
      },
      "salary_staff_balance": {
        "title": "Salary balance object",
        "type": "object",
        "properties": {
          "income": {
            "type": "string",
            "description": "Income."
          },
          "expense": {
            "type": "string",
            "description": "Expense."
          },
          "balance": {
            "type": "string",
            "description": "Balance."
          }
        }
      },
      "salary_staff_calculation_daily": {
        "title": "Mutual settlements grouped by date",
        "type": "object",
        "properties": {
          "payroll_daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "description": "Date."
                },
                "payroll_sum": {
                  "$ref": "#/components/schemas/salary_staff_balance",
                  "description": "Total payroll sum for this date."
                }
              }
            }
          },
          "currency": {
            "$ref": "#/components/schemas/currency",
            "description": "Currency."
          }
        },
        "description": "Mutual settlements grouped by date."
      },
      "salary_staff_calculation": {
        "title": "Mutual settlements",
        "type": "object",
        "properties": {
          "total_sum": {
            "$ref": "#/components/schemas/salary_staff_balance",
            "description": "Total sum."
          },
          "currency": {
            "$ref": "#/components/schemas/currency",
            "description": "Currency."
          }
        },
        "description": "Mutual settlements."
      },
      "salary_staff_schemes_count": {
        "title": "Salary schemes count",
        "type": "object",
        "properties": {
          "staff_id": {
            "type": "integer",
            "description": "ID of a team member.",
            "format": "int32"
          },
          "salary_schemes_count": {
            "type": "integer",
            "description": "Applicable salary schemes count.",
            "format": "int32"
          }
        }
      },
      "salary_payroll_calculation": {
        "title": "Salary calculation object",
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of calculation."
          },
          "company_id": {
            "type": "number",
            "description": "ID of a location."
          },
          "staff_id": {
            "type": "number",
            "description": "ID of a team member."
          },
          "amount": {
            "type": "number",
            "description": "Calculated salary amount."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "confirmed"
            ],
            "description": "Calculation status."
          },
          "date_create": {
            "type": "string",
            "format": "date",
            "description": "Date of calculation creation."
          },
          "date_from": {
            "type": "string",
            "format": "date",
            "description": "Date of calculation period start."
          },
          "date_to": {
            "type": "string",
            "format": "date",
            "description": "Date of calculation period end."
          },
          "comment": {
            "type": "string",
            "description": "Calculation comment."
          }
        },
        "example": {
          "id": 123,
          "company_id": 456,
          "staff_id": 789,
          "amount": 1000,
          "status": "confirmed",
          "date_create": "2026-03-03",
          "date_from": "2026-03-01",
          "date_to": "2026-03-02",
          "comment": "Calculation per day"
        }
      },
      "salary_payroll_calculation_item_paid_container": {
        "title": "Payment details object",
        "type": "object",
        "properties": {
          "money_sum": {
            "type": "string",
            "description": "Sum paid with money."
          },
          "discount_sum": {
            "type": "string",
            "description": "Sum paid with discount."
          },
          "bonus_sum": {
            "type": "string",
            "description": "Sum paid with bonus."
          },
          "certificate_sum": {
            "type": "string",
            "description": "Sum paid with a gift card."
          },
          "abonement_sum": {
            "type": "string",
            "description": "Sum paid with a membership."
          },
          "deposit_sum": {
            "type": "string",
            "description": "Sum paid with a customer account."
          }
        }
      },
      "salary_payroll_calculation_item_info_container": {
        "title": "Payroll calculation rules details object",
        "type": "object",
        "properties": {
          "criteria_title": {
            "type": "string",
            "description": "Salary payroll criterium title."
          },
          "param_title": {
            "type": "string",
            "description": "Salary payroll parameter title."
          },
          "scheme_title": {
            "type": "string",
            "description": "Salary payroll scheme title."
          }
        }
      },
      "salary_payroll_calculation_item_target_calculation": {
        "title": "Salary calculation item target rule object",
        "type": "object",
        "properties": {
          "type_slug": {
            "type": "string",
            "enum": [
              "fix",
              "percent"
            ],
            "description": "Rule type."
          },
          "value": {
            "type": "number",
            "description": "Value."
          },
          "description": {
            "type": "string",
            "description": "Calculation rule description."
          }
        }
      },
      "salary_payroll_calculation_item_target_container": {
        "title": "Salary calculation item target object",
        "type": "object",
        "properties": {
          "target_type_slug": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "service",
              "good"
            ],
            "description": "Type of a target."
          },
          "target_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of a target."
          },
          "title": {
            "type": "string",
            "description": "Title of a target."
          },
          "cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sale cost of a target."
          },
          "net_cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Net cost of a target."
          },
          "salary_sum": {
            "type": [
              "string",
              "null"
            ],
            "description": "Total calculated salary sum for a target."
          },
          "salary_promotion_sum": {
            "type": [
              "string",
              "null"
            ],
            "description": "Calculated salary sum for the promotion of a target."
          },
          "salary_calculation": {
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/salary_payroll_calculation_item_target_calculation"
              }
            ],
            "description": "Target salary calculation rule."
          }
        }
      },
      "salary_payroll_calculation_item_discrepancy": {
        "title": "Payroll calculation discrepancy details object",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "enum": [
              "new",
              "deleted",
              "updated_rule",
              "updated_sum"
            ],
            "description": "Discrepancy type."
          },
          "actual_sum": {
            "type": "string",
            "description": "Actual salary sum."
          },
          "difference_sum": {
            "type": "string",
            "description": "Difference between actual and calculated salary sums."
          }
        }
      },
      "salary_payroll_calculation_item_container": {
        "title": "Salary calculation item object",
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date."
          },
          "time": {
            "type": "string",
            "format": "time",
            "description": "Time."
          },
          "item_id": {
            "type": "number",
            "description": "ID of an entity subject to salary calculation (e.g., appointment ID or sale ID)."
          },
          "item_type_slug": {
            "type": "string",
            "enum": [
              "periodic",
              "sale",
              "record",
              "bonus",
              "penalty",
              "retro_bonus",
              "activity"
            ],
            "description": "Type of an entity subject to salary calculation (e.g., appointment or sale)."
          },
          "salary_sum": {
            "type": "string",
            "description": "Calculated salary sum."
          },
          "record_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of an appointment."
          },
          "client_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of a customer."
          },
          "cost": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base cost."
          },
          "paid": {
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/salary_payroll_calculation_item_paid_container"
              }
            ],
            "description": "Payment details."
          },
          "salary_calculation_info": {
            "$ref": "#/components/schemas/salary_payroll_calculation_item_info_container",
            "description": "Payroll calculation rules details."
          },
          "targets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/salary_payroll_calculation_item_target_container"
            }
          },
          "salary_discrepancy": {
            "type": [
              "object",
              "null"
            ],
            "allOf": [
              {
                "$ref": "#/components/schemas/salary_payroll_calculation_item_discrepancy"
              }
            ],
            "description": "Payroll calculation discrepancy details (if any)."
          }
        }
      },
      "salary_payroll_calculation_container": {
        "title": "Salary calculation object with details",
        "allOf": [
          {
            "$ref": "#/components/schemas/salary_payroll_calculation"
          },
          {
            "type": "object",
            "properties": {
              "salary_items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/salary_payroll_calculation_item_container"
                },
                "description": "Salary calculation items."
              },
              "currency": {
                "$ref": "#/components/schemas/currency",
                "description": "Currency."
              }
            }
          }
        ]
      },
      "salary_staff_summary": {
        "title": "Salary totals",
        "type": "object",
        "properties": {
          "working_days_count": {
            "type": "integer",
            "description": "Number of working days.",
            "format": "int32"
          },
          "working_hours_count": {
            "type": "integer",
            "description": "Number of working hours.",
            "format": "int32"
          },
          "group_services_count": {
            "type": "integer",
            "description": "Number of group services provided.",
            "format": "int32"
          },
          "services_count": {
            "type": "integer",
            "description": "Number of services provided.",
            "format": "int32"
          },
          "services_sum": {
            "type": "string",
            "description": "The cost of services provided."
          },
          "goods_sales_count": {
            "type": "integer",
            "description": "Number of products sold.",
            "format": "int32"
          },
          "goods_sales_sum": {
            "type": "string",
            "description": "Cost of products sold."
          },
          "total_sum": {
            "type": "string",
            "description": "Total cost."
          },
          "salary": {
            "type": "string",
            "description": "Salary."
          }
        }
      },
      "salary_staff_period_daily": {
        "title": "Payroll for a period for a team member grouped by date",
        "type": "object",
        "properties": {
          "period_calculation_daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string",
                  "format": "date",
                  "description": "Date."
                },
                "period_calculation": {
                  "$ref": "#/components/schemas/salary_staff_summary",
                  "description": "Calculations for this date."
                }
              }
            }
          },
          "currency": {
            "$ref": "#/components/schemas/currency",
            "description": "Currency."
          }
        },
        "description": "Payroll for a period for a specific team member grouped by date."
      },
      "salary_staff_period": {
        "title": "Payroll for a period for a team member",
        "allOf": [
          {
            "$ref": "#/components/schemas/salary_staff_summary"
          },
          {
            "type": "object",
            "properties": {
              "currency": {
                "$ref": "#/components/schemas/currency",
                "description": "Currency."
              }
            }
          }
        ],
        "description": "Payroll for a period for a specific team member."
      },
      "salary_staff_scheme": {
        "title": "Salary scheme object",
        "type": "object",
        "properties": {
          "staff_id": {
            "type": "integer",
            "description": "ID of a team member.",
            "format": "int32"
          },
          "date_start": {
            "type": "string",
            "description": "Start date the salary scheme is applicable.",
            "format": "date"
          },
          "date_end": {
            "type": "string",
            "description": "Start date the salary scheme is applicable. Null, if salary scheme is unlimited.",
            "format": "date"
          },
          "salary_scheme": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of a salary scheme.",
                "format": "int32"
              },
              "title": {
                "type": "string",
                "description": "Title of a salary scheme."
              }
            },
            "description": "Salary scheme."
          }
        }
      },
      "notification_settings_notification_types_data_type": {
        "title": "Root Type for notification_settings_notification_types_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "array",
            "description": "Array of objects",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Notification type"
                },
                "channels": {
                  "type": "object",
                  "properties": {
                    "push": {
                      "type": "integer",
                      "description": "PUSH notifications",
                      "format": "int32"
                    },
                    "sms": {
                      "type": "integer",
                      "description": "SMS notifications",
                      "format": "int32"
                    },
                    "email": {
                      "type": "integer",
                      "description": "Email Notifications",
                      "format": "int32"
                    }
                  },
                  "description": "Channels through which notifications will be sent"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of objects)"
          }
        },
        "description": "Location notification settings",
        "example": {
          "success": true,
          "data": [
            {
              "type": "record_create_online_staff",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 1
              }
            },
            {
              "type": "record_move_admin",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 0
              }
            },
            {
              "type": "license_expire",
              "channels": {
                "push": 1,
                "sms": 1,
                "email": 1
              }
            },
            {
              "type": "record_create_offline_admin",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 1
              }
            },
            {
              "type": "record_create_offline_staff",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 0
              }
            },
            {
              "type": "record_create_online_admin",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 1
              }
            },
            {
              "type": "record_delete_admin",
              "channels": {
                "push": 0,
                "sms": 0,
                "email": 1
              }
            },
            {
              "type": "record_delete_staff",
              "channels": {
                "push": 1,
                "sms": 0,
                "email": 0
              }
            },
            {
              "type": "record_move_staff",
              "channels": {
                "push": 0,
                "sms": 0,
                "email": 0
              }
            }
          ],
          "meta": {
            "count": 9
          }
        }
      },
      "notification_settings_users_data_type": {
        "title": "Root Type for notification_settings_users_data_type",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "description": "Notification type (for team member/for administrator)",
                "enum": [
                  "admin",
                  "staff",
                  "disabled"
                ]
              },
              "notification_types": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Notification type",
                      "enum": [
                        "record_create_online_staff",
                        "record_create_offline_staff",
                        "record_delete_staff",
                        "record_move_staff",
                        "record_create_online_admin",
                        "record_create_offline_admin",
                        "record_delete_admin",
                        "record_move_admin",
                        "license_expire"
                      ]
                    },
                    "channels": {
                      "type": "object",
                      "properties": {
                        "push": {
                          "type": "integer",
                          "description": "PUSH notifications",
                          "format": "int32"
                        },
                        "sms": {
                          "type": "integer",
                          "description": "SMS notifications",
                          "format": "int32"
                        },
                        "email": {
                          "type": "integer",
                          "description": "Email Notifications",
                          "format": "int32"
                        }
                      },
                      "description": "Channels through which notifications will be sent"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get User Notification Settings",
        "example": {
          "success": true,
          "data": {
            "mode": "staff",
            "notification_types": [
              {
                "type": "record_create_online_staff",
                "channels": {
                  "push": 1,
                  "sms": 0,
                  "email": 1
                }
              },
              {
                "type": "record_create_offline_staff",
                "channels": {
                  "push": 1,
                  "sms": 0,
                  "email": 0
                }
              },
              {
                "type": "record_delete_staff",
                "channels": {
                  "push": 0,
                  "sms": 0,
                  "email": 0
                }
              },
              {
                "type": "record_move_staff",
                "channels": {
                  "push": 0,
                  "sms": 0,
                  "email": 0
                }
              },
              {
                "type": "license_expire",
                "channels": {
                  "push": 0,
                  "sms": 0,
                  "email": 0
                }
              }
            ]
          },
          "meta": []
        }
      },
      "notification_settings_users_request_data_type": {
        "title": "Root Type for notification_settings_users_request_data_type",
        "type": "object",
        "properties": {
          "notification_types": {
            "type": "array",
            "description": "Array of objects",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Notification type",
                  "enum": [
                    "record_create_online_staff",
                    "record_create_offline_staff",
                    "record_delete_staff",
                    "record_move_staff",
                    "record_create_online_admin",
                    "record_create_offline_admin",
                    "record_delete_admin",
                    "record_move_admin",
                    "license_expire"
                  ]
                },
                "channels": {
                  "type": "object",
                  "properties": {
                    "push": {
                      "type": "integer",
                      "description": "PUSH notification",
                      "format": "int32"
                    }
                  },
                  "description": "The channel on which the notification will be sent"
                }
              }
            }
          }
        },
        "description": "Change User Push Notification Settings",
        "example": {
          "notification_types": [
            {
              "type": "record_create_online_admin",
              "channels": {
                "push": 1
              }
            },
            {
              "type": "record_create_offline_admin",
              "channels": {
                "push": 1
              }
            },
            {
              "type": "record_delete_admin",
              "channels": {
                "push": 1
              }
            },
            {
              "type": "record_move_admin",
              "channels": {
                "push": 1
              }
            },
            {
              "type": "license_expire",
              "channels": {
                "push": 1
              }
            }
          ]
        }
      },
      "custom_fields_response_data_types": {
        "title": "Root Type for custom_fields_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "Field ID",
                  "format": "int32"
                },
                "salon_id": {
                  "type": "number",
                  "description": "location ID"
                },
                "custom_field": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "Field ID",
                      "format": "int32"
                    },
                    "code": {
                      "type": "string",
                      "description": "Field code by which values for appointment fields are set"
                    },
                    "entity_type": {
                      "type": "string",
                      "description": "Entity type for which the field is valid (customer card, appointment window)"
                    },
                    "show_in_ui": {
                      "type": "boolean",
                      "description": "Whether to show fields in the interface"
                    },
                    "title": {
                      "type": "string",
                      "description": "Name of add. fields"
                    },
                    "user_can_edit": {
                      "type": "boolean",
                      "description": "Is editing allowed"
                    },
                    "type": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Field type code"
                        },
                        "title": {
                          "type": "string",
                          "description": "Field type name"
                        }
                      },
                      "description": "Field type"
                    },
                    "values": {
                      "type": "string",
                      "description": "List of valid values for type \"list\""
                    }
                  },
                  "description": "Custom fields"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Getting a collection of location fields",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "salon_id": 1,
              "custom_field": {
                "id": 1,
                "code": "my_text_field",
                "show_in_ui": true,
                "title": "test field",
                "user_can_edit": true,
                "type": {
                  "code": "text",
                  "title": "Text"
                }
              }
            }
          ],
          "meta": []
        }
      },
      "custom_fields_request_data_type": {
        "title": "Root Type for custom_fields_request_data_type",
        "required": [
          "code",
          "show_in_ui",
          "title",
          "type",
          "user_can_edit"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Field type"
          },
          "code": {
            "type": "string",
            "description": "Field ID"
          },
          "title": {
            "type": "string",
            "description": "Field name"
          },
          "user_can_edit": {
            "type": "boolean",
            "description": "Can the user edit the field"
          },
          "show_in_ui": {
            "type": "boolean",
            "description": "Whether to show the field in the interface"
          }
        },
        "description": "Adding a Custom Field",
        "example": {
          "type": "text",
          "code": "my_text_field",
          "title": "test field",
          "user_can_edit": true,
          "show_in_ui": true
        }
      },
      "groups_response_data_types": {
        "title": "Root Type for groups_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Chain ID"
                },
                "title": {
                  "type": "string",
                  "description": "Chain name"
                },
                "companies": {
                  "type": "array",
                  "description": "Chain locations",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "description": "location ID"
                      },
                      "title": {
                        "type": "string",
                        "description": "location name"
                      },
                      "public_title": {
                        "type": "string",
                        "description": "Public-facing location name"
                      },
                      "business_group_id": {
                        "type": "number",
                        "description": "Business group ID"
                      },
                      "business_type_id": {
                        "type": "number",
                        "description": "Business type ID"
                      },
                      "country_id": {
                        "type": "number",
                        "description": "Country ID"
                      },
                      "city_id": {
                        "type": "number",
                        "description": "City ID"
                      },
                      "timezone": {
                        "type": "number",
                        "description": "Timezone ID"
                      },
                      "timezone_name": {
                        "type": "string",
                        "description": "Timezone name"
                      },
                      "address": {
                        "type": "string",
                        "description": "Physical address"
                      },
                      "currency_short_title": {
                        "type": "string",
                        "description": "Currency code"
                      },
                      "coordinate_lat": {
                        "type": "number",
                        "description": "Latitude coordinate"
                      },
                      "coordinate_lon": {
                        "type": "number",
                        "description": "Longitude coordinate"
                      },
                      "logo": {
                        "type": "string",
                        "description": "Logo URL"
                      },
                      "zip": {
                        "type": "string",
                        "description": "ZIP/postal code"
                      },
                      "phone": {
                        "type": "string",
                        "description": "Phone number"
                      },
                      "phones": {
                        "type": "array",
                        "description": "Phone numbers",
                        "items": {
                          "type": "string"
                        }
                      },
                      "site": {
                        "type": "string",
                        "description": "Website URL"
                      },
                      "allow_delete_record": {
                        "type": "boolean",
                        "description": "Allow deleting records"
                      },
                      "allow_change_record": {
                        "type": "boolean",
                        "description": "Allow changing records"
                      }
                    }
                  }
                },
                "access": {
                  "type": "object",
                  "properties": {
                    "settings_access": {
                      "type": "number",
                      "description": "1 - there is access to the settings section, 0 - no access"
                    },
                    "clients_access": {
                      "type": "number",
                      "description": "1 - there is access to the client base, 0 - no access"
                    },
                    "deposits_access": {
                      "type": "number",
                      "description": "1 - there is access to client accounts, 0 - no access"
                    },
                    "deposit_types_access": {
                      "type": "number",
                      "description": "1 - there is access to client account types, 0 - no access"
                    },
                    "users_access": {
                      "type": "number",
                      "description": "1 - there is access to user management, 0 - no access"
                    },
                    "loyalty_access": {
                      "type": "number",
                      "description": "1 - there is access to loyalty, 0 - no access"
                    },
                    "loyalty_abonement_types_access": {
                      "type": "number",
                      "description": "1 - there is access to membership types, 0 - no access"
                    },
                    "loyalty_abonement_balance_edit_access": {
                      "type": "number",
                      "description": "1 - there is access to edit membership balance, 0 - no access"
                    },
                    "loyalty_abonement_period_edit_access": {
                      "type": "number",
                      "description": "1 - there is access to edit membership period, 0 - no access"
                    },
                    "loyalty_abonement_history_access": {
                      "type": "number",
                      "description": "1 - there is access to membership history, 0 - no access"
                    },
                    "loyalty_cards_manual_transactions_access": {
                      "type": "number",
                      "description": "1 - there is access to manual replenishment/withdrawal from loyalty cards, 0 - no access"
                    },
                    "loyalty_certificate_types_access": {
                      "type": "number",
                      "description": "1 - there is access to certificate types, 0 - no access"
                    },
                    "loyalty_programs_access": {
                      "type": "number",
                      "description": "1 - there is access to loyalty programs, 0 - no access"
                    },
                    "network_services_access": {
                      "type": "number",
                      "description": "1 - there is access to chain services management, 0 - no access"
                    },
                    "analytics_access": {
                      "type": "number",
                      "description": "1 - there is access to analytics, 0 - no access"
                    }
                  },
                  "description": "User access rights on the chain"
                }
              }
            }
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Obtaining chains available to the user",
        "example": {
          "success": true,
          "data": [
            {
              "id": 509,
              "title": "Chain of salons in New York",
              "companies": [
                {
                  "id": 38726,
                  "title": "Location in New York"
                },
                {
                  "id": 39287,
                  "title": "Location in New York"
                }
              ],
              "access": {
                "settings_access": "1",
                "clients_access": "1",
                "users_access": "1",
                "loyalty_access": "1",
                "loyalty_cards_manual_transactions_access": "1",
                "chain_services_access": "1"
              }
            },
            {
              "id": 508,
              "title": "Chain of salons in New York",
              "companies": [
                {
                  "id": 38545,
                  "title": "Location in New York"
                },
                {
                  "id": 38704,
                  "title": "Location in New York"
                }
              ],
              "access": {
                "settings_access": "1",
                "clients_access": "1",
                "users_access": "1",
                "loyalty_access": "1",
                "loyalty_cards_manual_transactions_access": "1",
                "chain_services_access": "1"
              }
            }
          ]
        }
      },
      "group_groupid_clients_response_data_types": {
        "title": "Root Type for group_groupid_clients_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "object",
            "properties": {
              "salon_group_id": {
                "type": "number",
                "description": "Chain ID"
              },
              "phone": {
                "type": "string",
                "description": "Customer phone"
              },
              "clients": {
                "type": "array",
                "description": "Array of clients in chain locations",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "Client ID"
                    },
                    "company_id": {
                      "type": "number",
                      "description": "Location ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Client name"
                    },
                    "email": {
                      "type": "string",
                      "description": "Client Email"
                    }
                  }
                }
              }
            },
            "description": "Object with data"
          },
          "meta": {
            "type": "array",
            "description": "Metadata (empty array)",
            "items": {
              "type": "object"
            }
          }
        },
        "description": "Get chain client by phone number",
        "example": {
          "success": true,
          "data": {
            "salon_group_id": 312,
            "phone": "+13155550175",
            "clients": [
              {
                "id": 4240880,
                "company_id": 4564,
                "name": "lx",
                "email": "client@example.com"
              },
              {
                "id": 4243272,
                "company_id": 24697,
                "name": "lx",
                "email": "client@example.com"
              }
            ]
          },
          "meta": []
        }
      },
      "group_groupid_clients_response_data_types400": {
        "title": "Root Type for group_groupid_clients_response_data_types400",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status"
          },
          "data": {
            "type": "string",
            "description": "Contains null"
          },
          "meta": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message"
              }
            },
            "description": "Object with error message"
          }
        },
        "description": "Get chain client by phone number",
        "example": {
          "success": false,
          "meta": {
            "message": "Client not found"
          }
        }
      },
      "loyalty_notification_message_template_request": {
        "title": "Root Type for LoyaltyNotificationMessageTemplateRequest",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Template option",
            "enum": [
              "none",
              "big",
              "mid",
              "small",
              "custom"
            ]
          },
          "body": {
            "type": "string",
            "description": "Template text (custom only)"
          }
        },
        "description": "Body of the request to bind the loyalty notification template",
        "example": {
          "type": "custom",
          "body": "Message text"
        }
      },
      "loyalty_program_rule_request": {
        "title": "Root Type for LoyaltyProgramRuleRequest",
        "type": "object",
        "properties": {
          "parameter": {
            "type": "integer",
            "description": "Rule Threshold (0 for Fixed Stock Types)",
            "format": "int32"
          },
          "value": {
            "type": "number",
            "description": "The value of the discount or bonus",
            "format": "double"
          },
          "service_id": {
            "type": "integer",
            "description": "Service ID (only for \"Discount by condition\" promotion)",
            "format": "int32"
          }
        },
        "description": "The body of the request to change the rule for the loyalty promotion",
        "example": {
          "parameter": 10,
          "value": 2.5,
          "service_id": 0
        }
      },
      "loyalty_program_create_request": {
        "title": "Root Type for LoyaltyProgramCreateRequest",
        "required": [
          "company_ids",
          "good_item_type",
          "rules",
          "service_item_type",
          "title",
          "type",
          "value_unit"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Share name"
          },
          "type": {
            "type": "string",
            "description": "Promotion type",
            "enum": [
              "discount_static",
              "discount_accumulative_visits",
              "discount_accumulative_sold",
              "discount_accumulative_paid",
              "cashback_static_sold",
              "cashback_static_paid",
              "cashback_accumulative_paid",
              "cashback_accumulative_sold",
              "cashback_accumulative_paid_visits",
              "cashback_accumulative_sold_visits",
              "cashback_sold_visits",
              "cashback_paid_visits",
              "package_discount"
            ]
          },
          "service_item_type": {
            "type": "string",
            "description": "Type of application to services",
            "enum": [
              "any_allowed",
              "not_allowed",
              "custom_allowed"
            ]
          },
          "good_item_type": {
            "type": "string",
            "description": "Type of application to products",
            "enum": [
              "any_allowed",
              "not_allowed",
              "custom_allowed"
            ]
          },
          "value_unit": {
            "type": "string",
            "description": "Bonus or discount measurement unit (percentage, fixed amount)",
            "enum": [
              "percent",
              "amount"
            ]
          },
          "usage_limit": {
            "type": "integer",
            "description": "Limit on the number of applications (only for cashback)",
            "format": "int32"
          },
          "visit_multiplicity": {
            "type": "integer",
            "description": "Multiplicity of application by visits (only for cashback)",
            "format": "int32"
          },
          "sold_items_multiplicity": {
            "type": "integer",
            "description": "How many services you need to pay to get a discount on promotional services (only for the promotion type \"Discount by condition\")",
            "format": "int32"
          },
          "expiration_timeout": {
            "type": "integer",
            "description": "Expiration date of bonuses or discounts",
            "format": "int32"
          },
          "expiration_timeout_unit": {
            "type": "string",
            "description": "The unit of measurement for the expiration date of bonuses or discounts",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "expiration_notification_timeout": {
            "type": "integer",
            "description": "How many days before the bonus or discount expires, a notification must be sent to the client",
            "format": "int32"
          },
          "params_source_type": {
            "type": "string",
            "description": "Where to get the client's history to calculate the size of the bonus or discount (for accumulation promotions or conditional discounts)",
            "enum": [
              "loyalty_card",
              "active_companies",
              "chain"
            ]
          },
          "history_start_date": {
            "type": "string",
            "description": "From what date to take into account the client's history to calculate the size of the bonus or discount (for accumulative promotions or conditional discounts)",
            "format": "date"
          },
          "loyalty_card_type_ids": {
            "type": "array",
            "description": "Identifiers of types of cards for which the promotion is valid",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "on_changed_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template_request"
          },
          "on_expiration_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template_request"
          },
          "rules": {
            "type": "array",
            "description": "Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions)",
            "items": {
              "$ref": "#/components/schemas/loyalty_program_rule_request"
            }
          },
          "company_ids": {
            "type": "array",
            "description": "Identifiers of locations where the promotion is valid",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_service_ids": {
            "type": "array",
            "description": "Service and service category identifiers (if application type is set for some services)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_good_ids": {
            "type": "array",
            "description": "Item IDs (if application type is set for some items)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_good_category_ids": {
            "type": "array",
            "description": "Product category identifiers (if application type is set for some products)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        },
        "description": "The body of the request to create a loyalty promotion",
        "example": {
          "title": "Cumulative discount for some services and not for goods",
          "type": "discount_accumulative_paid",
          "service_item_type": "custom_allowed",
          "good_item_type": "not_allowed",
          "allowed_service_ids": [
            53,
            92
          ],
          "allowed_good_ids": [],
          "allowed_good_category_ids": [],
          "value_unit": "percent",
          "usage_limit": 0,
          "visit_multiplicity": 0,
          "sold_items_multiplicity": 0,
          "expiration_timeout": 6,
          "expiration_timeout_unit": "month",
          "expiration_notification_timeout": 7,
          "params_source_type": "chain",
          "history_start_date": "2026-09-21",
          "loyalty_card_type_ids": [
            51,
            29
          ],
          "on_changed_notification_template": {
            "type": "custom",
            "body": "Your discount has changed"
          },
          "on_expiration_notification_template": {
            "type": "big"
          },
          "rules": [
            {
              "parameter": 10,
              "value": 2.5,
              "service_id": 0
            },
            {
              "parameter": 30,
              "value": 7.5,
              "service_id": 0
            }
          ],
          "company_ids": [
            49
          ]
        }
      },
      "loyalty_notification_message_template": {
        "title": "Root Type for LoyaltyNotificationMessageTemplate",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Template ID",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "description": "Template option",
            "enum": [
              "big",
              "mid",
              "small",
              "custom"
            ]
          },
          "body": {
            "type": "string",
            "description": "Template text"
          },
          "message_type": {
            "type": "string",
            "description": "Message type",
            "enum": [
              "loyalty_discount_expiration",
              "loyalty_cashback_expiration",
              "loyalty_discount_increased",
              "loyalty_discount_decreased",
              "loyalty_card_created",
              "loyalty_card_withdraw",
              "loyalty_withdraw_cancelled",
              "loyalty_card_manual",
              "loyalty_card_manual_withdraw",
              "loyalty_card_cashback",
              "loyalty_card_cashback_cancelled",
              "loyalty_card_income",
              "loyalty_discount_changed",
              "loyalty_cashback_changed",
              "loyalty_settings_abonement_notification"
            ]
          }
        },
        "description": "Loyalty notification template",
        "example": {
          "id": 12,
          "type": "small",
          "message_type": "loyalty_discount_expiration",
          "body": "Your discount expires tomorrow"
        }
      },
      "loyalty_program_rule": {
        "title": "Root Type for LoyaltyProgramRule",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Rule ID",
            "format": "int32"
          },
          "parameter": {
            "type": "integer",
            "description": "Rule Threshold (0 for Fixed Stock Types)",
            "format": "int32"
          },
          "value": {
            "type": "number",
            "description": "The value of the discount or bonus",
            "format": "float"
          },
          "loyalty_program_id": {
            "type": "integer",
            "description": "Loyalty promotion ID",
            "format": "int32"
          },
          "loyalty_type_id": {
            "type": "integer",
            "description": "Loyalty promotion type ID",
            "format": "int32"
          },
          "service_id": {
            "type": "integer",
            "description": "Service ID (only for \"Discount by condition\" promotion)",
            "format": "int32"
          }
        },
        "description": "Loyalty promotion rule",
        "example": {
          "id": 34,
          "parameter": 0,
          "value": 3.5,
          "loyalty_program_id": 123,
          "loyalty_type_id": 5,
          "service_id": 0
        }
      },
      "company": {
        "required": [
          "address",
          "city",
          "city_id",
          "coordinate_lat",
          "coordinate_lng",
          "country",
          "country_id",
          "id",
          "phone",
          "timezone",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "location ID"
          },
          "title": {
            "type": "string",
            "description": "Name of the organization"
          },
          "country": {
            "type": "string",
            "description": "The name of the country in which the organization is located"
          },
          "country_id": {
            "type": "number",
            "description": "Country ID"
          },
          "city": {
            "type": "string",
            "description": "Name of the city where the organization is located"
          },
          "city_id": {
            "type": "number",
            "description": "City ID"
          },
          "phone": {
            "type": "string",
            "description": "location phone"
          },
          "timezone": {
            "type": "string",
            "description": "location time zone"
          },
          "address": {
            "type": "string",
            "description": "location address"
          },
          "coordinate_lat": {
            "type": "number",
            "description": "Latitude"
          },
          "coordinate_lng": {
            "type": "number",
            "description": "Longitude"
          }
        }
      },
      "loyalty_entity_attendance_item": {
        "title": "Root Type for LoyaltyEntityAttendanceItem",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Related entity ID",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "Related entity name"
          },
          "is_service": {
            "type": "boolean",
            "description": "Flag: true - service/category of services, false - product/category of products"
          },
          "is_category": {
            "type": "boolean",
            "description": "Flag: true - service/product category, false - service/product"
          }
        },
        "description": "The entity to which the action applies (if applied selectively)",
        "example": {
          "id": 234,
          "title": "Product category",
          "is_service": false,
          "is_category": true
        }
      },
      "loyalty_program": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Stock ID",
            "format": "int32"
          },
          "title": {
            "type": "string",
            "description": "Share name"
          },
          "type": {
            "type": "string",
            "description": "Promotion type",
            "enum": [
              "discount_static",
              "discount_accumulative_visits",
              "discount_accumulative_sold",
              "discount_accumulative_paid",
              "cashback_static_sold",
              "cashback_static_paid",
              "cashback_accumulative_paid",
              "cashback_accumulative_sold",
              "cashback_accumulative_paid_visits",
              "cashback_accumulative_sold_visits",
              "cashback_sold_visits",
              "cashback_paid_visits",
              "package_discount"
            ]
          },
          "service_item_type": {
            "type": "string",
            "description": "Type of application to services",
            "enum": [
              "any_allowed",
              "not_allowed",
              "custom_allowed"
            ]
          },
          "good_item_type": {
            "type": "string",
            "description": "Type of application to products",
            "enum": [
              "any_allowed",
              "not_allowed",
              "custom_allowed"
            ]
          },
          "value_unit": {
            "type": "string",
            "description": "Bonus or discount measurement unit (percentage, fixed amount)",
            "enum": [
              "percent",
              "amount"
            ]
          },
          "usage_limit": {
            "type": "integer",
            "description": "Limit on the number of applications (only for cashback)",
            "format": "int32"
          },
          "visit_multiplicity": {
            "type": "integer",
            "description": "Multiplicity of application by visits (only for cashback)",
            "format": "int32"
          },
          "sold_items_multiplicity": {
            "type": "integer",
            "description": "How many services you need to pay to get a discount on promotional services (only for the type of promotion \"Discount by condition\")",
            "format": "int32"
          },
          "expiration_timeout": {
            "type": "integer",
            "description": "Expiration date of bonuses or discounts",
            "format": "int32"
          },
          "expiration_timeout_unit": {
            "type": "string",
            "description": "The unit of measurement for the expiration date of bonuses or discounts",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "expiration_notification_timeout": {
            "type": "integer",
            "description": "How many days before the bonus or discount expires, a notification must be sent to the client",
            "format": "int32"
          },
          "params_source_type": {
            "type": "string",
            "description": "Where to get the client's history to calculate the size of the bonus or discount (for accumulation promotions or conditional discounts)",
            "enum": [
              "loyalty_card",
              "active_companies",
              "chain"
            ]
          },
          "history_start_date": {
            "type": "string",
            "description": "From what date to take into account the client's history to calculate the size of the bonus or discount (for accumulative promotions or conditional discounts)",
            "format": "date"
          },
          "on_changed_notification_template_id": {
            "type": "integer",
            "description": "Notification template ID when changing bonus or discount",
            "format": "int32"
          },
          "on_expiration_notification_template_id": {
            "type": "integer",
            "description": "Identifier of the notification template when a bonus or discount burns",
            "format": "int32"
          },
          "loyalty_card_types": {
            "type": "array",
            "description": "Type of cards for which the promotion is valid (on request)",
            "items": {
              "$ref": "#/components/schemas/loyalty_card_type"
            }
          },
          "on_changed_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template"
          },
          "on_expiration_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template"
          },
          "rules": {
            "type": "array",
            "description": "Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions) (on request)",
            "items": {
              "$ref": "#/components/schemas/loyalty_program_rule"
            }
          },
          "companies": {
            "type": "array",
            "description": "Locations where the promotion is valid (on request)",
            "items": {
              "$ref": "#/components/schemas/company"
            }
          },
          "applicable_items": {
            "type": "array",
            "description": "Related entities for selective application of the promotion (on request)",
            "items": {
              "$ref": "#/components/schemas/loyalty_entity_attendance_item"
            }
          }
        },
        "description": "Loyalty promotion",
        "example": {
          "id": 34,
          "title": "Cumulative discount for some services and not for goods",
          "type": "discount_accumulative_paid",
          "service_item_type": "custom_allowed",
          "good_item_type": "not_allowed",
          "value_unit": "percent",
          "usage_limit": 0,
          "visit_multiplicity": 0,
          "sold_items_multiplicity": 0,
          "expiration_timeout": 6,
          "expiration_timeout_unit": "month",
          "expiration_notification_timeout": 7,
          "params_source_type": "chain",
          "history_start_date": "2026-09-21",
          "on_changed_notification_template_id": 55,
          "on_expiration_notification_template_id": 84,
          "loyalty_card_types": [
            {
              "id": 51,
              "title": "Card type 1"
            },
            {
              "id": 29,
              "title": "Card type 2"
            }
          ],
          "on_changed_notification_template": {
            "id": 55,
            "type": "custom",
            "body": "Your discount has changed",
            "message_type": "loyalty_discount_changed"
          },
          "on_expiration_notification_template": {
            "id": 84,
            "type": "big",
            "body": "Detailed text about discount burning",
            "message_type": "loyalty_discount_expiration"
          },
          "rules": [
            {
              "id": 94,
              "parameter": 10,
              "value": 2.5,
              "loyalty_program_id": 34,
              "loyalty_type_id": 3,
              "service_id": 0
            },
            {
              "id": 74,
              "parameter": 30,
              "value": 7.5,
              "loyalty_program_id": 34,
              "loyalty_type_id": 3,
              "service_id": 0
            }
          ],
          "companies": [
            {
              "id": 49,
              "title": "Location",
              "country": "United States",
              "country_id": 5,
              "city": "New York",
              "city_id": 83,
              "phone": "+13155550175",
              "timezone": "America/New_York",
              "address": "Location address",
              "coordinate_lat": 40.73061,
              "coordinate_lng": 18.63
            }
          ],
          "applicable_items": [
            {
              "id": 53,
              "title": "Service category 1",
              "is_service": true,
              "is_category": true
            },
            {
              "id": 92,
              "title": "Service category 2",
              "is_service": true,
              "is_category": true
            }
          ]
        }
      },
      "loyalty_program_update_request": {
        "title": "Root Type for LoyaltyProgramUpdateRequest",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Share name"
          },
          "usage_limit": {
            "type": "integer",
            "description": "Limit on the number of applications (only for cashback)",
            "format": "int32"
          },
          "expiration_timeout": {
            "type": "integer",
            "description": "Expiration date of bonuses or discounts",
            "format": "int32"
          },
          "expiration_timeout_unit": {
            "type": "string",
            "description": "The unit of measurement for the expiration date of bonuses or discounts",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ]
          },
          "expiration_notification_timeout": {
            "type": "integer",
            "description": "How many days before the bonus or discount expires, a notification must be sent to the client",
            "format": "int32"
          },
          "loyalty_card_type_ids": {
            "type": "array",
            "description": "Identifiers of types of cards for which the promotion is valid",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "on_changed_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template_request"
          },
          "on_expiration_notification_template": {
            "$ref": "#/components/schemas/loyalty_notification_message_template_request"
          },
          "rules": {
            "type": "array",
            "description": "Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions)",
            "items": {
              "$ref": "#/components/schemas/loyalty_program_rule_request"
            }
          },
          "company_ids": {
            "type": "array",
            "description": "Identifiers of locations where the promotion is valid",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_service_ids": {
            "type": "array",
            "description": "Service and service category identifiers (if application type is set for some services)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_good_ids": {
            "type": "array",
            "description": "Item IDs (if application type is set for some items)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "allowed_good_category_ids": {
            "type": "array",
            "description": "Product category identifiers (if application type is set for some products)",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        },
        "description": "The body of the request to change the loyalty promotion",
        "example": {
          "title": "Cumulative discount for some services and not for goods",
          "allowed_service_ids": [
            53,
            92
          ],
          "allowed_good_ids": [],
          "allowed_good_category_ids": [],
          "usage_limit": 0,
          "expiration_timeout": 6,
          "expiration_timeout_unit": "month",
          "expiration_notification_timeout": 7,
          "loyalty_card_type_ids": [
            51,
            29
          ],
          "on_changed_notification_template": {
            "type": "custom",
            "body": "Your discount has changed"
          },
          "on_expiration_notification_template": {
            "type": "big"
          },
          "rules": [
            {
              "parameter": 10,
              "value": 2.5,
              "service_id": 0
            },
            {
              "parameter": 30,
              "value": 7.5,
              "service_id": 0
            }
          ],
          "company_ids": [
            49
          ]
        }
      },
      "loyalty_transaction": {
        "title": "Root Type for LoyaltyTransaction",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Transaction ID"
                },
                "visit_id": {
                  "type": "number",
                  "description": "Visit ID"
                },
                "status_id": {
                  "type": "number",
                  "description": "Transaction status ID"
                },
                "amount": {
                  "type": "number",
                  "description": "Loyalty payment amount",
                  "format": "double"
                },
                "type_id": {
                  "type": "number",
                  "description": "Type of loyalty transaction"
                },
                "card_id": {
                  "type": "number",
                  "description": "Loyalty card ID"
                },
                "program_id": {
                  "type": "number",
                  "description": "Loyalty program ID"
                },
                "certificate_id": {
                  "type": "number",
                  "description": "Loyalty certificate ID"
                },
                "abonement_id": {
                  "type": "number",
                  "description": "Loyalty membership ID"
                },
                "salon_group_id": {
                  "type": "number",
                  "description": "ID of the location chain, within the loyalty of which this transaction was created"
                },
                "item_id": {
                  "type": "number",
                  "description": "Position ID in the order, if the transaction is related to the sale of a product or service"
                },
                "item_type_id": {
                  "type": "number",
                  "description": "Item type in the order to which this transaction relates (1 Provision of service, 7 Sale of products), if applicable"
                },
                "item_record_id": {
                  "type": "number",
                  "description": "ID of the appointment to which the item in the order belongs, if applicable"
                },
                "goods_transaction_id": {
                  "type": "number",
                  "description": "Item sale transaction ID"
                },
                "services_transaction_id": {
                  "type": "number",
                  "description": "Service Transaction ID"
                },
                "is_discount": {
                  "type": "boolean"
                },
                "is_loyalty_withdraw": {
                  "type": "boolean"
                },
                "type": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of items in the response)"
          }
        },
        "description": "Loyalty transaction"
      },
      "tax_system_response_data__types": {
        "title": "Root Type for tax_system_response_data_Types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "Name of the taxation system"
                },
                "slug": {
                  "type": "string",
                  "description": "Code name for the taxation system"
                },
                "vats": {
                  "type": "array",
                  "description": "List of available VAT for the taxation system",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "Name of VAT"
                      },
                      "slug": {
                        "type": "string",
                        "description": "VAT code name"
                      }
                    }
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of taxation systems found)"
          }
        },
        "description": "List request example",
        "example": {
          "success": true,
          "data": [
            {
              "title": "General DOS",
              "slug": "ru_osn",
              "vats": [
                {
                  "title": "0%",
                  "slug": "ru_vat_0"
                },
                {
                  "title": "10%",
                  "slug": "ru_vat_10"
                },
                {
                  "title": "20%",
                  "slug": "ru_vat_20"
                },
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            },
            {
              "title": "Simplified simplified tax system (Income)",
              "slug": "ru_usn",
              "vats": [
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            },
            {
              "title": "Simplified simplified tax system (Income minus Expense)",
              "slug": "ru_usnr",
              "vats": [
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            },
            {
              "title": "Single tax on imputed income UTII",
              "slug": "ru_envd",
              "vats": [
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            },
            {
              "title": "Unified agricultural tax UST",
              "slug": "ru_esn",
              "vats": [
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            },
            {
              "title": "Patent taxation system",
              "slug": "ru_psn",
              "vats": [
                {
                  "title": "is not a subject to a tax",
                  "slug": "ru_vat_none"
                }
              ]
            }
          ],
          "meta": {
            "count": 6
          }
        }
      },
      "fiscalization_request_data_types": {
        "title": "Root Type for fiscalization_request_data_types",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID of the sales document"
          },
          "date": {
            "type": "string",
            "description": "Date and time the document was sent for printing (in ISO-8601 format)",
            "format": "date-time"
          },
          "document_id": {
            "type": "integer",
            "description": "Internal document identifier in the Altegio system",
            "format": "int32"
          },
          "type": {
            "type": "string",
            "description": "Document type (list of possible values)",
            "enum": [
              "sale",
              "return"
            ]
          },
          "print_receipt": {
            "type": "boolean",
            "description": "Whether to print a paper check at the checkout during fiscalization"
          },
          "customer": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "description": "Client Email"
              },
              "phone": {
                "type": "string",
                "description": "Customer phone"
              }
            },
            "description": "Client entity"
          },
          "positions": {
            "type": "array",
            "description": "List of positions in the check",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Position type (\"service\" - service / \"commodity\" - product / \"payment\" - payment)"
                },
                "title": {
                  "type": "string",
                  "description": "Position name"
                },
                "price": {
                  "type": "number",
                  "description": "Position price with an accuracy of 2 decimal places",
                  "format": "double"
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity",
                  "format": "int32"
                },
                "discount_amount": {
                  "type": "number",
                  "description": "Discount applied to a position with an accuracy of 2 decimal places",
                  "format": "double"
                },
                "vat": {
                  "type": "string",
                  "description": "Type of VAT (slug from VAT list)"
                },
                "payment_method": {
                  "type": "string",
                  "description": "Settlement sign (\"payment\" - payment / \"prepayment\" - prepayment)"
                },
                "barcode": {
                  "type": "string",
                  "description": "Product barcode"
                }
              }
            }
          },
          "payments": {
            "type": "array",
            "description": "List of fees applied per check",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Type of payment (\"card\" - non-cash payment / \"cash\" - cash payment / \"prepaid\" - advance payment)"
                },
                "sum": {
                  "type": "number",
                  "description": "Payment amount with an accuracy of 2 decimal places",
                  "format": "double"
                }
              }
            }
          },
          "tax": {
            "type": "string",
            "description": "Type of taxation system (slug from the list of taxation systems)"
          },
          "cashier": {
            "type": "object",
            "properties": {
              "uid": {
                "type": "string",
                "description": "Cashier ID"
              },
              "name": {
                "type": "string",
                "description": "Cashier's name"
              },
              "position": {
                "type": "string",
                "description": "Cashier position (maximum line length - 64 characters)"
              }
            },
            "description": "The Essence of a Cashier"
          },
          "pos": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Is it necessary to accept a card through a POS-terminal before fiscalization?"
              },
              "slip_count": {
                "type": "integer",
                "description": "Number of receipts to be printed after a successful POS transaction",
                "format": "int32"
              }
            },
            "description": "Options for the connected POS terminal"
          },
          "callback_url": {
            "type": "string",
            "description": "Link to update fiscal status"
          },
          "custom_text": {
            "type": "string",
            "description": "Arbitrary text for printing on a receipt"
          }
        },
        "description": "Example of a request for fiscalization of a document",
        "example": {
          "id": "d72fece5-6825-4895-9395-0133195612a4",
          "date": "2026-09-21T23:00:00.000-05:00",
          "document_id": 239083104,
          "type": "sale",
          "print_receipt": true,
          "customer": {
            "email": "customer@example.com",
            "phone": "+13155550175"
          },
          "positions": [
            {
              "type": "service",
              "title": "Consultation",
              "price": 13.19,
              "quantity": 1,
              "discount_amount": 2.54,
              "vat": "ru_vat_10",
              "payment_method": "payment",
              "barcode": "12345"
            }
          ],
          "payments": [
            {
              "type": "card",
              "sum": 5.55
            },
            {
              "type": "cash",
              "sum": 4.55
            },
            {
              "type": "prepaid",
              "sum": 0.55
            }
          ],
          "tax": "ru_osn",
          "cashier": {
            "uid": "4895-9395-0133195612a4",
            "name": "John Smith",
            "position": "Cashier"
          },
          "pos": {
            "enabled": true,
            "slip_count": 2
          },
          "callback_url": "https://app.alteg.io/api/v1/integration/kkm/callback/",
          "custom_text": "some custom text"
        }
      },
      "license_option": {
        "required": [
          "id",
          "title"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "option id"
          },
          "title": {
            "type": "string",
            "description": "Option name"
          }
        }
      },
      "image": {
        "required": [
          "height",
          "id",
          "image_group_id",
          "path",
          "type",
          "version",
          "width"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "image id"
          },
          "path": {
            "type": "string",
            "description": "Image Path"
          },
          "width": {
            "type": "number",
            "description": "Image Width"
          },
          "height": {
            "type": "number",
            "description": "Image Height"
          },
          "type": {
            "type": "string",
            "description": "Image type"
          },
          "image_group_id": {
            "type": "number",
            "description": "Image group id"
          },
          "version": {
            "type": "string",
            "description": "Image version"
          }
        }
      },
      "image_group": {
        "required": [
          "id",
          "image_binded",
          "image_group",
          "images"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "image group id"
          },
          "entity": {
            "type": "string",
            "description": "The name of the entity to which the group is bound"
          },
          "entity_id": {
            "type": "number",
            "description": "Entity ID"
          },
          "images": {
            "$ref": "#/components/schemas/image"
          },
          "image_binded": {
            "type": "boolean",
            "description": "The status of linking images to an entity"
          },
          "image_group": {
            "type": "object",
            "description": "Image group object"
          }
        }
      },
      "tips_setting_response_data_types": {
        "title": "Root Type for tips_setting_response_data_types",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Execution success status (true)"
          },
          "data": {
            "type": "array",
            "description": "Array of objects with data",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Setting ID"
                },
                "location_id": {
                  "type": "integer",
                  "format": "int32"
                },
                "staff_id": {
                  "type": "number",
                  "description": "team member ID"
                },
                "hash": {
                  "type": "string",
                  "description": "Hash token"
                },
                "status": {
                  "type": "number",
                  "description": "Setting status"
                },
                "status_title": {
                  "type": "string",
                  "description": "Status name"
                },
                "is_enabled": {
                  "type": "boolean",
                  "description": "Is tip setting enabled"
                },
                "landing_external": {
                  "type": "string"
                },
                "master_tips_form_link": {
                  "type": "string",
                  "description": "Link to the page where you can leave a tip to the team member"
                },
                "invite_sms_sent": {
                  "type": "boolean"
                },
                "staff": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number",
                      "description": "team member ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Team Member name"
                    },
                    "specialization": {
                      "type": "string",
                      "description": "Specialization"
                    },
                    "avatar": {
                      "type": "string",
                      "description": "Path to team member profile picture"
                    },
                    "employee": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "team member ID"
                        },
                        "phone": {
                          "type": "string",
                          "description": "Telephone"
                        }
                      },
                      "description": "team member"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "User ID"
                        },
                        "name": {
                          "type": "string",
                          "description": "Username"
                        },
                        "email": {
                          "type": "string",
                          "description": "User email address"
                        },
                        "phone": {
                          "type": "string",
                          "description": "User phone"
                        }
                      },
                      "description": "User"
                    },
                    "position": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "number",
                          "description": "Job ID"
                        },
                        "title": {
                          "type": "string",
                          "description": "Job title"
                        }
                      },
                      "description": "Position"
                    }
                  },
                  "description": "Team Member"
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "format": "int32"
              }
            },
            "description": "Metadata (contains the number of found team members)"
          }
        },
        "description": "Get a list of location team members with their tips",
        "example": {
          "success": true,
          "data": [
            {
              "id": 1,
              "location_id": 253859,
              "staff_id": 742418,
              "hash": "ba816199-eecf-4bd2-9f1d-db470545bfaf",
              "status": 3,
              "status_title": "pending account",
              "is_enabled": true,
              "landing_external": "https://app.alteg.io/tips/external/253859/ba816199-eecf-4bd2-9f1d-db470545bfaf/",
              "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/742418/tips/pay/",
              "invite_sms_sent": false,
              "staff": {
                "id": 742418,
                "name": "Fusa",
                "specialization": "cosmetologist",
                "avatar": "https://assets.alteg.io/masters/sm/c/c7/c77a4bf2b6b3896_20210304004333.png",
                "employee": {
                  "id": 733043,
                  "phone": "+13155550175"
                },
                "user": {
                  "id": 1553930,
                  "name": "James Smith",
                  "email": "j.smith@example.com",
                  "phone": "+13155550175"
                },
                "position": {
                  "id": 103883,
                  "title": "Yogist"
                }
              }
            },
            {
              "id": 152763,
              "location_id": 253859,
              "staff_id": 743018,
              "hash": "b7c81cab-290a-4b0a-ad05-9c4b98ef3565",
              "status": 4,
              "status_title": "everything is set",
              "is_enabled": true,
              "landing_external": "https://app.alteg.io/tips/external/253859/b7c81cab-290a-4b0a-ad05-9c4b98ef3565/",
              "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/743018/tips/pay/",
              "invite_sms_sent": false,
              "staff": {
                "id": 743018,
                "name": "Natasha M",
                "specialization": "manicurist",
                "avatar": "https://api.alteg.io/images/no-master-sm.png",
                "employee": {
                  "id": 733547,
                  "phone": "+13155550175"
                },
                "user": {
                  "id": 6259059,
                  "name": "Alice Smith",
                  "email": "a.smith@example.com",
                  "phone": "+13155550175"
                },
                "position": {
                  "id": 103731,
                  "title": "Manicurist"
                }
              }
            }
          ],
          "meta": {
            "count": 2
          }
        }
      }
    },
    "parameters": {
      "accept_header": {
        "name": "Accept",
        "in": "header",
        "description": "Required B2B v2 response media type. Use `application/vnd.api.v2+json`. A charset parameter is also accepted.\n",
        "required": true,
        "schema": {
          "type": "string",
          "default": "application/vnd.api.v2+json"
        },
        "example": "application/vnd.api.v2+json"
      },
      "content_type_header": {
        "name": "Content-Type",
        "in": "header",
        "description": "Should be equal to `application/json`\n",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "application/json"
      },
      "company_id": {
        "name": "location_id",
        "in": "path",
        "description": "ID of a location.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "service_id": {
        "name": "service_id",
        "in": "path",
        "description": "ID of service.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "master_id": {
        "name": "team_member_id",
        "in": "path",
        "description": "ID of team member.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "client_id": {
        "name": "client_id",
        "in": "path",
        "description": "ID of a location client.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "comment_id": {
        "name": "comment_id",
        "in": "path",
        "description": "ID of a comment for client.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "include_for_roles": {
        "name": "include",
        "in": "query",
        "description": "Requested set of an included models.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "user_permissions"
            ]
          }
        }
      },
      "user_id": {
        "name": "user_id",
        "in": "path",
        "description": "ID of a user.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "from": {
        "name": "from",
        "in": "query",
        "description": "Search start date (YYYY-MM-DD format).",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "2026-06-01"
      },
      "till": {
        "name": "till",
        "in": "query",
        "description": "Search end date (YYYY-MM-DD format).",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "2026-07-15"
      },
      "service_ids": {
        "name": "service_ids",
        "in": "query",
        "description": "Filter by services IDs.",
        "schema": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "example": [
          123
        ]
      },
      "staff_ids": {
        "name": "staff_ids",
        "in": "query",
        "description": "Filter by team member IDs.",
        "schema": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "example": [
          456
        ]
      },
      "resource_ids": {
        "name": "resource_ids",
        "in": "query",
        "description": "Filter by resources IDs.",
        "schema": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "example": [
          789
        ]
      },
      "page": {
        "name": "page",
        "in": "query",
        "description": "Page number (default 1).",
        "schema": {
          "type": "number"
        },
        "example": 1
      },
      "count": {
        "name": "count",
        "in": "query",
        "description": "Page size (default 25).",
        "schema": {
          "type": "number"
        },
        "example": 25
      },
      "entity_type": {
        "name": "entity_type",
        "in": "path",
        "description": "Type of an entity schedule is searched by:  \n`record` - individual appointment, currently not supported;  \n`activity` - group event.\n",
        "required": true,
        "schema": {
          "type": "string",
          "enum": [
            "record",
            "activity"
          ]
        },
        "example": "activity"
      },
      "entity_id": {
        "name": "entity_id",
        "in": "path",
        "description": "ID of an entity schedule is searched by.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "include_for_schedule_extended": {
        "name": "include",
        "in": "query",
        "description": "Requested set of an included models.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "days",
              "days.events_master",
              "days.events_labels",
              "days.events_resource_instances"
            ]
          }
        }
      },
      "include_for_schedule": {
        "name": "include",
        "in": "query",
        "description": "Requested set of an included models.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "days"
            ]
          }
        }
      },
      "schedule_id": {
        "name": "schedule_id",
        "in": "path",
        "description": "ID of a schedule.",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "example": 123
      },
      "client_schedule_id": {
        "name": "client_schedule_id",
        "in": "path",
        "description": "ID of a client schedule.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "include_for_day": {
        "name": "include",
        "in": "query",
        "description": "Requested set of an included models.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "events_master",
              "events_labels",
              "events_resource_instances",
              "events"
            ]
          }
        }
      },
      "day_id": {
        "name": "day_id",
        "in": "path",
        "description": "ID of a schedule series.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "chain_id": {
        "name": "chain_id",
        "in": "path",
        "description": "ID of a chain.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 123
      },
      "staff_id": {
        "name": "team_member_id",
        "in": "path",
        "description": "ID of a team member.",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "example": 123
      },
      "date_from": {
        "name": "date_from",
        "in": "query",
        "description": "Start from date.",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "2026-03-01"
      },
      "date_to": {
        "name": "date_to",
        "in": "query",
        "description": "End to date.",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "2026-03-31"
      },
      "calculation_id": {
        "name": "calculation_id",
        "in": "path",
        "description": "ID of a salary calculation.",
        "required": true,
        "schema": {
          "type": "number"
        },
        "example": 789
      }
    },
    "responses": {
      "401_unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/401_unauthorized_response"
            }
          }
        }
      },
      "403_forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/403_forbidden_response"
            }
          }
        }
      },
      "404_not_found": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/404_not_found_response"
            }
          }
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "POS & Scheduling",
      "tags": [
        "Authentication B2B",
        "Locations",
        "Services",
        "Team Members",
        "Clients",
        "Users & Permissions",
        "Appointments",
        "Events",
        "Schedule & Resources",
        "Products",
        "Inventory",
        "Sales",
        "Payments",
        "Notifications",
        "Online Booking Settings"
      ]
    },
    {
      "name": "Administrative",
      "tags": [
        "Analytics & Reports",
        "Tags",
        "Deposits",
        "Loyalty Cards",
        "Subscriptions & Certificates",
        "Loyalty Programs",
        "Salary",
        "Notification Settings",
        "Custom Fields",
        "Chain Management",
        "Chain Loyalty Programs",
        "Fiscalization",
        "Utilities"
      ]
    }
  ],
  "tags": [
    {
      "name": "Authentication B2B",
      "description": "User authentication and session management for B2B integrations"
    },
    {
      "name": "Locations",
      "description": "Manage business locations (salons, clinics, etc.)"
    },
    {
      "name": "Services",
      "description": "Service catalog management including categories and team member assignments"
    },
    {
      "name": "Team Members",
      "description": "Staff management including positions and scheduling"
    },
    {
      "name": "Clients",
      "description": "Client database management with comments, files, and visit history"
    },
    {
      "name": "Users & Permissions",
      "description": "User account management and role-based access control"
    },
    {
      "name": "Appointments",
      "description": "Booking records and visit management"
    },
    {
      "name": "Events",
      "description": "Group events and class management"
    },
    {
      "name": "Schedule & Resources",
      "description": "Timetables, schedules, and resource allocation"
    },
    {
      "name": "Products",
      "description": "Product catalog and categories"
    },
    {
      "name": "Inventory",
      "description": "Stock management, storage operations, and tech cards"
    },
    {
      "name": "Sales",
      "description": "Sales transactions and document management"
    },
    {
      "name": "Payments",
      "description": "Payment processing, accounts, and KKM transactions"
    },
    {
      "name": "Notifications",
      "description": "SMS and email notifications to clients"
    },
    {
      "name": "Online Booking Settings",
      "description": "Configure online booking behavior and forms"
    },
    {
      "name": "Analytics & Reports",
      "description": "Business analytics, charts, and Z-reports"
    },
    {
      "name": "Tags",
      "description": "Label management for categorizing entities (deprecated, use v2)"
    },
    {
      "name": "Deposits",
      "description": "Client deposit accounts and operations"
    },
    {
      "name": "Loyalty Cards",
      "description": "Loyalty card types, issuance, and manual transactions"
    },
    {
      "name": "Subscriptions & Certificates",
      "description": "Membership subscriptions and gift certificates"
    },
    {
      "name": "Loyalty Programs",
      "description": "Discount programs, referral programs, and loyalty transactions"
    },
    {
      "name": "Salary",
      "description": "Staff salary calculations, payroll, and schemes"
    },
    {
      "name": "Notification Settings",
      "description": "Configure notification types and user preferences"
    },
    {
      "name": "Custom Fields",
      "description": "Custom field definitions for various entities"
    },
    {
      "name": "Chain Management",
      "description": "Multi-location chain operations and clients"
    },
    {
      "name": "Chain Loyalty Programs",
      "description": "Chain-level loyalty programs and transactions"
    },
    {
      "name": "Fiscalization",
      "description": "Tax system integration and KKM callbacks"
    },
    {
      "name": "Utilities",
      "description": "License info, phone validation, images, and tips"
    }
  ],
  "paths": {
    "/auth": {
      "post": {
        "tags": [
          "Authentication B2B"
        ],
        "security": [],
        "summary": "Authorize User",
        "description": "When a user changes their password, their API key is regenerated. As a result, reauthorization is required using the new API key.\r\n\r\n| Attribute | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| login | string | The user's phone number in the format +13155550175, or their email address.|\r\n| password | string | User password |",
        "operationId": "authorize_user",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/auth_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/auth_response"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 123456,
                    "user_token": "wec23fh8cDfFV4432fc352456",
                    "name": "James Smith",
                    "phone": "+13155550175",
                    "login": "j.smith",
                    "email": "j.smith@example.com",
                    "avatar": "https://assets.alteg.io/general/0/01/123456789098765_12345678909876.png",
                    "is_approved": true,
                    "is_email_confirmed": false
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/companies": {
      "get": {
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get a list of locations",
        "description": "Get a list of locations with data",
        "operationId": "get_location_list",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Filter by location ID",
            "schema": {
              "type": "number"
            },
            "example": 4564
          },
          {
            "name": "group_id",
            "in": "query",
            "description": "Filter by location chain ID _Default: 83_",
            "schema": {
              "type": "number"
            },
            "example": 83
          },
          {
            "name": "my",
            "in": "query",
            "description": "For authorized user only. If you need locations that the user has rights to manage",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "active",
            "in": "query",
            "description": "If you need to get only locations with an active license and an available appointment",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "forBooking",
            "in": "query",
            "description": "Include date and time of the next free session in the location (ISO8601)",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "show_groups",
            "in": "query",
            "description": "Include in the location object a list of chains that this location belongs to",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "city_id",
            "in": "query",
            "description": "Filter by city ID ([cities getting method](#cities))",
            "schema": {
              "type": "number"
            },
            "example": 2
          },
          {
            "name": "showBookforms",
            "in": "query",
            "description": "Include in the location object a list of location online booking forms",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "min_id",
            "in": "query",
            "description": "Filter by minimum location ID",
            "schema": {
              "type": "number"
            },
            "example": 1000
          },
          {
            "name": "show_deleted",
            "in": "query",
            "description": "Include deleted locations",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "hide_record_type_single",
            "in": "query",
            "description": "Hide locations with individual appointment",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "hide_record_type_activity",
            "in": "query",
            "description": "Hide locations with group appointment",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "hide_record_type_mixed",
            "in": "query",
            "description": "Hide locations with mixed appointment",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "business_group_id",
            "in": "query",
            "description": "Filter by business group ID",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "business_type_id",
            "in": "query",
            "description": "Filter by business type ID",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional data in the location object",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "staff",
                  "positions",
                  "accounts",
                  "storages",
                  "expenses"
                ]
              }
            },
            "example": [
              "staff",
              "positions"
            ]
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of locations per page",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "Must be `application/vnd.api.v2+json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be `application/json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/companies_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a location",
        "description": "Create new location",
        "operationId": "create_location",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "Must be `application/vnd.api.v2+json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be `application/json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/company_create_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_create_response_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}": {
      "get": {
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get location",
        "description": "Getting information about the location.",
        "operationId": "get_location",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "Must be `application/vnd.api.v2+json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be `application/json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "The ID of the location to get information about.",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 37532
          },
          {
            "name": "my",
            "in": "query",
            "description": "For authorized user only. If you need additional data for the location that the user has rights to manage",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "forBooking",
            "in": "query",
            "description": "Date and time of the next free session in the location (ISO8601).",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "show_groups",
            "in": "query",
            "description": "Include in the location object a list of chains that this location belongs to",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "showBookforms",
            "in": "query",
            "description": "Show location online booking forms (widgets)",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "bookform_id",
            "in": "query",
            "description": "Show url of online booking form with specified ID",
            "schema": {
              "type": "number"
            },
            "example": 19203
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_get_response_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response_legacy"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response_legacy"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change location",
        "description": "Change location data",
        "operationId": "update_location",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 37532
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "Must be `application/vnd.api.v2+json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be `application/json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/company_put_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_put_response_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response_legacy"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response_legacy"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete location",
        "description": "Delete a location.",
        "operationId": "delete_location",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 37532
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "Must be `application/vnd.api.v2+json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be `application/json`",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response_legacy"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response_legacy"
                }
              }
            }
          }
        }
      }
    },
    "/service_categories/{location_id}": {
      "post": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a service category",
        "operationId": "create_service_category",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_categories_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/service_categories_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "title": "Haircut very feminine",
                    "api_id": "adw322",
                    "weight": 111,
                    "staff": [
                      5006,
                      8901
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/services/{location_id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of services",
        "description": "Returns a list of all services for the specified location",
        "operationId": "get_service_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "Team member ID, if you want to filter by team member",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Category ID, if you want to filter by category",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/services_list_response"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 10279685,
                      "salon_service_id": 11486182,
                      "title": "Service name",
                      "booking_title": "Service name",
                      "category_id": 10279684,
                      "price_min": 0,
                      "price_max": 0,
                      "duration": 3600,
                      "discount": 0,
                      "comment": "",
                      "weight": 1,
                      "active": 1
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a service",
        "description": "Method to create a service",
        "operationId": "create_service",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorizarion",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/services_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/services_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 83169,
                    "title": "Men's haircut",
                    "category_id": 83167,
                    "price_min": 1300,
                    "price_max": 1300,
                    "duration": 3600,
                    "discount": 0,
                    "comment": "",
                    "weight": 6,
                    "active": 1,
                    "api_id": "00000000042",
                    "staff": [
                      {
                        "id": 5905,
                        "seance_length": 2700
                      },
                      {
                        "id": 5907,
                        "seance_length": 3600
                      },
                      {
                        "id": 8973,
                        "seance_length": 3600
                      },
                      {
                        "id": 13616,
                        "seance_length": 3600
                      },
                      {
                        "id": 16681,
                        "seance_length": 3600
                      },
                      {
                        "id": 1796,
                        "seance_length": 3600
                      },
                      {
                        "id": 34006,
                        "seance_length": 3600
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/service_categories/{location_id}/{id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get a list of service categories",
        "description": "Get a list of service categories",
        "operationId": "deprecated_get_service_category_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Service category identifier",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 345,
                      "title": "Haircuts for men",
                      "api_id": "adw322",
                      "weight": 10,
                      "staff": [
                        5006,
                        8901,
                        26514,
                        26516,
                        26519,
                        26520
                      ]
                    },
                    {
                      "id": 3456,
                      "title": "Haircuts for women",
                      "api_id": "adw323",
                      "weight": 9,
                      "staff": [
                        5006,
                        8901
                      ]
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/services/{location_id}/{service_id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get a list of services / specific service",
        "operationId": "deprecated_get_service_list_by_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID, if you need to work with a specific service.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "team member ID, if you want to filter by team member",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Category ID, if you want to filter by category",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_services_serviceid_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 79067,
                      "title": "shaving head",
                      "category_id": 4,
                      "price_min": 1000,
                      "price_max": 1000,
                      "duration": 3600,
                      "discount": 0,
                      "comment": "",
                      "weight": 2,
                      "active": 1,
                      "api_id": "",
                      "staff": []
                    },
                    {
                      "id": 83169,
                      "title": "Men's haircut",
                      "category_id": 83167,
                      "price_min": 1300,
                      "price_max": 1300,
                      "duration": 3600,
                      "discount": 0,
                      "comment": "",
                      "weight": 6,
                      "active": 1,
                      "api_id": "00000000042",
                      "staff": [
                        {
                          "id": 5905,
                          "seance_length": 2700
                        },
                        {
                          "id": 5907,
                          "seance_length": 3600
                        },
                        {
                          "id": 8973,
                          "seance_length": 3600
                        },
                        {
                          "id": 13616,
                          "seance_length": 3600
                        },
                        {
                          "id": 16681,
                          "seance_length": 3600
                        },
                        {
                          "id": 17969,
                          "seance_length": 3600
                        },
                        {
                          "id": 34006,
                          "seance_length": 3600
                        }
                      ],
                      "image_group": {
                        "id": 72234,
                        "entity": "settings_service",
                        "entity_id": 389927,
                        "images": {
                          "basic": {
                            "id": 186791,
                            "path": "https://app.alteg.io/path/to/image/tagret-image.jpeg",
                            "width": "372",
                            "height": "280",
                            "type": "jpeg",
                            "image_group_id": 72234,
                            "version": "basic"
                          }
                        }
                      }
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update a service",
        "description": "Method to update a service by ID",
        "operationId": "deprecated_update_service_by_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/services_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/services_companyid_response_data_types"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/services_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 83169,
                    "title": "Men's haircut",
                    "category_id": 83167,
                    "price_min": 1300,
                    "price_max": 1300,
                    "duration": 3600,
                    "discount": 0,
                    "comment": "",
                    "weight": 6,
                    "active": 1,
                    "api_id": "00000000042",
                    "staff": [
                      {
                        "id": 5905,
                        "seance_length": 2700
                      },
                      {
                        "id": 5907,
                        "seance_length": 3600
                      },
                      {
                        "id": 8973,
                        "seance_length": 3600
                      },
                      {
                        "id": 13616,
                        "seance_length": 3600
                      },
                      {
                        "id": 16681,
                        "seance_length": 3600
                      },
                      {
                        "id": 1796,
                        "seance_length": 3600
                      },
                      {
                        "id": 34006,
                        "seance_length": 3600
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "patch": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update a service (partial)",
        "description": "Method to partially update a service",
        "operationId": "patch_service",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/services_change_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/services_change_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "booking_title": "Men's haircut",
                    "tax_variant": 0,
                    "vat_id": 2,
                    "print_title": "Men's haircut",
                    "service_type": 1,
                    "api_service_id": 0,
                    "repeat_visit_days_step": "null",
                    "seance_search_start": 1800,
                    "seance_search_finish": 84600,
                    "seance_search_step": 900,
                    "step": 300,
                    "is_need_limit_date": true,
                    "date_from": "2022-09-19",
                    "date_to": "2022-09-30",
                    "schedule_template_type": 2,
                    "online_invoicing_status": 0,
                    "is_abonement_autopayment_enabled": 0,
                    "autopayment_before_visit_time": 0,
                    "abonement_restriction_value": 0,
                    "is_chain": false,
                    "is_price_managed_only_in_chain": false,
                    "is_comment_managed_only_in_chain": false,
                    "price_prepaid_amount": 0,
                    "price_prepaid_percent": 100,
                    "id": 10832934,
                    "salon_service_id": 12192004,
                    "title": "Men's haircut",
                    "category_id": 10832928,
                    "price_min": 250,
                    "price_max": 1200,
                    "discount": 0,
                    "comment": "",
                    "weight": 0,
                    "active": 1,
                    "api_id": 0,
                    "prepaid": "forbidden",
                    "is_multi": false,
                    "capacity": 0,
                    "image_group": [],
                    "staff": [
                      {
                        "id": 5905,
                        "seance_length": 2700,
                        "technological_card_id": 0
                      },
                      {
                        "id": 5907,
                        "seance_length": 3600,
                        "technological_card_id": 0
                      }
                    ],
                    "dates": [
                      "2022-09-19",
                      "2022-09-20",
                      "2022-09-21",
                      "2022-09-22",
                      "2022-09-23",
                      "2022-09-24",
                      "2022-09-25",
                      "2022-09-26",
                      "2022-09-27",
                      "2022-09-28",
                      "2022-09-29",
                      "2022-09-30"
                    ],
                    "duration": 3600,
                    "resources": [],
                    "is_online": true
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete a service",
        "description": "Method to remove a service",
        "operationId": "delete_service",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/service_category/{location_id}/{id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get service category",
        "operationId": "get_service_category",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Service Category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "salon_service_id": 15,
                    "title": "Haircuts for women",
                    "weight": 12,
                    "staff": [
                      5006,
                      8901
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change service category",
        "operationId": "update_service_category",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Service Category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/service_categories_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "salon_service_id": 15,
                    "title": "Haircuts for women",
                    "weight": 15,
                    "staff": [
                      5006,
                      8901
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete service category",
        "operationId": "delete_service_category",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Service Category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Conetnt-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/service_categories/{id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of service categories",
        "description": "+ Options\r\n    + company_id (required, number) - location ID\r\n    + id (optional, number) - service category ID (to work with a specific category)\r\n    + staff_id (optional, number) - team member ID (to get categories associated with a team member)",
        "operationId": "get_service_category_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Service Category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "team member ID (to get categories associated with a team member)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 345,
                      "salon_service_id": 353,
                      "title": "Haircuts for men",
                      "api_id": "adw322",
                      "weight": 10,
                      "staff": [
                        5006,
                        8901,
                        26514,
                        26516,
                        26519,
                        26520
                      ]
                    },
                    {
                      "id": 3456,
                      "salon_service_id": 3252,
                      "title": "Haircuts for women",
                      "api_id": "adw323",
                      "weight": 9,
                      "staff": [
                        5006,
                        8901
                      ]
                    }
                  ],
                  "meta": {
                    "total_count": 2
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response403_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "It is necessary to renew the license in the branch with id: {location_id}"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response404_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "Location not specified."
                      },
                      {
                        "message": "Location not found."
                      },
                      {
                        "message": "Service category does not exist."
                      },
                      {
                        "message": "Team Member not found."
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/services/{service_id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of services / specific service",
        "description": "+ Parameter\r\n    + company_id (required, number, `1`) - location ID\r\n    + service_id (optional, number, `1`) - service ID",
        "operationId": "get_service",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID, if you need to work with a specific service.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "team member ID, if you want to filter by team member",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Category ID, if you want to filter by category",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_services_serviceid_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 79067,
                      "title": "shaving head",
                      "category_id": 4,
                      "price_min": 1000,
                      "price_max": 1000,
                      "discount": 0,
                      "comment": "",
                      "weight": 2,
                      "active": 1,
                      "api_id": "",
                      "staff": []
                    },
                    {
                      "id": 83169,
                      "title": "Men's haircut",
                      "category_id": 83167,
                      "price_min": 1300,
                      "price_max": 1300,
                      "discount": 0,
                      "comment": "",
                      "weight": 6,
                      "active": 1,
                      "api_id": 42,
                      "staff": [
                        {
                          "id": 5905,
                          "seance_length": 2700
                        },
                        {
                          "id": 5907,
                          "seance_length": 3600
                        },
                        {
                          "id": 8973,
                          "seance_length": 3600
                        },
                        {
                          "id": 13616,
                          "seance_length": 3600
                        },
                        {
                          "id": 16681,
                          "seance_length": 3600
                        },
                        {
                          "id": 17969,
                          "seance_length": 3600
                        },
                        {
                          "id": 34006,
                          "seance_length": 3600
                        }
                      ],
                      "image_group": {
                        "id": 72234,
                        "entity": "settings_service",
                        "entity_id": 389927,
                        "images": {
                          "basic": {
                            "id": 186791,
                            "path": "https://app.alteg.io/path/to/image/tagret-image.jpeg",
                            "width": "372",
                            "height": "280",
                            "type": "jpeg",
                            "image_group_id": 72234,
                            "version": "basic"
                          }
                        }
                      }
                    }
                  ],
                  "meta": {
                    "total_count": 2
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response403_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "It is necessary to renew the license in the branch with id: {location_id}"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_service_categories_response404_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "Location not specified."
                      },
                      {
                        "message": "Location not found."
                      },
                      {
                        "message": "Service not listed."
                      },
                      {
                        "message": "Service not found."
                      },
                      {
                        "message": "Team Member not found."
                      },
                      {
                        "message": "Category not found."
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/services/{service_id}/staff": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Linking a Team Member to a Provided Service",
        "description": "Creates a team member service link with provided duration and bill of materials.\n",
        "operationId": "assign_service_to_team_member",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/service_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "master_id",
                  "seance_length",
                  "technological_card_id"
                ],
                "type": "object",
                "properties": {
                  "master_id": {
                    "type": "number",
                    "description": "ID of a team member who provides the service.",
                    "example": 123
                  },
                  "seance_length": {
                    "type": "number",
                    "description": "Duration of service provision by the specified team member in seconds,\nminimum 300 seconds (5 minutes), maximum 86100 seconds (23 hours 55 minutes).\n",
                    "example": 3600
                  },
                  "technological_card_id": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "ID of bill of materials used while providing the service.",
                    "example": 123
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/master_service_link"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/services/{service_id}/staff/{team_member_id}": {
      "put": {
        "tags": [
          "Services"
        ],
        "summary": "Updating Team Member Service Link Settings",
        "description": "Updates a team member service link with provided duration and bill of materials.\n",
        "operationId": "update_service_team_member_assignment",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/service_id"
          },
          {
            "$ref": "#/components/parameters/master_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "seance_length",
                  "technological_card_id"
                ],
                "type": "object",
                "properties": {
                  "seance_length": {
                    "type": "number",
                    "description": "Duration of service provision by the specified team member in seconds,\nminimum 300 seconds (5 minutes), maximum 86100 seconds (23 hours 55 minutes).\n",
                    "example": 3600
                  },
                  "technological_card_id": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "ID of bill of materials used while providing the service.",
                    "example": 123
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/master_service_link"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Services"
        ],
        "summary": "Deleting a Team Member Service Link",
        "description": "Deletes a team member service link.\n",
        "operationId": "remove_service_from_team_member",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/service_id"
          },
          {
            "$ref": "#/components/parameters/master_id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/response_data_null_object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/services/links": {
      "post": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update service links",
        "description": "Updates service configuration including:\n- Team member assignments with custom duration and pricing\n- Tech cards (technological cards) for each team member\n- Required resources for the service\n- Service name translations for different languages\n\nThis endpoint allows bulk updating of service-team member relationships\nwithout affecting other service properties.\n",
        "operationId": "update_service_links",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "service_id",
                  "team_member_settings",
                  "resource_ids",
                  "translations"
                ],
                "properties": {
                  "service_id": {
                    "type": "integer",
                    "description": "Service ID to update",
                    "example": 10832939
                  },
                  "team_member_settings": {
                    "type": "array",
                    "description": "List of team members providing this service with duration and tech cards",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_member_id": {
                          "type": "integer",
                          "description": "Team member ID",
                          "example": 2033728
                        },
                        "tech_card_id": {
                          "type": "integer",
                          "description": "Tech card ID for this team member's service delivery",
                          "example": 291341
                        },
                        "hours": {
                          "type": "integer",
                          "description": "Service duration hours",
                          "minimum": 0,
                          "example": 0
                        },
                        "minutes": {
                          "type": "integer",
                          "description": "Service duration minutes",
                          "minimum": 0,
                          "maximum": 59,
                          "example": 45
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "object",
                              "description": "Custom price for this team member.\nSet to null to use default service price.\n",
                              "properties": {
                                "min": {
                                  "type": "number",
                                  "format": "float",
                                  "description": "Minimum price (\"from\" price)",
                                  "example": 999.99
                                },
                                "max": {
                                  "oneOf": [
                                    {
                                      "type": "number",
                                      "format": "float"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Maximum price (\"to\" price), null for fixed price",
                                  "example": null
                                }
                              }
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  },
                  "resource_ids": {
                    "type": "array",
                    "description": "List of resource IDs required to provide this service",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      62173
                    ]
                  },
                  "translations": {
                    "type": "array",
                    "description": "Service name translations for different languages",
                    "items": {
                      "type": "object",
                      "properties": {
                        "language_id": {
                          "type": "integer",
                          "description": "Language ID",
                          "example": 2
                        },
                        "translation": {
                          "type": "string",
                          "description": "Translated service name (empty string to clear)",
                          "example": "Massage"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "service_id": 10832939,
                "team_member_settings": [
                  {
                    "team_member_id": 2033728,
                    "tech_card_id": 291341,
                    "hours": 0,
                    "minutes": 45,
                    "price": {
                      "min": 999.99,
                      "max": null
                    }
                  },
                  {
                    "team_member_id": 1987799,
                    "tech_card_id": 291341,
                    "hours": 1,
                    "minutes": 15,
                    "price": null
                  }
                ],
                "resource_ids": [
                  62173
                ],
                "translations": [
                  {
                    "language_id": 2,
                    "translation": ""
                  },
                  {
                    "language_id": 2,
                    "translation": "Massage"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Service links updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Service or location not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "errors": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/service_categories": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get a list of chain service categories",
        "operationId": "get_chain_service_category_list",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional resources in response",
            "schema": {
              "type": "string",
              "enum": [
                "services"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/service_category_title"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/staff/{location_id}": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get list of team members",
        "description": "Returns all team members for the specified location.\n\nEach team member includes:\n- Basic info (name, specialization, avatar)\n- Rating and reviews data\n- Schedule availability\n- Position and status\n",
        "operationId": "get_team_member_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "API version header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer {partner_token}",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/staff_list_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Add new team member",
        "operationId": "deprecated_create_team_member",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/staff_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 17969,
                    "api_id": 42,
                    "name": "Basil",
                    "specialization": "the hairdresser",
                    "position": {
                      "id": 1,
                      "title": "Administrator"
                    },
                    "show_rating": false,
                    "rating": 0,
                    "votes_count": 0,
                    "user_id": 12345,
                    "avatar": "https://app.alteg.io/uploads/masters/sm/20151018220924_4963.jpg",
                    "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151018220924_4963.jpg",
                    "comments_count": 0,
                    "weight": 10,
                    "information": "<span><span><span>&nbsp;</span></span></span>",
                    "hidden": 0,
                    "fired": 0,
                    "status": 0
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/staff/{location_id}/{team_member_id}": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a specific team member",
        "operationId": "get_team_member_by_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID, if you need to work with a specific team member.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response_data_types_deprecated"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 17969,
                      "name": "Basil",
                      "specialization": "the hairdresser",
                      "position": {
                        "id": 1,
                        "title": "Administrator"
                      },
                      "show_rating": 0,
                      "rating": 0,
                      "votes_count": 0,
                      "user_id": 12345,
                      "avatar": "https://app.alteg.io/uploads/masters/sm/20151018220924_4963.jpg",
                      "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151018220924_4963.jpg",
                      "comments_count": 0,
                      "weight": "10",
                      "information": "<span><span><span>&nbsp;</span></span></span>",
                      "hidden": "0",
                      "fired": "0",
                      "status": "0",
                      "image_group": {
                        "id": 72250,
                        "entity": "master",
                        "entity_id": 26427,
                        "images": {
                          "sm": {
                            "id": 186817,
                            "path": "https://app.alteg.io/uploads/masters/sm/9/90/9041171cfdabe4c_20170327202542.jpeg",
                            "width": "100",
                            "height": "100",
                            "type": "jpeg",
                            "image_group_id": 72250,
                            "version": "sm"
                          },
                          "norm": {
                            "id": 186818,
                            "path": "https://app.alteg.io/uploads/masters/norm/a/aa/aa37b29b7eb322d_20170327202542.jpeg",
                            "width": "180",
                            "height": "220",
                            "type": "jpeg",
                            "image_group_id": 72250,
                            "version": "norm"
                          },
                          "origin": {
                            "id": 186819,
                            "path": "https://app.alteg.io/uploads/masters/origin/6/65/654dbeb4ea0bbc3_20170327202542.jpeg",
                            "width": "800",
                            "height": "600",
                            "type": "jpeg",
                            "image_group_id": 72250,
                            "version": "origin"
                          }
                        }
                      }
                    },
                    {
                      "id": 34006,
                      "api_id": "42",
                      "name": "Denis",
                      "specialization": "the hairdresser",
                      "position": [],
                      "show_rating": 0,
                      "rating": 0,
                      "votes_count": 0,
                      "user_id": 12345,
                      "avatar": "https://app.alteg.io/uploads/masters/sm/20151116091208_4369.jpg",
                      "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151116091208_4369.jpg",
                      "comments_count": 0,
                      "weight": "9",
                      "information": "<span><span>&nbsp;</span></span>",
                      "hidden": "0",
                      "fired": "0",
                      "status": "0",
                      "image_group": []
                    },
                    {
                      "id": 13616,
                      "name": "Alexander",
                      "specialization": "the hairdresser",
                      "position": [],
                      "show_rating": 0,
                      "rating": 4.76921,
                      "votes_count": 0,
                      "user_id": 12345,
                      "avatar": "https://app.alteg.io/uploads/masters/sm/20251112123913_5162.jpg",
                      "avatar_big": "https://app.alteg.io/uploads/masters/norm/20251112123913_5162.jpg",
                      "comments_count": 26,
                      "weight": "8",
                      "information": "<span><span><span>&nbsp;</span></span></span>",
                      "hidden": "0",
                      "fired": "0",
                      "status": "0",
                      "image_group": []
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit Team Member",
        "operationId": "update_team_member",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/staff_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 17969,
                    "api_id": 42,
                    "name": "Basil",
                    "specialization": "the hairdresser",
                    "position": {
                      "id": 1,
                      "title": "Administrator"
                    },
                    "show_rating": 0,
                    "rating": 0,
                    "votes_count": 0,
                    "user_id": 12345,
                    "avatar": "https://app.alteg.io/uploads/masters/sm/20151018220924_4963.jpg",
                    "avatar_big": "https://app.alteg.io/uploads/masters/norm/20151018220924_4963.jpg",
                    "comments_count": 0,
                    "weight": "10",
                    "information": "<span><span><span>&nbsp;</span></span></span>",
                    "hidden": "0",
                    "fired": "0",
                    "status": "0",
                    "is_paid_staff": false,
                    "is_included_in_payment_policy": true
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Returned when the user lacks permission for the requested change, for example when modifying `is_included_in_payment_policy` without the `payment_policy_update_access` permission.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete team member",
        "operationId": "delete_team_member",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/staff/quick": {
      "post": {
        "tags": [
          "Team Members"
        ],
        "summary": "Quick create a team member",
        "description": "Creates a new team member with a minimal set of parameters.\n",
        "operationId": "create_team_member_quick",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "name",
                  "specialization",
                  "position_id",
                  "phone_number",
                  "user_email",
                  "user_phone",
                  "is_user_invite"
                ],
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of a team member.",
                    "example": "John Johnson"
                  },
                  "specialization": {
                    "type": "string",
                    "description": "Specialization of a team member.",
                    "example": "Cosmetologist"
                  },
                  "position_id": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "ID of a position that should be linked to a team member.",
                    "example": 123
                  },
                  "phone_number": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Phone number of a user that should be linked to a team member (without \"+\", 9 to 15 digits).",
                    "example": 11234567890
                  },
                  "user_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email address of the user to be created or linked to the team member.",
                    "example": "john.johnson@example.com"
                  },
                  "user_phone": {
                    "type": "string",
                    "description": "User phone number (without \"+\", 9 to 15 digits). Can be the same as phone_number or different for user account login.",
                    "example": 11234567890
                  },
                  "is_user_invite": {
                    "type": "boolean",
                    "description": "Whether to send an invitation email to the user. Set to true to send invitation, false to create without sending invitation.",
                    "example": false
                  },
                  "is_paid_staff": {
                    "type": "boolean",
                    "description": "Whether the team member is a paid staff member.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/master_with_position"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/staff/{team_member_id}": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Team Members / Specific Team Member",
        "operationId": "get_team_member",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID, if you need to work with a specific team member.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1001539,
                      "name": "team member 1",
                      "company_id": 176275,
                      "specialization": "team member",
                      "position": {
                        "id": 1,
                        "title": "Administrator"
                      },
                      "avatar": "https://app.alteg.io/images/no-master-sm.png",
                      "avatar_big": "https://app.alteg.io/images/no-master.png",
                      "fired": 0,
                      "status": 0,
                      "hidden": 0,
                      "user_id": 12345,
                      "is_paid_staff": false,
                      "is_included_in_payment_policy": true
                    }
                  ],
                  "meta": {
                    "total_count": 1
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response403_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "It is necessary to renew the license in the branch with id: {location_id}"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_staff_staffid_response404_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "Location not specified."
                      },
                      {
                        "message": "Team Member not listed"
                      },
                      {
                        "message": "Team Member with ID {team_member_id} was not found in branch {location_id}."
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/staff/positions": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get a list of location positions",
        "description": "**This endpoint is deprecated.** Use `GET /v2/companies/{company_id}/positions` instead.\n\nThe method allows you to get a list of current positions in the location.\n\n**Migration:** The V2 Positions API provides enhanced functionality with full CRUD operations, pagination, and JSON:API format responses. See operation `list_positions` for details.\n",
        "operationId": "get_position_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of location positions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_staff_position_list_data_type"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/positions/quick": {
      "post": {
        "tags": [
          "Team Members"
        ],
        "deprecated": true,
        "summary": "Deprecated. Quick create a position",
        "description": "**This endpoint is deprecated.** Use `POST /v2/companies/{company_id}/positions` instead.\n\nCreates a new position in a location; position is created as a chain entity and at the same time linked to a location initiated its creation.\n\n**Migration:** The V2 Positions API provides full CRUD operations with enhanced validation and JSON:API format responses. See operation `create_position` for details.\n",
        "operationId": "create_position_quick",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of a position.",
                    "example": "Position"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/position"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{location_id}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get a list of clients",
        "description": "+ Parameter\r\n    + company_id (required, number, `1`) - location ID\r\n    + page (number, `1`) - Page number\r\n    + count (number, `20`) - Number of clients per page\r\n\r\n\r\n#### Client filtering\r\n+ fullname:Joh (optional, string) - Name (part of name) to filter clients\r\n+ phone:1315 (optional, string) - Phone (part of the number) for filtering clients\r\n+ email:test@ (optional, string) - Email (part) for client filtering\r\n+ card:5663rt (optional, string) - Card (part) for filtering customers by loyalty card number\r\n+ paid_min:100 (optional, number) - Minimum amount paid, to filter customers by the amount of payments\r\n+ paid_max:0 (optional, number) - Maximum amount paid, to filter customers by the amount of payments\r\n+ paid_max:0 (optional, number) - Maximum amount paid, to filter customers by the amount of payments\r\n+ id:66 (optional, number) - ID of one client for filtering clients\r\n+ id[]: 66 (optional, array) - IDs of multiple clients to filter\r\n+ changed_after: '2000-01-01T00:00:00' (optional, string) - Filtering clients changed/created since a specific date and time\r\n+ changed_before: '2020-12-31T23:59:59' (optional, string) - Filtering clients changed/created before a specific date and time",
        "operationId": "deprecated_get_client_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fullname",
            "in": "query",
            "description": "Name (part of the name) for client filtering",
            "schema": {
              "type": "string"
            },
            "example": "Joh"
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Phone (part of the number) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "1315"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Email (part) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "test@"
          },
          {
            "name": "paid_min",
            "in": "query",
            "description": "Minimum amount paid, to filter customers by the amount of payments",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "paid_max",
            "in": "query",
            "description": "Maximum amount paid, to filter customers by the amount of payments",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of customers per page",
            "schema": {
              "type": "number"
            },
            "example": 20
          },
          {
            "name": "location_id",
            "in": "query",
            "description": "ID of one or more clients to filter clients",
            "schema": {
              "type": "number"
            },
            "example": 66
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/clients_companyid_response_deprecated_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 66,
                      "name": "James",
                      "surname": "Smith",
                      "middle_name": "James",
                      "phone": 13155550177,
                      "email": "asdfgh@g.com",
                      "categories": [
                        {
                          "id": 3,
                          "title": "Black list",
                          "color": "#0f0f0f"
                        },
                        {
                          "id": 4,
                          "title": "VIP",
                          "color": "#e8d313"
                        }
                      ],
                      "gender_id": 0,
                      "gender": "unknown",
                      "discount": 10,
                      "importance_id": 3,
                      "importance": "Gold",
                      "card": 123456789,
                      "birth_date": "2026-09-21",
                      "comment": "test",
                      "sms_check": 1,
                      "sms_not": 0,
                      "spent": 71842,
                      "balance": 0,
                      "visits": 34,
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "custom_fields": []
                    },
                    {
                      "id": 16,
                      "name": "James",
                      "surname": "Smith",
                      "middle_name": "James",
                      "phone": 13155550178,
                      "email": "",
                      "categories": [],
                      "gender_id": 0,
                      "gender": "unknown",
                      "discount": 0,
                      "importance_id": 0,
                      "importance": "No importance class",
                      "card": "",
                      "birth_date": null,
                      "comment": "",
                      "sms_check": 0,
                      "sms_not": 0,
                      "spent": 0,
                      "balance": 0,
                      "visits": 3,
                      "last_change_date": "2026-04-01T12:00:00-0500",
                      "custom_fields": []
                    }
                  ],
                  "meta": {
                    "page": 1,
                    "total_count": 8
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Adding a Client",
        "operationId": "create_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "name",
                  "phone"
                ],
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Client name"
                  },
                  "surname": {
                    "type": "string",
                    "description": "Client surname"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "Client middle name"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Customer phone"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client Email"
                  },
                  "gender_id": {
                    "type": "number",
                    "description": "Gender of the client (1 - male, 2 - female, 0 - unknown)"
                  },
                  "importance_id": {
                    "type": "number",
                    "description": "Client priority level (0 - none, 1 - bronze, 2 - silver, 3 - gold)"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Customer Discount"
                  },
                  "card": {
                    "type": "string",
                    "description": "Client card number"
                  },
                  "birth_date": {
                    "type": "string",
                    "description": "Date of birth of the client in the format yyyy-mm-dd"
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment"
                  },
                  "spent": {
                    "type": "number",
                    "description": "How much money spent in the location at the time of adding"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Client balance"
                  },
                  "sms_check": {
                    "type": "number",
                    "description": "1 - Happy Birthday by SMS, 0 - do not congratulate"
                  },
                  "sms_not": {
                    "type": "number",
                    "description": "1 - Exclude the client from SMS mailings, 0 - do not exclude"
                  },
                  "categories": {
                    "type": "object",
                    "description": "Array of customer tag IDs"
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Array of additional client fields as \"api-key\": \"value\" pairs"
                  }
                },
                "example": {
                  "name": "James",
                  "surname": "Smith",
                  "middle_name": "James",
                  "phone": 13155550179,
                  "email": "j.smith@example.com",
                  "gender_id": 1,
                  "discount": 15,
                  "importance_id": 1,
                  "card": 555888666,
                  "birth_date": "952041600",
                  "comment": "throws show-off",
                  "sms_check": 0,
                  "sms_not": 0,
                  "spent": 1000,
                  "balance": -200,
                  "categories": [
                    101,
                    102
                  ],
                  "custom_fields": {
                    "key-1": "value-1"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "id": 1121412,
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550179,
                    "email": "j.smith@example.com",
                    "categories": [],
                    "gender": "Male",
                    "gender_id": 1,
                    "discount": 15,
                    "importance_id": 1,
                    "importance": "Bronze",
                    "card": 555888666,
                    "birth_date": "952041600",
                    "comment": "throws show-off",
                    "sms_check": 0,
                    "sms_not": 0,
                    "spent": 1000,
                    "balance": -1200,
                    "visits": 0,
                    "last_change_date": "2026-05-01T12:00:00-0500",
                    "custom_fields": {
                      "key-1": "value-1"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/clients/search": {
      "post": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of clients",
        "operationId": "get_client_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/company_companyid_clients_search_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_clients_search_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "name": "James Smith",
                      "id": 2
                    },
                    {
                      "name": "Taylor Reed",
                      "id": 3
                    },
                    {
                      "name": "James Smith",
                      "id": 1
                    }
                  ],
                  "meta": {
                    "total_count": 908
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_clients_search_response400_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Invalid filter value",
                    "errors": {
                      "filters": [
                        "Invalid filter state value"
                      ]
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_clients_search_response402_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "It is necessary to renew the license in the branch with id: {location_id}"
                  }
                }
              }
            }
          },
          "404": {
            "description": "When a location is specified not as an integer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_companyid_clients_search_response404_data_types"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "Location not specified."
                      },
                      {
                        "filters": [
                          "Invalid filter state value"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/client/{location_id}/{id}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a client",
        "operationId": "get_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "id": 16,
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550178,
                    "email": "",
                    "categories": [],
                    "gender": "unknown",
                    "discount": 0,
                    "importance": "No importance class",
                    "card": "",
                    "birth_date": null,
                    "comment": "",
                    "sms_check": 0,
                    "sms_not": 0,
                    "spent": 0,
                    "balance": 0,
                    "visits": 3,
                    "last_change_date": "2026-03-01T12:00:00-0500",
                    "custom_fields": []
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit client",
        "operationId": "update_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "name",
                  "phone"
                ],
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Client name"
                  },
                  "surname": {
                    "type": "string",
                    "description": "Client surname"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "Client middle name"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Customer phone"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client Email"
                  },
                  "gender_id": {
                    "type": "number",
                    "description": "Gender of the client (1 - male, 2 - female, 0 - unknown)"
                  },
                  "importance_id": {
                    "type": "number",
                    "description": "Client priority level (0 - none, 1 - bronze, 2 - silver, 3 - gold)"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Customer Discount"
                  },
                  "card": {
                    "type": "string",
                    "description": "Client card number"
                  },
                  "birth_date": {
                    "type": "string",
                    "description": "Date of birth of the client in the format yyyy-mm-dd"
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment"
                  },
                  "spent": {
                    "type": "number",
                    "description": "How much money spent in the location at the time of adding"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Client balance"
                  },
                  "sms_check": {
                    "type": "number",
                    "description": "1 - Happy Birthday by SMS, 0 - do not congratulate"
                  },
                  "sms_not": {
                    "type": "number",
                    "description": "1 - Exclude the client from SMS mailings, 0 - do not exclude"
                  },
                  "labels": {
                    "type": "object",
                    "description": "Array of customer tag IDs"
                  },
                  "custom_fields": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Array of additional client fields as \"api-key\": \"value\" pairs"
                  }
                },
                "example": {
                  "name": "James",
                  "surname": "Smith",
                  "middle_name": "James",
                  "phone": 13155550179,
                  "email": "j.smith@example.com",
                  "gender_id": 1,
                  "discount": 15,
                  "importance_id": 1,
                  "card": 555888666,
                  "birth_date": "952041600",
                  "comment": "throws show-off",
                  "sms_check": 0,
                  "sms_not": 0,
                  "spent": 1000,
                  "balance": -200,
                  "labels": [
                    101,
                    102
                  ],
                  "custom_fields": {
                    "key-1": "value-1"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "id": 1121412,
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550179,
                    "email": "j.smith@example.com",
                    "categories": [],
                    "gender": "Male",
                    "gender_id": 1,
                    "discount": 15,
                    "importance_id": 1,
                    "importance": "Bronze",
                    "card": 555888666,
                    "birth_date": "952041600",
                    "comment": "throws show-off",
                    "sms_check": 0,
                    "sms_not": 0,
                    "spent": 1000,
                    "balance": -1200,
                    "visits": 0,
                    "last_change_date": "2026-06-01T12:00:00-0500",
                    "custom_fields": {
                      "key-1": "value-1"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete client",
        "operationId": "delete_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{location_id}/bulk": {
      "post": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Bulk adding clients",
        "operationId": "bulk_create_clients",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "name",
                  "phone"
                ],
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Client name"
                  },
                  "surname": {
                    "type": "string",
                    "description": "Client surname"
                  },
                  "middle_name": {
                    "type": "string",
                    "description": "Client middle name"
                  },
                  "phone": {
                    "type": "string",
                    "description": "Customer phone"
                  },
                  "email": {
                    "type": "string",
                    "description": "Client Email"
                  },
                  "gender_id": {
                    "type": "number",
                    "description": "Gender of the client (1 - male, 2 - female, 0 - unknown)"
                  },
                  "importance_id": {
                    "type": "number",
                    "description": "Client priority level (0 - none, 1 - bronze, 2 - silver, 3 - gold)"
                  },
                  "discount": {
                    "type": "number",
                    "description": "Customer Discount"
                  },
                  "card": {
                    "type": "string",
                    "description": "Client card number"
                  },
                  "birth_date": {
                    "type": "string",
                    "description": "Date of birth of the client in the format yyyy-mm-dd"
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment"
                  },
                  "spent": {
                    "type": "number",
                    "description": "How much money spent in the location at the time of adding"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Client balance"
                  },
                  "sms_check": {
                    "type": "number",
                    "description": "1 - Happy Birthday by SMS, 0 - do not congratulate"
                  },
                  "sms_not": {
                    "type": "number",
                    "description": "1 - Exclude the client from SMS mailings, 0 - do not exclude"
                  },
                  "categories": {
                    "type": "object",
                    "description": "Array of customer tag IDs"
                  }
                },
                "example": [
                  {
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550181,
                    "email": "j.smith@example.com",
                    "gender_id": 1,
                    "discount": 15,
                    "importance_id": 1,
                    "card": 555888666,
                    "birth_date": "952041600",
                    "comment": "throws show-off",
                    "sms_check": 0,
                    "sms_not": 0,
                    "spent": 1000,
                    "balance": -200,
                    "categories": [
                      101,
                      102
                    ]
                  },
                  {
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550181
                  },
                  {
                    "phone": 13155550182
                  },
                  {
                    "name": "James",
                    "surname": "Smith",
                    "middle_name": "James",
                    "phone": 13155550183
                  },
                  {
                    "name": "Theodore",
                    "surname": "Hicks",
                    "middle_name": "Richardson"
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "created": [
                      {
                        "id": 19153889,
                        "name": "James",
                        "surname": "Smith",
                        "middle_name": "James",
                        "phone": 13155550181,
                        "email": "j.smith@example.com",
                        "card": 555888666,
                        "birth_date": "952041600",
                        "comment": "throws show-off",
                        "discount": 15,
                        "visits": 0,
                        "gender_id": 1,
                        "gender": "Male",
                        "sms_check": 0,
                        "sms_bot": 0,
                        "spent": 1000,
                        "paid": 0,
                        "balance": -1200,
                        "importance_id": 1,
                        "importance": "Bronze",
                        "categories": [
                          {
                            "id": 101,
                            "title": "Loyal",
                            "color": "#bfd4f2"
                          },
                          {
                            "id": 102,
                            "title": "Constant",
                            "color": "#009800"
                          }
                        ],
                        "last_change_date": "2026-09-08T13:33:39-0500",
                        "custom_fields": []
                      }
                    ],
                    "errors": [
                      {
                        "phone": 13155550181,
                        "name": "James Smith",
                        "error": "The client with the specified phone number already exists in the database"
                      },
                      {
                        "phone": 13155550182,
                        "error": "Client name not specified"
                      },
                      {
                        "phone": 13155550183,
                        "name": "James Smith",
                        "error": "Phone must contain 9 to 15 digits"
                      },
                      {
                        "name": "Theodore Hicks",
                        "error": "Customer phone number cannot be empty"
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/clients/{location_id}/clients/{client_id}/comments": {
      "get": {
        "tags": [
          "Clients"
        ],
        "summary": "List of a comments for a client",
        "description": "Returns a list of a comments for a client and a files in a client details uploads history.\n",
        "operationId": "list_client_comments",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/client_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/client_comment_container"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Add a comment for a client",
        "description": "Creates a new text comment for a client.\n",
        "operationId": "create_client_comment",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/client_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "text"
                ],
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Text of a comment for a client.",
                    "example": "Comment for a client"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/client_comment_container"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{location_id}/clients/{client_id}/comments/{comment_id}": {
      "delete": {
        "tags": [
          "Clients"
        ],
        "summary": "Delete a comment for a client",
        "description": "Deletes a comment for a client; does not delete files uploaded that triggered creation of a comment.\n",
        "operationId": "delete_client_comment",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/client_id"
          },
          {
            "$ref": "#/components/parameters/comment_id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/response_data_null_object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/clients/files/{client_id}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Sample Request to Get a List of Client Files",
        "description": "A list of uploaded client files can be retrieved by providing both the location ID and the client ID in the request.\r\nThe client ID can be obtained from the client collection.\r\n\r\nThe response returns an array of [client files](#client-file).\r\n\r\n<a name=\"client-file\"></a>\r\nEach client file has the following structure:\r\n\r\n| Field | Type | Description |\r\n| -----------------| ------- | -------------------------------------------------- ------------------------ |\r\n| id | number | File ID |\r\n| client_id | number | Client ID |\r\n| name | string | Filename with extension |\r\n| description | string | File description |\r\n| extension | string | File name extension |\r\n| mime | string | MIME file type |\r\n| link | string | File download link |\r\n| date_create | string | File upload date in ISO8601 format |\r\n| size | string | Formatted file size string |\r\n| username | string | The name of the user who uploaded the file |\r\n| user_avatar | string | Avatar of the user who uploaded the file |\r\n| can_edit | boolean | Is there a right to change and delete the file? true - there is a right, false - there is no right |",
        "operationId": "get_client_file_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/clients_files_clientid_reaponse_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 123,
                      "client_id": 123456,
                      "name": "test.txt",
                      "description": "",
                      "date_create": "2026-01-01T12:00:00-0500",
                      "extension": "txt",
                      "mime": "text/plain",
                      "link": "/client_files/download/456/123/",
                      "user_name": "Viktor Sitnikov",
                      "user_avatar": "/images/no-master.png",
                      "size": "9 B",
                      "can_edit": false
                    },
                    {
                      "id": 789,
                      "client_id": 123456,
                      "name": "photo.jpg",
                      "description": "",
                      "date_create": "2026-01-30T12:30:00-0500",
                      "extension": "jpg",
                      "mime": "image/jpeg",
                      "link": "/client_files/download/456/789/",
                      "user_name": "Viktor Sitnikov",
                      "user_avatar": "/images/no-master.png",
                      "size": "96.65 KB",
                      "can_edit": true
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/clients/files/{client_id}/{file_id}": {
      "delete": {
        "tags": [
          "Clients"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete request example",
        "operationId": "delete_client_file",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "file_id",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/clients/visits/search": {
      "post": {
        "tags": [
          "Clients"
        ],
        "summary": "Search by customer history",
        "description": "Displays the client’s visit history.This method returns the client’s appointment and product purchase history, grouped by visit. Data is filtered based on visit status and paid status.\nThe client is identified using either the client_id or client_phone parameter. All other parameters are optional. \nResults are sorted by visit date and paginated in batches of 25 items. If multiple visits share the same date as the last item on the page, they will be included on the current page to ensure complete grouping.\nTo retrieve the next page, use the from and to values provided in the meta field of the current response.\n",
        "operationId": "search_client_visits",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "client_id",
                  "client_phone",
                  "from",
                  "to",
                  "payment_statuses",
                  "attendance"
                ],
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Client ID.",
                    "example": 123
                  },
                  "client_phone": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Customer phone number.",
                    "example": 13155550184
                  },
                  "from": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Period start date.",
                    "format": "date",
                    "example": "2022-01-31"
                  },
                  "to": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Period end date.",
                    "format": "date",
                    "example": "2022-02-01"
                  },
                  "payment_statuses": {
                    "type": "array",
                    "description": "Visit payment status:  \n  `not_paid` - the visit is not paid, no payments were made for the visit;  \n  `paid_not_full` - the visit is partially paid;  \n  `paid_full` - the visit is paid in full, there is no overpayment;  \n  `paid_over` - there is an overpayment for the visit.  \nIf the filter by payment status is not required, then an empty array `[]` must be passed.\n",
                    "items": {
                      "type": "string",
                      "enum": [
                        "not_paid",
                        "paid_not_full",
                        "paid_full",
                        "paid_over"
                      ]
                    }
                  },
                  "attendance": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Visit status:\n  `-1`: - the client did not come;\n  `0`: - waiting for the client;\n  `1`: - the client has arrived;\n  `2`: - the client has confirmed the appointment.\n",
                    "enum": [
                      -1,
                      0,
                      1,
                      2
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/client_visits_history"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_date_paginator_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get location users",
        "description": "The method allows you to get users of the location.  \r\n location User object:\r\n\r\n| Attribute  | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n|  id  |  number   | User ID   |\r\n|  name  | string  | User name  |\r\n|  phone  | string  | User phone |\r\n| email  | string  | User email |\r\n| information  | string  | User information |\r\n|  is_approved  |  boolean | Whether the user accepted the invitation to manage the location  |\r\n|  is_non_deletable  |  boolean  | Whether the user is non-deletable",
        "operationId": "get_location_users",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "filter[is_approved]",
            "in": "query",
            "description": "Whether the user accepted the invitation to manage the location. 1 - accepted, 0 - not accepted",
            "required": false,
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_company_id_users_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 10,
                      "name": "Bob Williams",
                      "phone": "+13155550175",
                      "email": "b.williams@example.com",
                      "information": "Manager",
                      "is_approved": false,
                      "is_non_deletable": false
                    },
                    {
                      "id": 11,
                      "name": "Oliver Davis",
                      "phone": "+13155550176",
                      "email": "o.davis@example.com",
                      "information": "Administrator",
                      "is_approved": true,
                      "is_non_deletable": true
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/{user_id}": {
      "delete": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Remove the user from the location",
        "operationId": "remove_user_from_location",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company_users/{location_id}": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get location users",
        "description": "location User object",
        "operationId": "deprecated_get_location_users",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_users_deprecated_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 224348,
                      "firstname": "James",
                      "login": "j.smith",
                      "email": "j.smith@example.com",
                      "phone": "+13155550175",
                      "information": "Test user",
                      "access": {
                        "stat_access": true,
                        "schedule_edit_access": false,
                        "client_phones_access": false,
                        "clients_access": false,
                        "settings_access": false,
                        "edit_records_access": false,
                        "timetable_access": true,
                        "billing_access": false,
                        "users_access": false,
                        "excel_access": false,
                        "finances_access": false,
                        "storages_access": false,
                        "send_sms": true,
                        "master_id": 0
                      }
                    },
                    {
                      "id": 11,
                      "firstname": "James",
                      "login": "j.smith",
                      "email": "j.smith@example.com",
                      "phone": "+13155550175",
                      "information": "Test user",
                      "access": {
                        "stat_access": true,
                        "schedule_edit_access": true,
                        "client_phones_access": true,
                        "clients_access": true,
                        "settings_access": true,
                        "edit_records_access": true,
                        "timetable_access": true,
                        "billing_access": true,
                        "users_access": false,
                        "excel_access": true,
                        "finances_access": true,
                        "storages_access": true,
                        "send_sms": true,
                        "master_id": 0
                      }
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/user/permissions/{location_id}": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of rights",
        "description": "+ Parameter\r\n    + company_id (required, number, `1`) - location ID",
        "operationId": "get_permission_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user_permissions_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "timetable": {
                      "timetable_access": true,
                      "master_id": 1000238,
                      "position_id": 0,
                      "last_days_count": 1000,
                      "schedule_edit_access": true,
                      "timetable_phones_access": true,
                      "timetable_transferring_record_access": true,
                      "timetable_statistics_access": true
                    },
                    "record_form": {
                      "record_form_access": true,
                      "record_form_client_access": true,
                      "records_autocomplete_access": true,
                      "create_records_access": true,
                      "edit_records_access": true,
                      "edit_records_attendance_access": true,
                      "records_services_cost_access": true,
                      "records_services_discount_access": true,
                      "record_edit_full_paid_access": true,
                      "delete_records_access": true,
                      "delete_customer_came_records_access": true,
                      "delete_paid_records_access": true,
                      "records_goods_access": true,
                      "records_goods_create_transaction_access": true,
                      "records_goods_create_last_days_count": -1,
                      "records_goods_edit_transaction_access": true,
                      "records_goods_edit_last_days_count": -1,
                      "records_goods_cost_access": true,
                      "records_goods_discount_access": true,
                      "records_finances_access": true,
                      "records_finances_last_days_count": -1,
                      "records_finances_pay_from_deposits_access": true,
                      "records_group_id_access": true,
                      "records_group_id": 134178
                    },
                    "finances": {
                      "finances_access": true,
                      "finances_accounts_ids": [],
                      "finances_transactions_access": true,
                      "finances_last_days_count": -1,
                      "finances_create_transactions_access": true,
                      "finances_create_last_days_count": -1,
                      "finances_edit_transactions_access": true,
                      "finances_edit_last_days_count": -1,
                      "finances_delete_transactions_access": true,
                      "finances_transactions_excel_access": true,
                      "finances_expenses_ids": [],
                      "finances_accounts_access": true,
                      "finances_accounts_banalce_access": true,
                      "finances_suppliers_read_access": true,
                      "finances_suppliers_create_access": true,
                      "finances_suppliers_update_access": true,
                      "finances_suppliers_delete_access": true,
                      "finances_suppliers_excel_access": true,
                      "finances_expenses_read_access": true,
                      "expenses_read_access": true,
                      "finances_expenses_create_access": true,
                      "expenses_create_access": true,
                      "finances_expenses_update_access": true,
                      "expenses_update_access": true,
                      "finances_expenses_delete_access": true,
                      "expenses_delete_access": true,
                      "finances_kkm_transactions_access": true,
                      "kkm_transactions_accounts_access": true,
                      "finances_kkm_settings_read_access": true,
                      "kkm_settings_reed_access": true,
                      "finances_kkm_settings_update_access": true,
                      "kkm_settings_update_access": true,
                      "finances_settings_invoicing_read_access": true,
                      "settings_invoicing_read_access": true,
                      "finances_settings_invoicing_update_access": true,
                      "settings_invoicing_update_access": true,
                      "finances_options_read_access": true,
                      "options_read_access": true,
                      "finances_options_update_access": true,
                      "options_update_access": true,
                      "finances_salary_schemes_access": true,
                      "finances_salary_calc_access": true,
                      "finances_salary_not_limitation_today_access": true,
                      "finances_payroll_calculation_create_access": true,
                      "finances_payroll_calculation_create_not_limitation_today_access": true,
                      "finances_salary_access_master_checkbox": true,
                      "finances_salary_access_master_id": 1000237,
                      "get_salary_access_master_id": 1000237,
                      "finances_salary_master_not_limitation_today_access": true,
                      "finances_payroll_calculation_create_by_master_access": true,
                      "calculation_create_by_master_not_limitation_today_access": true,
                      "finances_period_report_access": true,
                      "finances_period_report_excel_access": true,
                      "finances_year_report_access": true,
                      "finances_year_report_excel_access": true,
                      "finances_print_check_access": true,
                      "finances_z_report_access": true,
                      "finances_z_report_no_limit_today_access": true,
                      "finances_z_report_excel_access": true
                    },
                    "clients": {
                      "clients_access": true,
                      "client_phones_access": true,
                      "clients_phones_email_access": true,
                      "clients_card_phone_access": true,
                      "clients_delete_access": true,
                      "clients_excel_access": true,
                      "excel_access": true,
                      "client_comments_list_access": true,
                      "client_comments_add_access": true,
                      "client_comments_own_edit_access": true,
                      "client_comments_other_edit_access": true,
                      "client_files_list_access": true,
                      "client_files_upload_access": true,
                      "client_files_delete_access": true,
                      "clients_visit_master_id": 0,
                      "get_visit_master_id": 0
                    },
                    "dashboard": {
                      "dashboard_access": true,
                      "dash_access": true,
                      "dash_phones_access": true,
                      "dash_records_access": true,
                      "dash_records_last_days_count": -1,
                      "dash_records_excel_access": true,
                      "dash_records_phones_access": true,
                      "dash_message_access": true,
                      "dash_message_excel_access": true,
                      "dash_message_phones_access": true,
                      "dash_reviews_access": true,
                      "dash_reviews_delete_access": true,
                      "dashboard_calls_access": true,
                      "dashboard_calls_excel_access": true,
                      "dashboard_calls_phones_access": true
                    },
                    "notification": {
                      "notification": true,
                      "web_push": true,
                      "web_phone_push": true,
                      "notification_sms_ending_license": true,
                      "notification_sms_low_balance": true,
                      "notification_email_ending_license": true
                    },
                    "loyalty": {
                      "loyalty_access": true,
                      "has_loyalty_access": true,
                      "loyalty_cards_manual_transactions_access": true,
                      "has_loyalty_cards_manual_transactions_access": true,
                      "loyalty_certificate_and_abonement_manual_transactions_access": true
                    },
                    "storages": {
                      "storages_access": true,
                      "storages_ids": [],
                      "storages_transactions_access": true,
                      "storages_last_days_count": -1,
                      "storages_move_goods_access": true,
                      "storages_create_transactions_access": true,
                      "storages_create_last_days_count": -1,
                      "storages_create_transactions_buy_access": true,
                      "storages_create_transactions_sale_access": true,
                      "storages_edit_transactions_access": true,
                      "storages_edit_last_days_count": -1,
                      "storages_edit_transactions_buy_access": true,
                      "storages_edit_transactions_sale_access": true,
                      "storages_delete_transactions_access": true,
                      "storages_transactions_excel_access": true,
                      "storages_transactions_types": [],
                      "storages_inventory_access": true,
                      "storages_inventory_create_edit_access": true,
                      "storages_inventory_delete_access": true,
                      "storages_inventory_excel_access": true,
                      "storages_remnants_report_access": true,
                      "storages_remnants_report_excel_access": true,
                      "storages_sales_report_access": true,
                      "storages_sales_report_excel_access": true,
                      "storages_consumable_report_access": true,
                      "storages_consumable_report_excel_access": true,
                      "storages_write_off_report_access": true,
                      "storages_write_off_report_excel_access": true,
                      "storages_turnover_report_access": true,
                      "storages_turnover_report_excel_access": true,
                      "storages_goods_crud_access": true,
                      "storages_goods_create_access": true,
                      "storages_goods_update_access": true,
                      "storages_goods_title_edit_access": true,
                      "storages_goods_category_edit_access": true,
                      "storages_goods_selling_price_edit_access": true,
                      "storages_goods_cost_price_edit_access": true,
                      "storages_goods_units_edit_access": true,
                      "storages_goods_critical_balance_edit_access": true,
                      "storages_goods_masses_edit_access": true,
                      "storages_goods_comment_edit_access": true,
                      "storages_goods_archive_access": true,
                      "storages_goods_delete_access": true
                    },
                    "settings": {
                      "settings_access": true,
                      "settings_basis_access": true,
                      "settings_information_access": true,
                      "users_access": true,
                      "delete_users_access": true,
                      "create_users_access": true,
                      "edit_users_access": true,
                      "limited_users_access": false,
                      "settings_services_access": true,
                      "settings_services_create_access": true,
                      "services_edit": true,
                      "settings_services_edit_title_access": true,
                      "settings_services_relation_category_access": true,
                      "settings_services_edit_price_access": true,
                      "settings_services_edit_image_access": true,
                      "settings_services_edit_online_seance_date_time_access": true,
                      "settings_services_edit_online_pay_access": true,
                      "settings_services_edit_services_related_resource_access": true,
                      "settings_positions_read": true,
                      "settings_positions_create": true,
                      "settings_positions_delete": true,
                      "edit_master_service_and_duration": true,
                      "tech_card_edit": true,
                      "services_delete": true,
                      "settings_master_access": true,
                      "master_create": true,
                      "master_edit": true,
                      "master_delete": true,
                      "settings_master_dismiss_access": true,
                      "schedule_edit": true,
                      "settings_notifications_access": true,
                      "settings_email_notifications_access": true,
                      "settings_template_notifications_access": true,
                      "webhook_read_access": true
                    },
                    "other": {
                      "stat_access": true,
                      "billing_access": true,
                      "send_sms": true,
                      "auth_enable_check_ip": false,
                      "auth_list_allowed_ip": []
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/roles": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Getting a list of user roles",
        "description": "Returns a list of user roles along with permissions for each role.\n",
        "operationId": "list_roles",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/include_for_roles"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/user_role_with_salon_and_user"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/{user_id}/roles": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Getting a list of user roles in the context of a location user",
        "description": "Returns a list of user roles along with permissions for each role. Allows to get the editable status for each permission of a location user (`is_editable` field). This status depends on the current user's permissions.\n",
        "operationId": "get_user_roles",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          },
          {
            "$ref": "#/components/parameters/include_for_roles"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/user_role_with_salon_and_user"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/{user_id}/permissions": {
      "get": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Getting permission values and user role",
        "description": "Return user role and list of permissions values.\n",
        "operationId": "get_user_permissions",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/user_role_permissions"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Updating permission values and user role",
        "description": "Updates the role and permissions of the user, as well as the team member who is attached to this user.\n",
        "operationId": "update_user_permissions",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_role": {
                    "type": "string",
                    "description": "Name of role",
                    "enum": [
                      "worker",
                      "administrator",
                      "accountant",
                      "manager",
                      "owner",
                      "free_readonly",
                      "free_readonly_admin"
                    ]
                  },
                  "user_permissions": {
                    "type": "array",
                    "description": "List of user permissions values",
                    "items": {
                      "$ref": "#/components/schemas/user_permission_value"
                    }
                  },
                  "staff_id": {
                    "type": "number",
                    "description": "team member ID attached to user"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/user_role_permissions"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/user/invite/{location_id}": {
      "post": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Create and Send an Invitation",
        "description": "An invitation to manage a location is sent via email or phone as a link. By following the link and completing registration, the user gains access to manage the location according to the permissions assigned.\nPermission assignment is performed in a separate request after the invitation is sent.\n",
        "operationId": "create_user_invitation",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "invites"
                ],
                "properties": {
                  "invites": {
                    "type": "array",
                    "description": "Array of invites",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "User name",
                          "example": "Olivia"
                        },
                        "search": {
                          "type": "string",
                          "description": "Phone number or email address of the user",
                          "example": "mail@gmail.com"
                        },
                        "position": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Position",
                          "example": "Administrator"
                        },
                        "user_role": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Role name",
                          "enum": [
                            "worker",
                            "administrator",
                            "accountant",
                            "manager",
                            "owner"
                          ],
                          "example": "administrator"
                        },
                        "user_permissions": {
                          "type": [
                            "array",
                            "null"
                          ],
                          "description": "List of user permissions",
                          "items": {
                            "$ref": "#/components/schemas/user_permission_value"
                          }
                        },
                        "staff_id": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "team member ID bound to user",
                          "example": 12
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/user_invite_response_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/{user_id}/copy_to_companies": {
      "post": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Copy a User to Companies",
        "description": "Copies an active user and their permissions to multiple locations at once. If the user does not yet exist in a location, they will be added as an active user. If the user has already been invited to the location, only their permissions will be updated — however, they will still need to accept the invitation.\n",
        "operationId": "copy_user_permissions_to_locations",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_company_links": {
                    "type": "array",
                    "description": "List of locations to copy the user to",
                    "items": {
                      "type": "object",
                      "properties": {
                        "company_id": {
                          "type": "number",
                          "description": "location ID",
                          "example": 123
                        },
                        "user_permissions": {
                          "type": "array",
                          "description": "User permission values to override on copying",
                          "items": {
                            "$ref": "#/components/schemas/user_permission_value"
                          }
                        }
                      },
                      "required": [
                        "company_id"
                      ]
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "user_company_links"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/200_success_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/users/{user_id}/remove_from_companies": {
      "post": {
        "tags": [
          "Users & Permissions"
        ],
        "summary": "Removing a User from Companies",
        "description": "Removes an active user from multiple companies at once.\n",
        "operationId": "remove_user_from_locations",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/user_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_company_links": {
                    "type": "array",
                    "description": "List of locations to remove the user from",
                    "items": {
                      "type": "object",
                      "properties": {
                        "company_id": {
                          "type": "number",
                          "description": "location ID",
                          "example": 123
                        }
                      },
                      "required": [
                        "company_id"
                      ]
                    },
                    "minItems": 1,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "user_company_links"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/200_success_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/records/{location_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get list of appointments",
        "description": "####  Filtering Appointments\n\n+ staff_id: team member ID. \n\nUse this to retrieve appointments for a specific team member\n\n+ client_id: Client ID \n\nUse this to retrieve appointments for a specific client\n\n+ created_user_id: User ID \n\nUser who created the appointment \n\nUse this to filter appointments created by a specific user\n\n+ start_date: Session start date (inclusive) \n\nReturns appointments with a session starting on or after this date\n\n+ end_date: Session end date (inclusive) \n\nReturns appointments with a session ending on or before this date\n\n+ c_start_date: Appointment creation date from \n\nReturns appointments created on or after this date\n\n+ c_end_date: Appointment creation date until \n\nReturns appointments created on or before this date\n\n+ changed_after: Modified or created after this datetime \n\nReturns appointments created or modified after the specified date and time\n\n+ changed_before: Modified or created before this datetime \n\nReturns appointments created or modified before the specified date and time",
        "operationId": "get_appointment_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of appointments per page",
            "schema": {
              "type": "number"
            },
            "example": 50
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "team member ID, if you only need appointments for a specific team member",
            "schema": {
              "type": "number"
            },
            "example": 7572
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Client ID. If you need appointments for a specific client",
            "schema": {
              "type": "number"
            },
            "example": 572
          },
          {
            "name": "created_user_id",
            "in": "query",
            "description": "The ID of the user who created the appointment. If you need appointments created by a specific user",
            "schema": {
              "type": "number"
            },
            "example": 7572
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Session date starting at (filter by session date). If you need appointments for a session starting from a specific date",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21"
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Session date to. If you need appointments for a session before a specific date",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21"
          },
          {
            "name": "c_start_date",
            "in": "query",
            "description": "Appointment creation date starting from(filter by appointment creation date). If you need appointments created since a specific date",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21"
          },
          {
            "name": "c_end_date",
            "in": "query",
            "description": "Appointment creation date by (filter by appointment creation date).",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21"
          },
          {
            "name": "changed_after",
            "in": "query",
            "description": "The date the appointment was modified/created. If you need appointments created/modified starting from a specific date and time",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21T23:00:00"
          },
          {
            "name": "changed_before",
            "in": "query",
            "description": "The date the appointment was modified/created. If you need appointments created/modified before a specific date and time",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-21T23:00:00"
          },
          {
            "name": "include_consumables",
            "in": "query",
            "description": "Flag for including a list of consumables by appointments in the response",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "include_finance_transactions",
            "in": "query",
            "description": "Flag to include in the response financial transactions by appointments",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "with_deleted",
            "in": "query",
            "description": "Include deleted appointments in output (with_deleted=1 will return deleted appointments as well)",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/records_companyid_response_data-types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 2,
                      "company_id": 4564,
                      "staff_id": 9,
                      "services": [
                        {
                          "id": 1,
                          "title": "Hair extension",
                          "cost": 100,
                          "manual_cost": 100,
                          "cost_per_unit": 100,
                          "discount": 0,
                          "first_cost": 100,
                          "amount": 1
                        }
                      ],
                      "goods_transactions": [],
                      "staff": {
                        "id": 9,
                        "name": "Alex Taylor",
                        "specialization": "hair extension",
                        "position": {
                          "id": 1,
                          "title": "Administrator"
                        },
                        "avatar": "http://app.alteg.io/images/no-master-sm.png",
                        "avatar_big": "http://app.alteg.io/images/no-master.png",
                        "rating": 0,
                        "votes_count": 0
                      },
                      "date": "2026-01-16T16:00:00-05:00",
                      "datetime": "2026-01-16T16:00:00-05:00",
                      "create_date": "2026-01-16T20:35:11-0500",
                      "comment": "do not write down",
                      "online": false,
                      "visit_attendance": 0,
                      "attendance": 0,
                      "confirmed": 1,
                      "seance_length": 3600,
                      "length": 3600,
                      "sms_before": 0,
                      "sms_now": 0,
                      "sms_now_text": "",
                      "email_now": 0,
                      "notified": 0,
                      "master_request": 0,
                      "api_id": "",
                      "from_url": "",
                      "review_requested": 0,
                      "visit_id": 8262996,
                      "created_user_id": 1073232,
                      "deleted": false,
                      "paid_full": 0,
                      "prepaid": false,
                      "prepaid_confirmed": false,
                      "last_change_date": "2026-01-16T20:35:15-0500",
                      "custom_color": "",
                      "custom_font_color": "",
                      "record_labels": [],
                      "activity_id": 0,
                      "custom_fields": [],
                      "documents": [
                        {
                          "id": 8172893,
                          "type_id": 7,
                          "storage_id": 0,
                          "user_id": 746310,
                          "company_id": 4564,
                          "number": 4163,
                          "comment": "",
                          "date_created": "2026-01-16 16:00:00",
                          "category_id": 0,
                          "visit_id": 3,
                          "record_id": 2,
                          "type_title": "Visit"
                        }
                      ],
                      "sms_remain_hours": 5,
                      "email_remain_hours": 1,
                      "bookform_id": 0,
                      "record_from": "",
                      "is_mobile": 0,
                      "is_sale_bill_printed": false,
                      "consumables": [],
                      "finance_transactions": []
                    },
                    {
                      "id": 9,
                      "company_id": 4564,
                      "staff_id": 49,
                      "services": [],
                      "goods_transactions": [],
                      "staff": {
                        "id": 49,
                        "name": "Sam Carter",
                        "specialization": "stylist",
                        "position": {
                          "id": 1,
                          "title": "Administrator"
                        },
                        "avatar": "http://app.alteg.io/images/no-master-sm.png",
                        "avatar_big": "http://app.alteg.io/images/no-master.png",
                        "rating": 0,
                        "votes_count": 0
                      },
                      "date": "2026-01-16T16:00:00-05:00",
                      "datetime": "2026-01-16T16:00:00-05:00",
                      "create_date": "2026-01-16T20:35:11-0500",
                      "comment": "",
                      "online": true,
                      "visit_attendance": 1,
                      "attendance": 1,
                      "confirmed": 1,
                      "seance_length": 10800,
                      "length": 10800,
                      "sms_before": 0,
                      "sms_now": 0,
                      "sms_now_text": "",
                      "email_now": 0,
                      "notified": 0,
                      "master_request": 1,
                      "api_id": "",
                      "from_url": "",
                      "review_requested": 0,
                      "visit_id": 8262996,
                      "created_user_id": 1073232,
                      "deleted": false,
                      "paid_full": 0,
                      "prepaid": false,
                      "prepaid_confirmed": false,
                      "last_change_date": "2026-01-09T20:45:30-0500",
                      "custom_color": "f44336",
                      "custom_font_color": "#ffffff",
                      "record_labels": [
                        {
                          "id": 67345,
                          "title": "the team member is not important",
                          "color": "#009800",
                          "icon": "unlock",
                          "font_color": "#ffffff"
                        },
                        {
                          "id": 104474,
                          "title": "important category",
                          "color": "#3b2c54",
                          "icon": "star",
                          "font_color": "#ffffff"
                        }
                      ],
                      "activity_id": 0,
                      "custom_fields": [],
                      "documents": [
                        {
                          "id": 8172893,
                          "type_id": 7,
                          "storage_id": 0,
                          "user_id": 746310,
                          "company_id": 4564,
                          "number": 4163,
                          "comment": "",
                          "date_created": "2026-01-16 16:00:00",
                          "category_id": 0,
                          "visit_id": 3,
                          "record_id": 2,
                          "type_title": "Visit"
                        }
                      ],
                      "sms_remain_hours": 5,
                      "email_remain_hours": 1,
                      "bookform_id": 0,
                      "record_from": "",
                      "is_mobile": 0,
                      "is_sale_bill_printed": false,
                      "consumables": [],
                      "finance_transactions": []
                    }
                  ],
                  "meta": {
                    "page": 1,
                    "total_count": 10
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a New Appointment",
        "description": "Creates a standard Appointment or an Appointment in a Group Event.\n\nFor a standard Appointment, `staff_id`, `services`, `client`, `datetime`, and\n`seance_length` are required.\n\nFor a Group Event Appointment, `activity_id` and `client` are required. The API\nobtains `staff_id`, `services`, `datetime`, and `seance_length` from the Group Event.\n\nTo set custom Appointment Fields, pass an object in `custom_fields`, with each key\nmatching a field code configured for the Location. The Business User must have both\n`custom_fields_record_values_read_access` and\n`custom_fields_record_values_edit_access`.\n",
        "operationId": "create_appointment",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 24699
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/records_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/records_companyid_response_data-types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 2,
                      "company_id": 4564,
                      "staff_id": 9,
                      "services": [
                        {
                          "id": 1,
                          "title": "Hair extension",
                          "cost": 100,
                          "manual_cost": 100,
                          "cost_per_unit": 100,
                          "discount": 0,
                          "first_cost": 100,
                          "amount": 1
                        }
                      ],
                      "goods_transactions": [],
                      "staff": {
                        "id": 9,
                        "name": "Alex Taylor",
                        "specialization": "hair extension",
                        "position": {
                          "id": 1,
                          "title": "Administrator"
                        },
                        "avatar": "http://app.alteg.io/images/no-master-sm.png",
                        "avatar_big": "http://app.alteg.io/images/no-master.png",
                        "rating": 0,
                        "votes_count": 0
                      },
                      "date": "2026-01-21T02:45:00-05:00",
                      "datetime": "2026-01-21T02:45:00-05:00",
                      "create_date": "2026-07-02T05:47:36-05:00",
                      "comment": "do not write down",
                      "online": false,
                      "visit_attendance": 0,
                      "attendance": 0,
                      "confirmed": 1,
                      "seance_length": 3600,
                      "length": 3600,
                      "sms_before": 0,
                      "sms_now": 0,
                      "sms_now_text": "",
                      "email_now": 0,
                      "notified": 0,
                      "master_request": 0,
                      "api_id": "",
                      "from_url": "",
                      "review_requested": 0,
                      "visit_id": 8262996,
                      "created_user_id": 1073232,
                      "deleted": false,
                      "paid_full": 0,
                      "prepaid": false,
                      "prepaid_confirmed": false,
                      "last_change_date": "2026-01-16T20:35:15-0500",
                      "custom_color": "",
                      "custom_font_color": "",
                      "record_labels": [],
                      "activity_id": 0,
                      "custom_fields": [],
                      "documents": [
                        {
                          "id": 8172893,
                          "type_id": 7,
                          "storage_id": 0,
                          "user_id": 746310,
                          "company_id": 4564,
                          "number": 4163,
                          "comment": "",
                          "date_created": "2026-09-21T23:00:00.000-05:00",
                          "category_id": 0,
                          "visit_id": 3,
                          "record_id": 2,
                          "type_title": "Visit"
                        }
                      ],
                      "consumables": [],
                      "finance_transactions": []
                    },
                    {
                      "id": 9,
                      "company_id": 4564,
                      "staff_id": 49,
                      "services": [],
                      "goods_transactions": [],
                      "staff": {
                        "id": 49,
                        "name": "Sam Carter",
                        "specialization": "stylist",
                        "position": {
                          "id": 1,
                          "title": "Administrator"
                        },
                        "avatar": "http://app.alteg.io/images/no-master-sm.png",
                        "avatar_big": "http://app.alteg.io/images/no-master.png",
                        "rating": 0,
                        "votes_count": 0
                      },
                      "date": "2026-01-21T02:45:00-05:00",
                      "datetime": "2026-01-21T02:45:00-05:00",
                      "create_date": "2026-07-02T05:47:36-05:00",
                      "comment": "",
                      "online": true,
                      "visit_attendance": 1,
                      "attendance": 1,
                      "confirmed": 1,
                      "seance_length": 10800,
                      "length": 10800,
                      "sms_before": 0,
                      "sms_now": 0,
                      "sms_now_text": "",
                      "email_now": 0,
                      "notified": 0,
                      "master_request": 1,
                      "api_id": "",
                      "from_url": "",
                      "review_requested": 0,
                      "visit_id": 8262996,
                      "created_user_id": 1073232,
                      "deleted": false,
                      "paid_full": 0,
                      "prepaid": false,
                      "prepaid_confirmed": false,
                      "last_change_date": "2026-01-09T20:45:30-0500",
                      "custom_color": "f44336",
                      "custom_font_color": "#ffffff",
                      "record_labels": [
                        {
                          "id": 67345,
                          "title": "the team member is not important",
                          "color": "#009800",
                          "icon": "unlock",
                          "font_color": "#ffffff"
                        },
                        {
                          "id": 104474,
                          "title": "important category",
                          "color": "#3b2c54",
                          "icon": "star",
                          "font_color": "#ffffff"
                        }
                      ],
                      "activity_id": 0,
                      "custom_fields": [],
                      "documents": [
                        {
                          "id": 8172893,
                          "type_id": 7,
                          "storage_id": 0,
                          "user_id": 746310,
                          "company_id": 4564,
                          "number": 4163,
                          "comment": "",
                          "date_created": "2026-09-21T23:00:00.000-05:00",
                          "category_id": 0,
                          "visit_id": 3,
                          "record_id": 2,
                          "type_title": "Visit"
                        }
                      ],
                      "consumables": [],
                      "finance_transactions": []
                    }
                  ],
                  "meta": {
                    "page": 1,
                    "total_count": 10
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Required request data is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/record/{location_id}/{record_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get an Appointment",
        "operationId": "get_appointment",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "include_consumables",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "include_finance_transactions",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/record_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 2,
                    "company_id": 4564,
                    "staff_id": 9,
                    "services": [
                      {
                        "id": 1,
                        "title": "Hair extension",
                        "cost": 100,
                        "manual_cost": 100,
                        "cost_per_unit": 100,
                        "discount": 0,
                        "first_cost": 100,
                        "amount": 1
                      }
                    ],
                    "goods_transactions": [],
                    "staff": {
                      "id": 9,
                      "name": "Alex Taylor",
                      "specialization": "hair extension",
                      "position": {
                        "id": 1,
                        "title": "Administrator"
                      },
                      "avatar": "http://app.alteg.io/images/no-master-sm.png",
                      "avatar_big": "http://app.alteg.io/images/no-master.png",
                      "rating": 0,
                      "votes_count": 0
                    },
                    "client": {
                      "id": 18936825,
                      "name": "lx",
                      "phone": 13155550175,
                      "card": "",
                      "email": "client@example.com",
                      "success_visits_count": 37,
                      "fail_visits_count": 3
                    },
                    "clients_count": 1,
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "datetime": "2026-09-21T23:00:00.000-05:00",
                    "create_date": "2026-01-17T19:41:44-0500",
                    "comment": "do not write down",
                    "visit_attendance": 0,
                    "attendance": 0,
                    "confirmed": 1,
                    "seance_length": 3600,
                    "length": 3600,
                    "sms_before": 0,
                    "sms_now": 0,
                    "sms_now_text": "",
                    "email_now": 0,
                    "notified": 0,
                    "master_request": 0,
                    "api_id": "",
                    "from_url": "",
                    "review_requested": 0,
                    "visit_id": 8263004,
                    "created_user_id": 1073232,
                    "deleted": false,
                    "paid_full": 0,
                    "prepaid": false,
                    "prepaid_confirmed": false,
                    "last_change_date": "2026-01-17T19:44:14-0500",
                    "custom_color": "f44336",
                    "custom_font_color": "#ffffff",
                    "record_labels": [
                      {
                        "id": 67345,
                        "title": "the team member is not important",
                        "color": "#009800",
                        "icon": "unlock",
                        "font_color": "#ffffff"
                      },
                      {
                        "id": 104474,
                        "title": "interesting category",
                        "color": "#3b2c54",
                        "icon": "star",
                        "font_color": "#ffffff"
                      }
                    ],
                    "activity_id": 0,
                    "custom_fields": [],
                    "documents": [
                      {
                        "id": 8172893,
                        "type_id": 7,
                        "storage_id": 0,
                        "user_id": 1073232,
                        "company_id": 4564,
                        "number": 4163,
                        "comment": "",
                        "date_created": "2026-09-21T23:00:00.000-05:00",
                        "category_id": 0,
                        "visit_id": 3,
                        "record_id": 2,
                        "type_title": "Visit"
                      }
                    ],
                    "sms_remain_hours": 5,
                    "email_remain_hours": 1,
                    "bookform_id": 0,
                    "record_from": "",
                    "is_mobile": 0,
                    "is_sale_bill_printed": false,
                    "consumables": [
                      {
                        "id": 2173068,
                        "document_id": 8174153,
                        "type_id": 2,
                        "company_id": 4564,
                        "good_id": 4853087,
                        "amount": -1,
                        "cost_per_unit": 0.03,
                        "discount": 0,
                        "cost": 0.03,
                        "unit_id": 216761,
                        "operation_unit_type": 2,
                        "storage_id": 91548,
                        "supplier_id": 0,
                        "client_id": 0,
                        "master_id": 0,
                        "create_date": "2026-09-21T23:00:00.000-05:00",
                        "comment": "",
                        "service_id": 1,
                        "user_id": 1073232,
                        "deleted": false,
                        "pkg_amount": 0
                      }
                    ],
                    "finance_transactions": [
                      {
                        "id": 6024243,
                        "document_id": 8174152,
                        "date": "2026-09-21T23:00:00.000-05:00",
                        "type_id": 5,
                        "expense_id": 5,
                        "account_id": 90459,
                        "amount": 100,
                        "client_id": 18936825,
                        "master_id": 0,
                        "supplier_id": 0,
                        "comment": "",
                        "item_id": 1,
                        "target_type_id": 1,
                        "record_id": 2,
                        "goods_transaction_id": 0,
                        "expense": {
                          "id": 5,
                          "title": "Provision of services"
                        },
                        "account": {
                          "id": 90459,
                          "title": "Main location account"
                        },
                        "client": {
                          "id": 18936825,
                          "name": "James Smith",
                          "phone": "+13155550175"
                        },
                        "master": [],
                        "supplier": []
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit Appointment",
        "description": "Fully updates an Appointment. This is not a partial update: for a standard Appointment,\nresend `staff_id`, `services`, `client`, `datetime`, and `seance_length`, including when\nonly `custom_fields` needs to change. A missing required field returns `422`.\n\nFor a Group Event Appointment, send `activity_id` and `client`. The `activity_id` must\nmatch the Appointment's current Group Event. The API obtains `staff_id`, `services`,\n`datetime`, and `seance_length` from that Group Event.\n\n### Updating only custom fields\n\n1. Get the current Appointment.\n2. Copy the required main fields into this request without changing them.\n3. Add the new values to `custom_fields`, using each configured field code as a key.\n\nThe Business User must have both `custom_fields_record_values_read_access` and\n`custom_fields_record_values_edit_access`. Without both permissions, custom Appointment\nField values are not updated.\n\n### Editing restrictions\n\nThe request can be rejected when the Appointment is waiting for online payment, lies\noutside the Business User's allowed editing period, is fully paid, or has an arrived\nclient and the Business User lacks the corresponding edit permission.\n\nIf `is_sale_bill_printed` is `true`, keep the resent date, time, client, attendance status,\nTeam Member, and Services unchanged when updating only custom fields. Changes covered by\nthe printed receipt can require reversing the receipt first.\n",
        "operationId": "update_appointment",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "include_consumables",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "include_finance_transactions",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/records_companyid_request_data_types"
              },
              "examples": {
                "update_custom_fields": {
                  "summary": "Update custom fields on a standard Appointment",
                  "value": {
                    "staff_id": 8886,
                    "services": [
                      {
                        "id": 331,
                        "first_cost": 9000,
                        "discount": 50,
                        "cost": 4500
                      }
                    ],
                    "client": {
                      "phone": "+13155550175",
                      "name": "James Smith",
                      "email": "j.smith@example.com"
                    },
                    "datetime": "2026-09-21T23:00:00.000-05:00",
                    "seance_length": 3600,
                    "custom_fields": {
                      "my_custom_field": 123,
                      "some_another_field": [
                        "first value",
                        "second value"
                      ]
                    }
                  }
                },
                "update_group_event_custom_fields": {
                  "summary": "Update custom fields on a Group Event Appointment",
                  "value": {
                    "activity_id": 456789,
                    "client": {
                      "phone": "+13155550175",
                      "name": "James Smith",
                      "email": "j.smith@example.com"
                    },
                    "custom_fields": {
                      "my_custom_field": 123
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/record_companyid_response201_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 999,
                    "services": [
                      {
                        "id": 331,
                        "first_cost": 9000,
                        "discount": 50,
                        "cost": 4500
                      },
                      {
                        "id": 333,
                        "first_cost": 2000,
                        "discount": 10,
                        "cost": 1800
                      }
                    ],
                    "client": {
                      "phone": "+13155550175",
                      "name": "James Smith",
                      "email": "j.smith@example.com"
                    },
                    "clients_count": 1,
                    "staff": {
                      "id": 8886,
                      "name": "Jack",
                      "spec": "stylist"
                    },
                    "datetime": "2026-09-21T23:00:00.000-05:00",
                    "seance_length": 3600,
                    "create_date": "2026-09-21T23:00:00.000-05:00",
                    "comment": "test appointment!",
                    "visit_attendance": 1,
                    "confirmed": 1,
                    "sms_before": 6,
                    "sms_now": 1,
                    "sms_now_text": "",
                    "email_now": 1,
                    "notified": 0,
                    "master_request": 1,
                    "api_id": "",
                    "from_url": "",
                    "review_requested": 0,
                    "activity_id": 0,
                    "documents": [
                      {
                        "id": 8172893,
                        "type_id": 7,
                        "storage_id": 0,
                        "user_id": 746310,
                        "company_id": 4564,
                        "number": 4163,
                        "comment": "",
                        "date_created": "2026-09-21T23:00:00.000-05:00",
                        "category_id": 0,
                        "visit_id": 3,
                        "record_id": 2,
                        "type_title": "Visit"
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Appointment is waiting for online payment or the request format is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_bad_request_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Business User does not have permission to edit this Appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Required request data is missing or invalid, or the requested change is not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Appointment",
        "operationId": "delete_appointment",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "include_consumables",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "include_finance_transactions",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/records/partner": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Partner Appointments",
        "description": "#### Filtering appointments\n\n+ salon_id: Location ID \n\nUse this to filter appointments for a specific location\n\n+ start_date: Visit date from \n\nFilters appointments with a visit date starting from the specified date (inclusive)\n\n+ end_date: Visit date until \n\nFilters appointments with a visit date up to the specified date (inclusive)\n\n+ created_start_date: Appointment creation date from \n\nFilters appointments created on or after this date\n\n+ created_end_date: Appointment creation date until \n\nReturns appointments created on or before this date\n\n+ user_id: User ID \n\nFilters appointments created by a specific user",
        "operationId": "get_partner_appointment_list",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "editable_length",
            "in": "query",
            "description": "Number of appointments per page, maximum 100",
            "schema": {
              "type": "number"
            },
            "example": 50
          },
          {
            "name": "salon_id",
            "in": "query",
            "description": "Location ID",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Filter by visit date from",
            "schema": {
              "type": "string"
            },
            "example": "'17.01.2025'"
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Filter by visit date by",
            "schema": {
              "type": "string"
            },
            "example": "'17.01.2025'"
          },
          {
            "name": "created_start_date",
            "in": "query",
            "description": "Filter by appointment creation date from",
            "schema": {
              "type": "string"
            },
            "example": "'17.01.2025'"
          },
          {
            "name": "created_end_date",
            "in": "query",
            "description": "Filter by appointment creation date by",
            "schema": {
              "type": "string"
            },
            "example": "'17.01.2025'"
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "User ID",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "datetime": "2026-11-17T00:00:00-0500",
                      "create_date": "2026-11-17T16:08:08-0500",
                      "comment": "",
                      "deleted": false,
                      "attendance": 0,
                      "length": 3600,
                      "notify_by_sms": 1,
                      "notify_by_email": 12,
                      "master_requested": true,
                      "online": false,
                      "api_id": 42,
                      "last_change_date": "2026-11-18T16:58:59-0500",
                      "prepaid": 0,
                      "prepaid_confirmed": 0,
                      "activity_id": 0,
                      "services": [
                        {
                          "id": 1,
                          "title": "beard trim",
                          "cost": 100,
                          "price_min": 500,
                          "price_max": 1500,
                          "discount": 0,
                          "amount": 1
                        }
                      ],
                      "company": {
                        "id": 1,
                        "title": "Business Example",
                        "public_title": "Business Example",
                        "business_group_id": 1,
                        "business_type_id": 1,
                        "country_id": 7,
                        "city_id": 1,
                        "timezone": "-5",
                        "timezone_name": "America/New_York",
                        "address": "New York, 787 Jackson Drive",
                        "coordinate_lat": 40.73061,
                        "coordinate_lon": -73.935242,
                        "logo": "http://app.alteg.io/images/icon.png",
                        "zip": "0",
                        "phone": "",
                        "phones": [],
                        "site": "www.example.com",
                        "allow_delete_record": true,
                        "allow_change_record": true,
                        "country": "United States",
                        "city": "New York"
                      },
                      "staff": {
                        "id": 1,
                        "name": "James Smith",
                        "company_id": 1,
                        "specialization": "Barber",
                        "position": [],
                        "rating": 0,
                        "show_rating": true,
                        "comments_count": 0,
                        "votes_count": 0,
                        "average_score": 0,
                        "avatar": "http://app.alteg.io/images/no-master-sm.png",
                        "prepaid": "forbidden"
                      },
                      "client": {
                        "id": 1,
                        "name": "James Smith",
                        "phone": "+13155550175",
                        "phone_code": "1",
                        "email": "j.smith@example.com"
                      },
                      "custom_fields": {
                        "dop-telephone": "+13155550175"
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/visits/{visit_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a visit",
        "operationId": "get_visit",
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visits_visitid_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "attendance": 1,
                    "datetime": "2026-09-21T23:00:00.000-05:00",
                    "comment": 0,
                    "records": [
                      {
                        "id": 37955315,
                        "company_id": 4564,
                        "staff_id": 55436,
                        "services": [],
                        "events": [],
                        "goods_transactions": [],
                        "staff": {
                          "id": 55436,
                          "name": "Kevin Spacey",
                          "specialization": "Manicure and pedicure",
                          "position": {
                            "id": 1,
                            "title": "Administrator"
                          },
                          "avatar": "https://app.alteg.io/uploads/masters/sm/b/bb/bb59d4cc17d9b16_20171215174158.png",
                          "avatar_big": "https://app.alteg.io/uploads/masters/origin/c/cf/cfb8c5cee58000b_20171215174158.png",
                          "rating": 4.89,
                          "votes_count": 0
                        },
                        "client": {
                          "id": 4240788,
                          "name": "dev1",
                          "phone": 13155550175,
                          "card": 415,
                          "email": "",
                          "success_visits_count": 58,
                          "fail_visits_count": 9
                        },
                        "date": "2026-09-21T23:00:00.000-05:00",
                        "datetime": "2026-09-21T23:00:00.000-05:00",
                        "create_date": "2026-03-22T17:55:14-05:00",
                        "comment": "",
                        "online": false,
                        "visit_attendance": 1,
                        "attendance": 1,
                        "confirmed": 1,
                        "seance_length": 3600,
                        "length": 3600,
                        "sms_before": 1,
                        "sms_now": 1,
                        "sms_now_text": "",
                        "email_now": 1,
                        "notified": 0,
                        "master_request": 0,
                        "api_id": 0,
                        "from_url": "",
                        "review_requested": 0,
                        "visit_id": 8260852,
                        "created_user_id": 999290,
                        "deleted": 0,
                        "paid_full": 0,
                        "prepaid": 0,
                        "prepaid_confirmed": 0,
                        "last_change_date": "2026-03-28T17:46:48-05:00",
                        "custom_color": "",
                        "custom_font_color": "",
                        "record_labels": [],
                        "activity_id": 0,
                        "custom_fields": [],
                        "documents": [
                          {
                            "id": 8172893,
                            "type_id": 7,
                            "storage_id": 0,
                            "user_id": 746310,
                            "company_id": 4564,
                            "number": 4163,
                            "comment": "",
                            "date_created": "2026-09-21T23:00:00.000-05:00",
                            "category_id": 0,
                            "visit_id": 3,
                            "record_id": 2,
                            "type_title": "Visit"
                          }
                        ]
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/visit/details/{location_id}/{record_id}/{visit_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Visit Details",
        "description": "**Block \"kkm_transaction_details_container\"**\n\nFlag \"last_operation_type\"\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 | Print return receipt |\n| 1 | Print sales receipt |\n\nTypes of all transactions with location account\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 |  Sales operation – Active for documents of type Visit |\n| 1 | Sale return operation – Active for documents of type Visit |\n| 2 | Correction operation |\n| 4 | Shift opening operation – Opens a new POS shift |\n| 5 | Shift closing operation – Closes the current POS shift |\n| 9 | Get POS status – Retrieves the current status of the POS device |\n| 11 | Get POS team status – Retrieves the status of all POS devices connected to the team |\n| 12 | Correction operation |\n| 13 | Print X-report – Prints a non-fiscal summary report of the current shift |\n| 6 | Cash deposit – Registers a cash-in transaction in the POS |\n| 7 | Cash withdrawal – Registers a cash-out transaction in the POS |\n\nStatuses of All POS Operations\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 |  Connection error with POS – Unable to establish a connection with the POS device |\n| 1 |  Success – Operation completed successfully |\n| 2 | Sent for printing – The request has been sent to the POS and is waiting for print completion |\n| 3 | Runtime error – An error occurred while processing the operation on the POS device |\n| 4 | Status check error – Failed to retrieve the current status of the POS |\n| 5 | Waiting for POS readiness – Operation is pending until the POS device becomes ready |\n\nDocument Types\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 1 | Sale of products |\n| 2 | Provision of services |\n| 3 | Arrival of products |\n| 4 | Products write-off |\n| 5 | Transfer of products |\n| 6 | Inventory |\n| 7 | Visit |\n| 8 | Consumables write-off |",
        "operationId": "get_visit_details",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          },
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 67890
          },
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 11111
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer access_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_details_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "payment_transactions": [
                      {
                        "id": 6023813,
                        "document_id": 8172806,
                        "date": "2026-09-21T23:00:00.000-05:00",
                        "type_id": 5,
                        "expense_id": 5,
                        "account_id": 32299,
                        "amount": 10,
                        "client_id": 4241492,
                        "master_id": 0,
                        "supplier_id": 0,
                        "comment": "",
                        "item_id": 1162679,
                        "target_type_id": 1,
                        "record_id": 13136569,
                        "goods_transaction_id": 0,
                        "expense": {
                          "id": 5,
                          "title": "Provision of services"
                        },
                        "account": {
                          "id": 32299,
                          "title": "Deposits (payment in cash)"
                        },
                        "client": {
                          "id": 4241492,
                          "name": "ModulKassaClient",
                          "phone": "+13155550175"
                        },
                        "master": [],
                        "supplier": []
                      }
                    ],
                    "loyalty_transactions": [
                      {
                        "id": 10614,
                        "status_id": 1,
                        "amount": 0.5,
                        "type_id": 2,
                        "program_id": 145,
                        "card_id": 20013,
                        "salon_group_id": 646,
                        "item_id": 0,
                        "item_type_id": 0,
                        "item_record_id": 0,
                        "goods_transaction_id": 0,
                        "is_discount": false,
                        "is_loyalty_withdraw": false,
                        "type": {
                          "id": 2,
                          "title": "Loyalty programs"
                        }
                      }
                    ],
                    "kkm_transaction_details_container": {
                      "last_operation_type": 0,
                      "transactions": [
                        {
                          "id": 1047,
                          "print_date": "2026-09-21T23:00:00.000-05:00",
                          "printed_count": 1,
                          "sum": 13,
                          "type": {
                            "id": 0,
                            "title": "Sale operation"
                          },
                          "status": {
                            "id": 1,
                            "title": "Successfully"
                          },
                          "document": {
                            "id": 2045,
                            "type": 7,
                            "type_title": "Visit"
                          },
                          "cashier": {
                            "id": 746310,
                            "name": "Jack Smith"
                          }
                        }
                      ]
                    },
                    "items": [
                      {
                        "id": 0,
                        "item_id": 1162679,
                        "item_type_id": 1,
                        "record_id": 13136569,
                        "item_title": "Haircut at the TOP-specialist",
                        "amount": 2,
                        "first_cost": 20,
                        "manual_cost": 10,
                        "discount": 50,
                        "cost": 10,
                        "master_id": 13136569,
                        "good_id": 0,
                        "service_id": 1162679,
                        "event_id": 0,
                        "is_service": true,
                        "is_event": false,
                        "is_good": false
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/visits/{visit_id}/{record_id}": {
      "put": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit Visit",
        "operationId": "update_visit",
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          },
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 67890
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/visits_visitid_recordid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/attendance/receipt_print/{visit_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Receipt PDF for the visit",
        "operationId": "get_visit_receipt_pdf",
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "example": ""
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/comments/{location_id}": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get comments",
        "description": "The comment object has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| id | number | Comment ID |\r\n| salon_id | number | location ID |\r\n| type | number | 1 - comment to the team member, 0 - to the location |\r\n| master_id | number | Team Member ID if type = 1 |\r\n| text | string | Comment text |\r\n| date | string | Date when the comment was left |\r\n| rating | number | Rating (from 1 to 5) |\r\n| user_id | number | Id of the user who left the comment |\r\n| username | string | Name of the user who left the comment |\r\n| user_avatar | string | Avatar of the user who left the comment |\r\n| record_id | number | ID of the post after which the review was left (the value will be non-zero if the review was left through a link asking for a review after the visit) |",
        "operationId": "get_comments",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "date in iso8601 format.\nFilter by date since (for example '2026-09-30')\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "date in iso8601 format.\nFilter by date by (for example '2026-09-30')\n",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "team member ID",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "rating",
            "in": "query",
            "description": "Rating score. Filter by reviews with a specific rating.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of reviews per page",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/comments_companyid_ressponse200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 18437,
                      "type": 1,
                      "master_id": 8864,
                      "text": "Fine!",
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "rating": 4,
                      "user_id": 157169,
                      "user_name": "Victor Sitnikov",
                      "user_avatar": "/images/no-master.png",
                      "record_id": 100001
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/comments/{location_id}/{team_member_id}": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Leave a Comment",
        "operationId": "leave_comment",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID, specify when creating a review for a team member",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/comments_companyid_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/comments_companyid_ressponse200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "type": 1,
                    "master_id": 8864,
                    "id": 18437,
                    "text": "Everything is very bad!",
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "rating": 4,
                    "user_id": 157169,
                    "user_name": "Victor",
                    "user_avatar": "/images/no-master.png"
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/activity/{location_id}/search": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Search Events",
        "operationId": "search_events",
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/from"
          },
          {
            "$ref": "#/components/parameters/till"
          },
          {
            "$ref": "#/components/parameters/service_ids"
          },
          {
            "$ref": "#/components/parameters/staff_ids"
          },
          {
            "$ref": "#/components/parameters/resource_ids"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/count"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_search_response"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 3480140,
                      "service_id": 5243360,
                      "company_id": 68570,
                      "staff_id": 921105,
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "length": 3600,
                      "capacity": 40,
                      "records_count": 0,
                      "color": "",
                      "instructions": "",
                      "stream_link": "",
                      "font_color": "",
                      "notified": false,
                      "prepaid": "forbidden",
                      "service": {
                        "id": 5243360,
                        "category_id": 5092305,
                        "title": "Lecture on psychoanalysis",
                        "price_min": 500,
                        "price_max": 500,
                        "comment": "Not",
                        "image_url": "",
                        "salon_service_id": 5792535,
                        "prepaid": "forbidden",
                        "category": {
                          "id": 5092305,
                          "category_id": 1,
                          "title": "Psychoanalysis"
                        }
                      },
                      "staff": {
                        "id": 921105,
                        "name": "Natalie",
                        "company_id": 68570,
                        "specialization": "Psychotherapist",
                        "rating": 4.57,
                        "show_rating": false,
                        "avatar": "https://app.alteg.io/images/no-master-sm.png",
                        "avatar_big": "https://app.alteg.io/images/no-master-sm.png",
                        "comments_count": 7,
                        "votes_count": 0,
                        "average_score": 4.57,
                        "prepaid": "forbidden",
                        "position": {
                          "id": 123340,
                          "title": "Psychotherapist"
                        }
                      },
                      "resource_instances": [
                        {
                          "id": 83030,
                          "title": "Psychotherapist's office. #one",
                          "resource_id": 34895
                        }
                      ],
                      "labels": []
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}/search_dates": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Search Event Dates",
        "operationId": "search_event_dates",
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/from"
          },
          {
            "$ref": "#/components/parameters/till"
          },
          {
            "$ref": "#/components/parameters/service_ids"
          },
          {
            "$ref": "#/components/parameters/staff_ids"
          },
          {
            "$ref": "#/components/parameters/resource_ids"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    "2026-06-01",
                    "2026-06-02",
                    "2026-06-08",
                    "2026-07-04",
                    "2026-07-15"
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}/search_dates_range": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get Event Date Range",
        "operationId": "get_event_date_range",
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/service_ids"
          },
          {
            "$ref": "#/components/parameters/staff_ids"
          },
          {
            "$ref": "#/components/parameters/resource_ids"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/event_dates_range"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "min_date": "2026-06-01",
                    "max_date": "2026-07-15"
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}/filters": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get Event Search Filters",
        "operationId": "get_event_search_filters",
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/service_ids"
          },
          {
            "$ref": "#/components/parameters/staff_ids"
          },
          {
            "$ref": "#/components/parameters/resource_ids"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/event_filter"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "code": "staff",
                      "title": "Team Member",
                      "data": [
                        {
                          "id": 1,
                          "title": "Team Member 1",
                          "is_disabled": true
                        },
                        {
                          "id": 2,
                          "title": "Team Member 2",
                          "is_disabled": false
                        }
                      ]
                    },
                    {
                      "code": "service",
                      "title": "Service",
                      "data": [
                        {
                          "id": 1,
                          "title": "Service 1",
                          "is_disabled": true
                        },
                        {
                          "id": 2,
                          "title": "Service 2",
                          "is_disabled": false
                        }
                      ]
                    },
                    {
                      "code": "resource",
                      "title": "Resource",
                      "data": [
                        {
                          "id": 1,
                          "title": "Resource 1",
                          "is_disabled": true
                        },
                        {
                          "id": 2,
                          "title": "Resource 2",
                          "is_disabled": false
                        }
                      ]
                    },
                    {
                      "code": "service_category",
                      "title": "Service category",
                      "data": [
                        {
                          "id": 1,
                          "title": "Category 1",
                          "is_disabled": true
                        },
                        {
                          "id": 2,
                          "title": "Category 2",
                          "is_disabled": false
                        }
                      ]
                    }
                  ],
                  "meta": {
                    "count": 4
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}/{event_id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Get Event",
        "description": "**This endpoint is deprecated.** Use `GET /v2/locations/{location_id}/events/{event_id}` instead.\n\n**Migration:** The V2 Events API provides JSON:API formatted responses. See operation `get_event` for details.\n",
        "operationId": "get_event",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_response"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 108,
                    "salon_id": 4564,
                    "service_id": 1185299,
                    "staff_id": 26427,
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "length": 3600,
                    "capacity": 9,
                    "records_count": 0,
                    "color": "",
                    "font_color": "",
                    "service": {
                      "id": 1185299,
                      "title": "Group manicure",
                      "category_id": 754917
                    },
                    "staff": {
                      "id": 26427,
                      "name": "Monica Bellucci",
                      "company_id": 4564
                    },
                    "resource_instances": [
                      {
                        "id": 3127,
                        "title": "Manicure machine #1",
                        "resource_id": 1364
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Update Event",
        "description": "**This endpoint is deprecated.** Use `PUT /v2/locations/{location_id}/events/{event_id}` instead.\n\n**Migration:** The V2 Events API provides enhanced validation and JSON:API formatted responses. See operation `update_event` for details.\n",
        "operationId": "update_event",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_response"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 108,
                    "salon_id": 4564,
                    "service_id": 1185299,
                    "staff_id": 26427,
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "length": 3600,
                    "capacity": 9,
                    "records_count": 0,
                    "color": "",
                    "font_color": "",
                    "service": {
                      "id": 1185299,
                      "title": "Group manicure",
                      "category_id": 754917
                    },
                    "staff": {
                      "id": 26427,
                      "name": "Monica Bellucci",
                      "company_id": 4564
                    },
                    "resource_instances": [
                      {
                        "id": 3127,
                        "title": "Manicure machine #1",
                        "resource_id": 1364
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_bad_request_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Delete Event",
        "description": "**This endpoint is deprecated.** Use `DELETE /v2/locations/{location_id}/events/{event_id}` instead.\n\n**Migration:** The V2 Events API provides JSON:API formatted responses. See operation `delete_event` for details.\n",
        "operationId": "delete_event",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}": {
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Deprecated. Create Event",
        "description": "**This endpoint is deprecated.** Use `POST /v2/locations/{location_id}/events` instead.\n\n**Migration:** The V2 Events API provides enhanced validation, better error handling, and JSON:API format responses. See operation `create_event` for details.\n",
        "operationId": "create_event",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_response"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 108,
                    "salon_id": 4564,
                    "service_id": 1185299,
                    "staff_id": 26427,
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "length": 3600,
                    "capacity": 9,
                    "records_count": 0,
                    "color": "",
                    "font_color": "",
                    "service": {
                      "id": 1185299,
                      "title": "Group manicure",
                      "category_id": 754917
                    },
                    "staff": {
                      "id": 26427,
                      "name": "Monica Bellucci",
                      "company_id": 4564
                    },
                    "resource_instances": [
                      {
                        "id": 3127,
                        "title": "Manicure machine #1",
                        "resource_id": 1364
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_bad_request_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/activity/{location_id}/{event_id}/duplicate": {
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Duplicate Event",
        "description": "A request for duplication can be made in 3 ways:\n\n- Specifying a list of dates and times to duplicate\n\n- Specifying the ID of the repetition strategy\n\n- By specifying all repetition parameters",
        "operationId": "duplicate_event",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 2
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 9182,
                      "service_id": 1209148,
                      "salon_id": 4564,
                      "master_id": 1000265,
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "length": 7200,
                      "capacity": 5,
                      "records_count": 0,
                      "color": "",
                      "instructions": "",
                      "stream_link": "",
                      "font_color": "",
                      "notified": false,
                      "timestamp": "2026-09-21T23:00:00.000-05:00",
                      "service": {
                        "id": 1209148,
                        "category_id": 1285356,
                        "title": "Fitness \"test\"",
                        "price_min": 2,
                        "price_max": 3,
                        "prepaid": "forbidden"
                      },
                      "resource_instances": [
                        {
                          "id": 1094,
                          "title": "Massage room 1st floor",
                          "resource_id": 464
                        }
                      ],
                      "master": {
                        "id": 1000265,
                        "name": "Master",
                        "company_id": 4564,
                        "specialization": 321,
                        "rating": 0,
                        "show_rating": true,
                        "prepaid": "allowed",
                        "position": []
                      },
                      "records": [],
                      "labels": []
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_bad_request_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "example": {
                  "success": false,
                  "meta": {
                    "message": "The master is busy or not working: 2026-10-01 10:30",
                    "conflict": true
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/activity/{location_id}/services": {
      "get": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Search Event Services",
        "operationId": "search_event_services",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 4564
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "team member ID to filter",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "term",
            "in": "query",
            "description": "Search by name or part of the service name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_services_response"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1209148,
                      "title": "Fitness test",
                      "capacity": 5,
                      "price_min": 2,
                      "price_max": 3,
                      "is_multi": true,
                      "category": {
                        "id": 1285356,
                        "title": "Group services"
                      },
                      "staff": [
                        {
                          "id": 37695,
                          "name": "John Doe",
                          "length": 7200
                        }
                      ],
                      "resources": [
                        {
                          "id": 464,
                          "title": "massage room",
                          "salon_id": 4564
                        }
                      ]
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/activity/{location_id}/duplication_strategy": {
      "get": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "List Event Duplication Strategies",
        "description": "Duplication of Events occurs based on a set of parameters combined in the \"duplication strategy\" entity\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ----------------------------------------- |\r\n| title | string | Strategy name |\r\n| repeat_mode_id| integer | Repeat mode |\r\n| days | integer[] | List of days of the week: 0 Sun, 6 Fri |\r\n| interval | integer | Break in searching for dates, in units of type |\r\n| content_type | integer | Duplicate appointments? 1 - no, 2 - yes |\r\n\r\nThe repeat mode can take the values\r\n\r\n| Meaning | Description | Break unit |\r\n| -------- | ------------- | ------------------------------ |\r\n| 1 | Daily | Day |\r\n| 2 | Weekdays | - |\r\n| 3 | Mon Wed Fri | - |\r\n| 4 | Tue Thu | - |\r\n| 5 | Every week | Week |\r\n| 6 | Every month | Month |\r\n| 7 | Every year | Year |\r\n\r\nThe days field is relevant only for mode 5 - week, for specifying specific days of repetition\r\nIf you specify repeat_mode = 5, days = [1,4], interval = 2, then the Event will be\r\nrepeat every 3rd week on Mon and Thu",
        "operationId": "list_event_duplication_strategies",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 4564
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 2,
                      "company_id": 4564,
                      "title": "test pattern",
                      "repeat_mode_id": 1,
                      "repeat_mode": {
                        "id": 1,
                        "title": "Daily"
                      },
                      "days": [],
                      "interval": 0,
                      "content_type": 1
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Event Duplication Strategy",
        "operationId": "create_event_duplication_strategy",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "repeat_mode_id",
                  "title"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Name"
                  },
                  "days": {
                    "type": "array",
                    "description": "Recurrence Days for Weekly Mode",
                    "items": {
                      "type": "object"
                    }
                  },
                  "repeat_mode_id": {
                    "type": "number",
                    "description": "Repeat Mode"
                  },
                  "interval": {
                    "type": "number",
                    "description": "Break in searching for dates"
                  },
                  "content_type": {
                    "type": "number",
                    "description": "Duplicate appointments? 1 - no, 2 - yes"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "company_id": 4564,
                    "title": "Test duplication strategy",
                    "repeat_mode_id": 5,
                    "repeat_mode": {
                      "id": 5,
                      "title": "Every week"
                    },
                    "days": [
                      1,
                      4
                    ],
                    "interval": 2,
                    "content_type": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/activity/{location_id}/duplication_strategy/{strategy_id}": {
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Event Duplication Strategy",
        "operationId": "update_event_duplication_strategy",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 4564
          },
          {
            "name": "strategy_id",
            "in": "path",
            "description": "Replication strategy ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 3
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "repeat_mode_id",
                  "title"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Name"
                  },
                  "days": {
                    "type": "array",
                    "description": "Recurrence Days for Weekly Mode",
                    "items": {
                      "type": "object"
                    }
                  },
                  "repeat_mode_id": {
                    "type": "number",
                    "description": "Repeat Mode"
                  },
                  "interval": {
                    "type": "number",
                    "description": "Break in searching for dates"
                  },
                  "content_type": {
                    "type": "number",
                    "description": "Duplicate appointments? 1 - no, 2 - yes"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "id": 3,
                    "company_id": 4564,
                    "title": "New test duplication strategy",
                    "repeat_mode_id": 5,
                    "repeat_mode": {
                      "id": 5,
                      "title": "Every week"
                    },
                    "days": [
                      2,
                      3
                    ],
                    "interval": 3,
                    "content_type": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/schedule/{location_id}/{team_member_id}/{start_date}/{end_date}": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get schedule of a specific team member",
        "operationId": "get_team_member_schedule",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "start_date",
            "in": "path",
            "description": "Period start date",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 20251201
          },
          {
            "name": "end_date",
            "in": "path",
            "description": "Period end date",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 20251231
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "date",
                    "is_working"
                  ],
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "description": "date in iso8601 format."
                    },
                    "is_working": {
                      "type": "boolean",
                      "description": "Free time or not."
                    },
                    "slots": {
                      "type": "array",
                      "description": "An array of (from, to) working timeslots.",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "is_working": 1,
                      "slots": [
                        {
                          "from": "10:00",
                          "to": "14:00"
                        },
                        {
                          "from": "15:00",
                          "to": "23:15"
                        }
                      ]
                    },
                    {
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "is_working": 1,
                      "slots": [
                        {
                          "from": "10:00",
                          "to": "14:30"
                        },
                        {
                          "from": "15:00",
                          "to": "22:10"
                        }
                      ]
                    },
                    {
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "is_working": 0,
                      "slots": []
                    },
                    {
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "is_working": 1,
                      "slots": [
                        {
                          "from": "10:00",
                          "to": "14:00"
                        },
                        {
                          "from": "15:00",
                          "to": "22:00"
                        }
                      ]
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change schedule of a specific team member",
        "operationId": "update_team_member_schedule",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "start_date",
            "in": "path",
            "description": "Start date (YYYY-MM-DD)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "path",
            "description": "End date (YYYY-MM-DD)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "date",
                  "is_working",
                  "slots"
                ],
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "date"
                  },
                  "is_working": {
                    "type": "boolean",
                    "description": "Working date or not"
                  },
                  "slots": {
                    "type": "object",
                    "description": "Array of (from, to) working hours"
                  }
                },
                "example": [
                  {
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "is_working": true,
                    "slots": [
                      {
                        "from": "10:00",
                        "to": "14:30"
                      },
                      {
                        "from": "15:00",
                        "to": "22:00"
                      }
                    ]
                  },
                  {
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "is_working": true,
                    "slots": [
                      {
                        "from": "10:00",
                        "to": "14:00"
                      },
                      {
                        "from": "15:00",
                        "to": "23:15"
                      }
                    ]
                  }
                ]
              }
            }
          },
          "required": false
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/timetable/dates/{location_id}/{date}": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of dates for Appointment Calendar",
        "description": "The Appointment Calendar dates are returned as an array of date strings, for example: [\\\"2026-10-26\\\", \\\"2026-10-30\\\"]. To retrieve this list, you must provide a reference date. The response will return the available working dates of the specified location or team member relative to that date",
        "operationId": "get_appointment_calendar_dates",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date",
            "in": "path",
            "description": "date in iso8601 format.\nFilter by appointment date (eg '2026-09-30')\n",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "staff_id",
            "in": "query",
            "description": "team member ID.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00",
                    "2026-09-21T23:00:00.000-05:00"
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/timetable/seances/{location_id}/{team_member_id}/{date}": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of sessions for the Appointment Calendar",
        "description": "The sessions object for the log has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| time | string | Session time (17:30 for example) |\r\n| free | boolean | Free time or busy |",
        "operationId": "get_appointment_calendar_sessions",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date",
            "in": "path",
            "description": "date in iso8601 format.\nFilter by appointment date (eg '2026-09-30')\n",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID.",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "is_free",
                    "time"
                  ],
                  "type": "object",
                  "properties": {
                    "time": {
                      "type": "string",
                      "description": "Session time"
                    },
                    "is_free": {
                      "type": "boolean",
                      "description": "free time or not"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "time": "10:00",
                      "is_free": true
                    },
                    {
                      "time": "10:15",
                      "is_free": true
                    },
                    {
                      "time": "10:30",
                      "is_free": true
                    },
                    {
                      "time": "10:45",
                      "is_free": true
                    },
                    {
                      "time": "11:00",
                      "is_free": false
                    },
                    {
                      "time": "11:15",
                      "is_free": false
                    },
                    {
                      "time": "11:30",
                      "is_free": false
                    },
                    {
                      "time": "11:45",
                      "is_free": false
                    },
                    {
                      "time": "12:00",
                      "is_free": false
                    },
                    {
                      "time": "12:15",
                      "is_free": false
                    },
                    {
                      "time": "12:30",
                      "is_free": false
                    },
                    {
                      "time": "12:45",
                      "is_free": false
                    },
                    {
                      "time": "13:00",
                      "is_free": true
                    },
                    {
                      "time": "13:15",
                      "is_free": true
                    },
                    {
                      "time": "13:30",
                      "is_free": true
                    },
                    {
                      "time": "13:45",
                      "is_free": true
                    },
                    {
                      "time": "14:00",
                      "is_free": true
                    },
                    {
                      "time": "14:15",
                      "is_free": true
                    },
                    {
                      "time": "14:30",
                      "is_free": true
                    },
                    {
                      "time": "14:45",
                      "is_free": true
                    },
                    {
                      "time": "15:00",
                      "is_free": true
                    },
                    {
                      "time": "15:15",
                      "is_free": true
                    },
                    {
                      "time": "15:30",
                      "is_free": true
                    },
                    {
                      "time": "15:45",
                      "is_free": true
                    },
                    {
                      "time": "16:00",
                      "is_free": true
                    },
                    {
                      "time": "16:15",
                      "is_free": true
                    },
                    {
                      "time": "16:30",
                      "is_free": false
                    },
                    {
                      "time": "16:45",
                      "is_free": false
                    },
                    {
                      "time": "17:00",
                      "is_free": false
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/resources/{location_id}": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Getting Resources at a Location",
        "operationId": "get_resource_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "query",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "query",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "query",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/resources_companyid_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 70,
                      "title": "Pedicure chair",
                      "instances": [
                        {
                          "id": 181,
                          "title": "Pedicure chair #1",
                          "resource_id": 70
                        }
                      ]
                    },
                    {
                      "id": 464,
                      "title": "massage room",
                      "instances": [
                        {
                          "id": 1094,
                          "title": "Massage room 1st floor",
                          "resource_id": 464
                        },
                        {
                          "id": 1162,
                          "title": "Massage room 2nd floor",
                          "resource_id": 464
                        }
                      ]
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/schedule/{location_id}/{team_member_id}": {
      "put": {
        "tags": [
          "Schedule & Resources"
        ],
        "deprecated": true,
        "summary": "Update team member schedule (deprecated)",
        "description": "**DEPRECATED:** Use `PUT /location/{location_id}/staff/schedule` instead.\n\nUpdates the work schedule for a specific team member.\n",
        "operationId": "schedule_team_member_update_deprecated",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "Team member ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 12345
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "date",
                    "is_working",
                    "slots"
                  ],
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "Schedule date (YYYY-MM-DD)",
                      "example": "2026-01-15"
                    },
                    "is_working": {
                      "type": "boolean",
                      "description": "Whether the team member is working on this date",
                      "example": true
                    },
                    "slots": {
                      "type": "array",
                      "description": "Working time intervals",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "type": "string",
                            "description": "Interval start time (HH:mm)",
                            "example": "10:00"
                          },
                          "to": {
                            "type": "string",
                            "description": "Interval end time (HH:mm)",
                            "example": "14:30"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": [
                {
                  "date": "2026-01-15",
                  "is_working": true,
                  "slots": [
                    {
                      "from": "10:00",
                      "to": "14:30"
                    },
                    {
                      "from": "15:00",
                      "to": "22:00"
                    }
                  ]
                },
                {
                  "date": "2026-01-16",
                  "is_working": true,
                  "slots": [
                    {
                      "from": "10:00",
                      "to": "14:00"
                    },
                    {
                      "from": "15:00",
                      "to": "23:15"
                    }
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Schedule updated successfully",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Team member not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/search/{entity_type}/{entity_id}": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Search a Schedule by Event",
        "description": "Search for a schedule based on the appointment or event linked to it, or based on the associated appointment or event.\n",
        "operationId": "search_timetable_event_schedules_by_event",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/entity_type"
          },
          {
            "$ref": "#/components/parameters/entity_id"
          },
          {
            "$ref": "#/components/parameters/include_for_schedule_extended"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules": {
      "post": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Create a Schedule",
        "description": "Creates a schedule for appointments or events based on the original associated entity.\n",
        "operationId": "create_timetable_event_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/include_for_schedule"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "original_entity_type",
                  "original_entity_id",
                  "date_end",
                  "add_clients_from_original_entity",
                  "days"
                ],
                "type": "object",
                "properties": {
                  "original_entity_type": {
                    "type": "string",
                    "description": "Type of entity the schedule will be based on:  \n`record` - individual appointment, currently not supported;  \n`activity` - group event.\n",
                    "enum": [
                      "record",
                      "activity"
                    ],
                    "example": "activity"
                  },
                  "original_entity_id": {
                    "type": "number",
                    "description": "ID of entity the schedule will be based on.",
                    "example": 123
                  },
                  "date_end": {
                    "type": "string",
                    "description": "Date of the schedule end.",
                    "format": "date",
                    "example": "2022-02-01"
                  },
                  "add_clients_from_original_entity": {
                    "type": "boolean",
                    "description": "Add clients from original entity to all scheduled events.",
                    "example": false
                  },
                  "days": {
                    "type": "array",
                    "description": "Each object represents schedule series settings for a specific day of the week. A minimum of 1 and a maximum of 7 schedule series can be defined (one for each day of the week).",
                    "minItems": 1,
                    "maxItems": 7,
                    "items": {
                      "required": [
                        "day_of_week",
                        "events_master_id",
                        "events_time",
                        "events_duration",
                        "events_capacity"
                      ],
                      "type": "object",
                      "properties": {
                        "day_of_week": {
                          "type": "string",
                          "description": "The day of the week for the schedule series.",
                          "enum": [
                            "mon",
                            "tue",
                            "wed",
                            "thu",
                            "fri",
                            "sat",
                            "sun"
                          ],
                          "example": "mon"
                        },
                        "events_master_id": {
                          "type": "number",
                          "description": "The ID of the team member assigned to the events in the schedule series.",
                          "example": 123
                        },
                        "events_time": {
                          "type": "string",
                          "description": "Start time of the events in the schedule series, formatted as HH:MM:SS.",
                          "example": "14:00:00"
                        },
                        "events_duration": {
                          "type": "number",
                          "description": "Duration of each event in the schedule series, in seconds.",
                          "example": 3600
                        },
                        "events_capacity": {
                          "type": "number",
                          "description": "The capacity of activities in the schedule series. For appointments, this should be set to 1.",
                          "example": 4
                        },
                        "labels_ids": {
                          "type": "array",
                          "description": "An array of tag IDs associated with the events in the schedule series.",
                          "items": {
                            "type": "number",
                            "example": 123
                          }
                        },
                        "resource_instances_ids": {
                          "type": "array",
                          "description": "An array of resource instance IDs used in the events of the schedule series.",
                          "items": {
                            "type": "number",
                            "example": 123
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}": {
      "patch": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Update a Schedule",
        "description": "Updates the settings of a schedule containing appointments or events.\n",
        "operationId": "update_timetable_event_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "date_end": {
                    "type": "string",
                    "description": "Date of the schedule end.",
                    "format": "date",
                    "example": "2022-02-01"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Delete a Schedule",
        "description": "Completely deletes a schedule along with all its series and the linked appointments or events.\n",
        "operationId": "delete_timetable_event_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/response_data_null_object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}/client_schedules": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "summary": "Create Recurring Appointments",
        "description": "Creates a recurring appointment series for a client based on an event schedule. Automatically generates future appointments according to the schedule pattern.\n",
        "operationId": "create_timetable_client_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "client_id",
                  "schedule_days_ids"
                ],
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "number",
                    "description": "ID of client for creating a client schedule.",
                    "example": 123
                  },
                  "comer_id": {
                    "type": "number",
                    "description": "ID of client`s comer for creating a client schedule.",
                    "example": 123
                  },
                  "schedule_days_ids": {
                    "type": "array",
                    "description": "IDs of schedule series, min of 1 series, max of 7 series.",
                    "minItems": 1,
                    "maxItems": 7,
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule_client_schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}/client_schedules/{client_schedule_id}": {
      "patch": {
        "tags": [
          "Appointments"
        ],
        "summary": "Update Recurring Appointments",
        "description": "Updates a recurring appointment series by attaching or detaching schedule days. This creates or removes future appointments accordingly.\n",
        "operationId": "update_timetable_client_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/client_schedule_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "schedule_days_ids"
                ],
                "type": "object",
                "properties": {
                  "schedule_days_ids": {
                    "type": "array",
                    "description": "IDs of schedule series, min of 1 series, max of 7 series.",
                    "minItems": 1,
                    "maxItems": 7,
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule_client_schedule"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Appointments"
        ],
        "summary": "Delete Recurring Appointments",
        "description": "Deletes a recurring appointment series and all associated future appointments.\n",
        "operationId": "delete_timetable_client_schedule",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/client_schedule_id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/response_data_null_object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}/days": {
      "post": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Create a Schedule Series",
        "description": "Adds a new series to an existing schedule of appointments or events.\n",
        "operationId": "create_timetable_schedule_day",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/include_for_day"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "day_of_week",
                  "events_master_id",
                  "events_time",
                  "events_duration",
                  "events_capacity"
                ],
                "type": "object",
                "properties": {
                  "day_of_week": {
                    "type": "string",
                    "description": "The day of the week for the schedule series.",
                    "enum": [
                      "mon",
                      "tue",
                      "wed",
                      "thu",
                      "fri",
                      "sat",
                      "sun"
                    ],
                    "example": "mon"
                  },
                  "events_master_id": {
                    "type": "number",
                    "description": "The ID of the team member assigned to the events in the schedule series.",
                    "example": 123
                  },
                  "events_time": {
                    "type": "string",
                    "description": "Start time of the events in the schedule series, formatted as HH:MM:SS.",
                    "example": "14:00:00"
                  },
                  "events_duration": {
                    "type": "number",
                    "description": "Duration of each event in the schedule series, in seconds.",
                    "example": 3600
                  },
                  "events_capacity": {
                    "type": "number",
                    "description": "The capacity of activities in the schedule series. For appointments, this should be set to 1.",
                    "example": 4
                  },
                  "labels_ids": {
                    "type": "array",
                    "description": "An array of tag IDs associated with the events in the schedule series.",
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  },
                  "resource_instances_ids": {
                    "type": "array",
                    "description": "An array of resource instance IDs used in the events of the schedule series.",
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule_day"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}/days/{day_id}": {
      "patch": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Update a schedule series",
        "description": "Updates the settings of a schedule series for appointments or events.\n",
        "operationId": "update_timetable_schedule_day",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/day_id"
          },
          {
            "$ref": "#/components/parameters/include_for_day"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "force"
                ],
                "type": "object",
                "properties": {
                  "force": {
                    "type": "boolean",
                    "description": "Flag for force override of manual changes in scheduled appointments/events.",
                    "example": false
                  },
                  "events_master_id": {
                    "type": "number",
                    "description": "The ID of the team member assigned to the events in the schedule series.",
                    "example": 123
                  },
                  "events_time": {
                    "type": "string",
                    "description": "Start time of the events in the schedule series, formatted as HH:MM:SS.",
                    "example": "14:00:00"
                  },
                  "events_duration": {
                    "type": "number",
                    "description": "Duration of each event in the schedule series, in seconds.",
                    "example": 3600
                  },
                  "events_capacity": {
                    "type": "number",
                    "description": "The capacity of activities in the schedule series. For appointments, this should be set to 1.",
                    "example": 4
                  },
                  "labels_ids": {
                    "type": "array",
                    "description": "An array of tag IDs associated with the events in the schedule series.",
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  },
                  "resource_instances_ids": {
                    "type": "array",
                    "description": "An array of resource instance IDs used in the events of the schedule series.",
                    "items": {
                      "type": "number",
                      "example": 123
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/timetable_event_schedule_day"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Delete a schedule series",
        "description": "Deletes a schedule series and all appointments or events linked to it.\n",
        "operationId": "delete_timetable_schedule_day",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/day_id"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/response_data_null_object"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/schedules/{schedule_id}/days/{day_id}/events": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "summary": "Get a List of Scheduled Appointments and Events",
        "description": "Prints  a list of events of scheduled records/activities.\n",
        "operationId": "list_timetable_schedule_day_events",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/schedule_id"
          },
          {
            "$ref": "#/components/parameters/day_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/timetable_event_schedule_event"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/settings/timetable": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Retrieving Appointment Calendar Settings",
        "operationId": "get_appointment_calendar_settings",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Appointment calendar settings data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_get_timetable_settings_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "record_type": 0,
                    "activity_record_clients_count_max": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Appointment Calendar settings",
        "operationId": "update_appointment_calendar_settings",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/company_update_timetable_settings_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated appointment calendar settings data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_get_timetable_settings_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "record_type": 90,
                    "activity_record_clients_count_max": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/staff/schedule": {
      "get": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get team member schedules",
        "description": "Retrieves work schedules for team members as working intervals.\n\nOptionally includes:\n- Busy intervals (appointments and events)\n- Off-day type identifiers\n\n**Query Parameters:**\n- `start_date` / `end_date` - Date range for schedule search\n- `staff_ids[]` - Filter by specific team members\n- `include[]` - Include additional data (busy_intervals, off_day_type)\n",
        "operationId": "get_team_member_schedule_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Start date for schedule search (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-01-31"
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "End date for schedule search (YYYY-MM-DD)",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-03-31"
          },
          {
            "name": "staff_ids",
            "in": "query",
            "description": "Team member IDs to filter by.\nExample: `staff_ids[]=123&staff_ids[]=234`\n",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "include",
            "in": "query",
            "description": "Additional data to include in response.\nExample: `include[]=busy_intervals&include[]=off_day_type`\n",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "busy_intervals",
                  "off_day_type"
                ]
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "Schedules retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "staff_id": {
                            "type": "integer",
                            "description": "Team member ID",
                            "example": 12345
                          },
                          "date": {
                            "type": "string",
                            "format": "date",
                            "description": "Schedule date (YYYY-MM-DD)",
                            "example": "2026-01-31"
                          },
                          "slots": {
                            "type": "array",
                            "description": "Working time intervals",
                            "items": {
                              "type": "object",
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "description": "Interval start time (HH:mm)",
                                  "example": "10:00"
                                },
                                "to": {
                                  "type": "string",
                                  "description": "Interval end time (HH:mm)",
                                  "example": "19:00"
                                }
                              }
                            }
                          },
                          "busy_intervals": {
                            "type": "array",
                            "description": "Time intervals occupied by appointments or events.\nOnly included when `include[]=busy_intervals`.\n",
                            "items": {
                              "type": "object",
                              "properties": {
                                "entity_type": {
                                  "type": "string",
                                  "description": "Entity type occupying the interval",
                                  "enum": [
                                    "record",
                                    "activity"
                                  ],
                                  "example": "record"
                                },
                                "entity_id": {
                                  "type": "integer",
                                  "description": "Entity ID (appointment or event ID)",
                                  "example": 456789
                                },
                                "from": {
                                  "type": "string",
                                  "description": "Interval start time (HH:mm:ss)",
                                  "example": "11:00:00"
                                },
                                "to": {
                                  "type": "string",
                                  "description": "Interval end time (HH:mm:ss)",
                                  "example": "12:00:00"
                                }
                              }
                            }
                          },
                          "off_day_type": {
                            "oneOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Off-day type ID (if this is a non-working day).\nOnly included when `include[]=off_day_type`.\n",
                            "example": 3
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "description": "Total number of schedule entries",
                          "example": 15
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "team_member_id": 12345,
                      "date": "2026-01-31",
                      "slots": [
                        {
                          "from": "10:00",
                          "to": "12:00"
                        },
                        {
                          "from": "13:00",
                          "to": "19:00"
                        }
                      ],
                      "busy_intervals": [
                        {
                          "entity_type": "record",
                          "entity_id": 456789,
                          "from": "11:00:00",
                          "to": "12:00:00"
                        },
                        {
                          "entity_type": "activity",
                          "entity_id": 123456,
                          "from": "15:00:00",
                          "to": "16:00:00"
                        }
                      ],
                      "off_day_type": null
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Schedule & Resources"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Set team member schedules",
        "description": "Sets work schedules for team members by date.\n\nSupports both setting new schedules and deleting existing ones in a single request.\n\nReturns the resulting schedules for affected team members within the date range\nfrom minimum to maximum modified date.\n",
        "operationId": "set_team_member_schedule",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schedules_to_set": {
                    "type": "array",
                    "description": "Schedules to create or update",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_member_id": {
                          "type": "integer",
                          "description": "Team member ID",
                          "example": 12345
                        },
                        "dates": {
                          "type": "array",
                          "description": "Dates to set schedule for (YYYY-MM-DD)",
                          "items": {
                            "type": "string",
                            "format": "date"
                          },
                          "example": [
                            "2026-01-31",
                            "2026-02-01"
                          ]
                        },
                        "slots": {
                          "type": "array",
                          "description": "Working time intervals",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "Interval start time (HH:mm)",
                                "example": "10:00"
                              },
                              "to": {
                                "type": "string",
                                "description": "Interval end time (HH:mm)",
                                "example": "19:00"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "schedules_to_delete": {
                    "type": "array",
                    "description": "Schedules to delete (make non-working days)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "team_member_id": {
                          "type": "integer",
                          "description": "Team member ID",
                          "example": 12345
                        },
                        "dates": {
                          "type": "array",
                          "description": "Dates to delete schedule for (YYYY-MM-DD)",
                          "items": {
                            "type": "string",
                            "format": "date"
                          },
                          "example": [
                            "2026-02-02",
                            "2026-02-03"
                          ]
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "schedules_to_set": [
                  {
                    "team_member_id": 12345,
                    "dates": [
                      "2026-01-31",
                      "2026-02-01"
                    ],
                    "slots": [
                      {
                        "from": "10:00",
                        "to": "14:00"
                      },
                      {
                        "from": "15:00",
                        "to": "19:00"
                      }
                    ]
                  }
                ],
                "schedules_to_delete": [
                  {
                    "team_member_id": 12345,
                    "dates": [
                      "2026-02-02"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Schedules updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "description": "Resulting schedules for modified team members",
                      "items": {
                        "type": "object",
                        "properties": {
                          "team_member_id": {
                            "type": "integer",
                            "example": 12345
                          },
                          "date": {
                            "type": "string",
                            "format": "date",
                            "example": "2026-01-31"
                          },
                          "slots": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "example": "10:00"
                                },
                                "to": {
                                  "type": "string",
                                  "example": "19:00"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "example": 2
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Location or team member not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (e.g., overlapping intervals)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "errors": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/goods/search/{location_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Search products and categories",
        "operationId": "search_product",
        "description": "### List of products and product categories\r\n\r\nYou can retrieve a list of products and product categories by providing the location ID. Use the `search_term` parameter to filter: \n+ Product categories by name or article \n+ Products by name, article, or barcode \n\nLimit the number of results using the `max_count` parameter.\r\n\r\nIf `search_term` is not provided, the response will return a list of root categories for the specified location. In this case, the `max_count` parameter is ignored. If `search_term` is provided, the system will first search among categories. If fewer than `max_count` results are found, the search will continue among products to fill the remaining count.\r\n\r\nThe result is returned as an array of [products tree elements](#product-category-tree-node).\r\n\r\n<a name=\"product-category-tree-node\"></a>\r\n**Product tree element** has the following structure:\r\n\r\n| Field | Type | Description |\r\n| -------------| ------- | -------------------------------------------------- ----------------------------------------- |\r\n| parent_id | number | Parent element ID (0 for root elements) |\r\n| item_id | number | Item ID (0 if item is a category) |\r\n| category_id | number | Product category ID (0 if the item is a product) |\r\n| title | string | Product name or product category |\r\n| is_chain | boolean | Is the element chain-bound? true - the element is connected to the chain, false - not connected |\r\n| is_category | boolean | Is the element a category? true - category, false - product |\r\n| is_item | boolean | Is the item a product? true - product, false - category |",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "term",
            "in": "query",
            "description": "Search query by name, article number or barcode",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "The number of output lines per page. Maximum 100",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_search_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "parent_id": 0,
                      "item_id": 0,
                      "category_id": 123,
                      "title": "Root category 1",
                      "is_chain": true,
                      "is_category": true,
                      "is_item": false
                    },
                    {
                      "parent_id": 0,
                      "item_id": 0,
                      "category_id": 456,
                      "title": "Root category 2",
                      "is_chain": true,
                      "is_category": true,
                      "is_item": false
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/goods/{location_id}/{product_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Products",
        "description": "+ term: Name, article or barcode\n\n+ page (number, `1`) - Page number (not used if product_id is passed)\n\n+ count (number, `25`) - Number of products on the page (not used if product_id is passed)\n\n+ category_id (number, `777`) - Id of the product category (not used if product_id is passed)\n\n+ changed_after (string) - filtering products changed/created since a specific date and time (not used if product_id is passed)\n\n+ changed_before (string) - filtering products changed/created before a specific date and time (not used if product_id is passed)",
        "operationId": "get_product",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "description": "Product ID (if you need to get a specific product)",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "term",
            "in": "query",
            "description": "name, article number or barcode",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "number of products per page",
            "schema": {
              "type": "number"
            },
            "example": 25
          },
          {
            "name": "category_id",
            "in": "query",
            "description": "Product category ID",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "changed_after",
            "in": "query",
            "description": "filtering products modified/created since a specific date and time",
            "schema": {
              "type": "string"
            },
            "example": "2026-09-21T23:00:00.000-05:00"
          },
          {
            "name": "changed_before",
            "in": "query",
            "description": "filtering products modified/created before a specific date and time",
            "schema": {
              "type": "string"
            },
            "example": "2026-01-01T12:00:00-0500"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_goods_id_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "title": "Shampoo 1",
                      "value": "Shampoo 1",
                      "label": "Shampoo 1 (123)",
                      "good_id": 123456,
                      "cost": 100500,
                      "unit_id": 4835,
                      "unit_short_title": "PC",
                      "service_unit_id": 3548,
                      "service_unit_short_title": "gr",
                      "actual_cost": 1050,
                      "unit_actual_cost": 105,
                      "unit_actual_cost_format": "105 r",
                      "unit_equals": 10,
                      "barcode": "123",
                      "loyalty_abonement_type_id": "0",
                      "loyalty_certificate_type_id": "0",
                      "loyalty_allow_empty_code": true,
                      "critical_amount": 0,
                      "desired_amount": 0,
                      "actual_amounts": [
                        {
                          "storage_id": 987,
                          "amount": 1000000
                        }
                      ],
                      "last_change_date": "2026-01-01T12:00:00-0500"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404_not_found"
          }
        }
      },
      "put": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit Products",
        "description": "The method allows you to change the product parameters.\nWhen editing units of measure for a product that already has inventory operations, you must add an array of rules for recalculating units of measure - correction_rules. Otherwise, the array is optional.",
        "operationId": "update_product",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "description": "Product ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/goods_company_request_with_rules_data_type"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_goods_id_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "title": "Shampoo 1",
                      "value": "Shampoo 1",
                      "label": "Shampoo 1 (123)",
                      "good_id": 123456,
                      "cost": 100500,
                      "unit_id": 4835,
                      "unit_short_title": "PC",
                      "service_unit_id": 3548,
                      "service_unit_short_title": "gr",
                      "actual_cost": 1050,
                      "unit_actual_cost": 105,
                      "unit_actual_cost_format": "105 r",
                      "unit_equals": 10,
                      "barcode": "123",
                      "loyalty_abonement_type_id": "0",
                      "loyalty_certificate_type_id": "0",
                      "loyalty_allow_empty_code": true,
                      "critical_amount": 0,
                      "desired_amount": 0,
                      "actual_amounts": [
                        {
                          "storage_id": 987,
                          "amount": 1000000
                        }
                      ],
                      "last_change_date": "2026-01-01T12:00:00-0500"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404_not_found"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_response409_data_type"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "The product already has inventory operations, you need to specify the rules for converting units of measure for inventory operations",
                    "conflict": true
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_response422_data_type"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "The specified taxation system is not available for this country."
                      },
                      {
                        "message": "The specified VAT is not available for this taxation system."
                      },
                      {
                        "[title]": [
                          "This field is missing."
                        ],
                        "[category_id]": [
                          "This field is missing."
                        ],
                        "[sale_unit_id]": [
                          "This field is missing."
                        ],
                        "[service_unit_id]": [
                          "This field is missing."
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Items",
        "description": "The method allows you to remove the product",
        "operationId": "delete_product",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "description": "Product ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404_not_found"
          }
        }
      }
    },
    "/goods/{location_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of products",
        "description": "Returns a list of all products for the specified location",
        "operationId": "get_products_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_list_response"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "title": "Shampoo 1",
                      "value": "Shampoo 1",
                      "label": "Shampoo 1 (123)",
                      "good_id": 123456,
                      "cost": 100500,
                      "unit_id": 4835,
                      "unit_short_title": "PC"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create product",
        "description": "The method allows you to create a product",
        "operationId": "create_product",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/goods_company_request_data_type"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_goods_id_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "title": "Shampoo 1",
                      "value": "Shampoo 1",
                      "label": "Shampoo 1 (123)",
                      "good_id": 123456,
                      "cost": 100500,
                      "unit_id": 4835,
                      "unit_short_title": "PC",
                      "service_unit_id": 3548,
                      "service_unit_short_title": "gr",
                      "actual_cost": 1050,
                      "unit_actual_cost": 105,
                      "unit_actual_cost_format": "105 r",
                      "unit_equals": 10,
                      "barcode": "123",
                      "loyalty_abonement_type_id": "0",
                      "loyalty_certificate_type_id": "0",
                      "loyalty_allow_empty_code": true,
                      "critical_amount": 0,
                      "desired_amount": 0,
                      "actual_amounts": [
                        {
                          "storage_id": 987,
                          "amount": 1000000
                        }
                      ],
                      "last_change_date": "2026-01-01T12:00:00-0500"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_company_response422_data_type"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Possible error messages",
                    "errors": [
                      {
                        "message": "The specified taxation system is not available for this country."
                      },
                      {
                        "message": "The specified VAT is not available for this taxation system."
                      },
                      {
                        "[title]": [
                          "This field is missing."
                        ],
                        "[category_id]": [
                          "This field is missing."
                        ],
                        "[sale_unit_id]": [
                          "This field is missing."
                        ],
                        "[service_unit_id]": [
                          "This field is missing."
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/goods_categories/{parent_category_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Example of a request to get categories",
        "operationId": "get_product_category_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "parent_category_id",
            "in": "path",
            "description": "ID of the parent product category",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "query",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "query",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "query",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 25214,
                      "title": "Doughter 1",
                      "parent_category_id": 24843
                    },
                    {
                      "id": 25213,
                      "title": "Root 1"
                    },
                    {
                      "id": 25219,
                      "title": "Root 2"
                    }
                  ],
                  "meta": {
                    "count": 94
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/goods/category_node/{location_id}/{category_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Example of a request to get the composition of a category",
        "description": "##№ Composition of the product category\n\nInformation on a product category and its descendants can be obtained by making a request specifying the location ID and product category.\nPagination is supported, specified by the `page` and `count` parameters.\n\n**Composition of a product category** has the following structure:\n\n| Field           | Type                                                                 | Description                                                                                               |\n|-----------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|\n| parent_id       | number                                                               | Parent element ID (0 for root elements)                                                                   |\n| item_id         | number                                                               | Item ID (always 0)                                                                                        |\n| category_id     | number                                                               | Product category ID                                                                                       |\n| title           | string                                                               | Product category name                                                                                     |\n| is_chain        | boolean                                                              | Is the element chain-bound? true - the element is connected to the chain, false - not connected          |\n| is_category     | boolean                                                              | Is the element a category? always true                                                                    |\n| is_item         | boolean                                                              | Is the item a product? always false                                                                       |\n| children        | array of objects ([Product tree element](#good-category-tree-node)) | Child elements of a product category                                                                      |\n| children_count  | number                                                               | Total number of child products and categories (no recursion)                                              |",
        "operationId": "get_product_category_composition",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "description": "Product Category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "The number of products displayed on the page. Maximum 1000",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_category_node_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "parent_id": 0,
                    "item_id": 0,
                    "category_id": 123,
                    "title": "Root category 1",
                    "is_chain": false,
                    "is_category": true,
                    "is_item": false,
                    "children": [
                      {
                        "parent_id": 123,
                        "item_id": 0,
                        "category_id": 456,
                        "title": "Child category",
                        "is_chain": false,
                        "is_category": true,
                        "is_item": false
                      },
                      {
                        "parent_id": 123,
                        "item_id": 789,
                        "category_id": 0,
                        "title": "Child product",
                        "is_chain": false,
                        "is_category": false,
                        "is_item": true
                      }
                    ],
                    "children_count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/goods_categories/multiple/{location_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of product categories by ID",
        "operationId": "get_product_category_list_by_ids",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "description": "Product category ID (you can specify several additional parameters &ids[]={id}",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Category 1"
                    },
                    {
                      "id": 2,
                      "title": "Category 2"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/goods_categories/{location_id}": {
      "post": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a Product Category",
        "description": "The method allows you to create a product category.",
        "operationId": "create_product_category",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/goods_categories_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_categories_post_put_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 123456,
                    "title": "Manicure",
                    "parent_category_id": 123457
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/goods_categories/{location_id}/{category_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of product categories",
        "operationId": "deprecated_get_product_category_list",
        "deprecated": true,
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "description": "ID of the parent product category. Default 0 - top-level categories are displayed (optional)",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_categories_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Category 1"
                    },
                    {
                      "id": 2,
                      "title": "Category 2"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit a Product Category",
        "description": "The method allows you to edit the product category",
        "operationId": "update_product_category",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "description": "Product category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/goods_categories_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/goods_categories_post_put_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 123456,
                    "title": "Manicure",
                    "parent_category_id": 123457
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete a Product Category",
        "description": "The method allows you to delete a product category",
        "operationId": "delete_product_category",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "description": "Product category ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storages/{location_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get location inventories",
        "description": "The location inventory object has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| id | number | Inventory ID |\r\n| title | string | Title |\r\n| for_services | number | 1 - if used for automatic write-off of consumables |\r\n| for_sale | number | 1 - if the default inventory for selling products |\r\n| comment | string | Description of the inventory |",
        "operationId": "get_location_inventories",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Consumables",
                      "for_service": 1,
                      "for_sale": 0,
                      "comment": "To account for consumables"
                    },
                    {
                      "id": 2,
                      "title": "Products",
                      "for_service": 0,
                      "for_sale": 1,
                      "comment": "To record store sales"
                    },
                    {
                      "id": 23061,
                      "title": "Ors",
                      "for_service": 0,
                      "for_sale": 1,
                      "comment": "Nz"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storages/transactions/{location_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Search for product transactions",
        "operationId": "search_for_product_transactions",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "number of transactions per page",
            "schema": {
              "type": "number"
            },
            "example": 20
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "period start date",
            "schema": {
              "type": "string"
            },
            "example": "''"
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "period end date",
            "schema": {
              "type": "string"
            },
            "example": "''"
          },
          {
            "name": "document_id",
            "in": "query",
            "description": "Document ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "changed_after",
            "in": "query",
            "description": "Filtering product transactions modified/created since a specific date and time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changed_before",
            "in": "query",
            "description": "Filtering product transactions modified/created before a specific date and time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storages_transaction_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 123456789,
                      "document_id": 22256643,
                      "type_id": 987654321,
                      "type": "Something",
                      "good": {
                        "id": 111222333,
                        "title": "Something"
                      },
                      "storage": {
                        "id": 333222111,
                        "title": "Storage 1"
                      },
                      "unit": {
                        "id": 333222111,
                        "title": "milliliter"
                      },
                      "operation_unit_type": 1,
                      "create_date": "2026-12-21T19:08:00-0500",
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "cost_per_unit": 1.07,
                      "cost": 0,
                      "discount": 10,
                      "master": {
                        "id": 112233445,
                        "title": "James Smith"
                      },
                      "supplier": {
                        "id": 11112222,
                        "title": "Best Supplier Ever"
                      },
                      "record_id": 1,
                      "service": {
                        "id": 1234321,
                        "title": "Service 4"
                      },
                      "clients": {
                        "id": 4321234,
                        "name": "George Smith",
                        "phone": 13155550176
                      }
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storage_operations/operation/{location_id}": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create an inventory operation",
        "description": "An inventory operation is created by submitting a document along with multiple product transactions in a single API request. If a payment type is specified, the corresponding financial transactions will be generated automatically.",
        "operationId": "create_inventory_operation",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/storage_operation_operation_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_operation_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "document": {
                      "id": 22255506,
                      "type_id": 1,
                      "type": {
                        "id": 1,
                        "title": "Sale of goods"
                      },
                      "storage_id": 91271,
                      "user_id": 999290,
                      "company_id": 4564,
                      "number": 1254,
                      "comment": "test document comment",
                      "create_date": "2026-09-21T23:00:00.000-05:00",
                      "storage": {
                        "id": 91271,
                        "title": "Secret place"
                      },
                      "company": {
                        "id": 4564,
                        "title": "Business example",
                        "country_id": 7,
                        "city_id": 2
                      },
                      "timezone": "-5",
                      "address": "New York, 787 Jackson Drive",
                      "coordinate_lat": 40.73061,
                      "coordinate_lon": -73.935242,
                      "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
                      "zip": "",
                      "phones": [],
                      "site": "www.example.com",
                      "user": {
                        "id": 999290,
                        "name": "User name",
                        "phone": "+13155550175"
                      }
                    },
                    "transactions": [
                      {
                        "id": 3428012,
                        "document_id": 22255506,
                        "type_id": 1,
                        "type": {
                          "id": 1,
                          "title": "Sale of goods"
                        },
                        "company_id": 4564,
                        "good_id": 232674,
                        "amount": -1,
                        "cost_per_unit": 100,
                        "discount": 10,
                        "cost": 90,
                        "unit_id": 1,
                        "storage_id": 91271,
                        "supplier_id": 0,
                        "client_id": 0,
                        "master_id": 0,
                        "create_date": "2026-09-21T23:00:00.000-05:00",
                        "comment": "test transaction comment",
                        "deleted": false,
                        "good": {
                          "id": 232674,
                          "title": "Edition De Luxe"
                        },
                        "storage": {
                          "id": 91271,
                          "title": "Secret place"
                        },
                        "supplier": [],
                        "client": [],
                        "master": [],
                        "unit": {
                          "id": 1,
                          "title": "Thing"
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/storage_operations/documents/{location_id}": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create document",
        "operationId": "create_document",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/storage_operation_documents_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_documents_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 22255503,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "storage_id": 36539,
                    "user_id": 999290,
                    "company_id": 4564,
                    "number": 1251,
                    "comment": "Document comment",
                    "create_date": "2026-04-24 20:00:00",
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "company": {
                      "id": 4564,
                      "title": "Business example",
                      "country_id": 7,
                      "city_id": 2,
                      "timezone": "-5",
                      "address": "New York, 787 Jackson Drive",
                      "ccoordinate_lat": 40.73061,
                      "coordinate_lon": -73.935242,
                      "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
                      "zip": "",
                      "phones": [],
                      "site": "www.example.com"
                    },
                    "user": {
                      "id": 999290,
                      "name": "User name",
                      "phone": "+13155550175"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/storage_operations/documents/{location_id}/{document_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get document",
        "operationId": "get_document",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_documents_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 22255503,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "storage_id": 36539,
                    "user_id": 999290,
                    "company_id": 4564,
                    "number": 1251,
                    "comment": "Document comment",
                    "create_date": "2026-04-24 20:00:00",
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "company": {
                      "id": 4564,
                      "title": "Business example",
                      "country_id": 7,
                      "city_id": 2,
                      "timezone": "-5",
                      "address": "New York, 787 Jackson Drive",
                      "coordinate_lat": 40.73061,
                      "coordinate_lon": -73.935242,
                      "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
                      "zip": "",
                      "phones": [],
                      "site": "www.example.com"
                    },
                    "user": {
                      "id": 999290,
                      "name": "User name",
                      "phone": "+13155550175"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Document",
        "operationId": "update_document",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/storage_operation_documents_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_documents_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 22255503,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "storage_id": 36539,
                    "user_id": 999290,
                    "company_id": 4564,
                    "number": 1251,
                    "comment": "Updated document comment",
                    "create_date": "2026-09-21T23:00:00.000-05:00",
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "company": {
                      "id": 4564,
                      "title": "Business example",
                      "country_id": 7,
                      "city_id": 2,
                      "timezone": "-5",
                      "address": "New York, 787 Jackson Drive",
                      "coordinate_lat": 40.73061,
                      "coordinate_lon": -73.935242,
                      "logo": "https://app.alteg.io/uploads/s_120d9410f1472a4e6bdbafefe7eeba42.png",
                      "zip": "",
                      "phones": [],
                      "site": "www.example.com"
                    },
                    "user": {
                      "id": 999290,
                      "name": "User name",
                      "phone": "+13155550175"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete document",
        "operationId": "delete_document",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storage_operations/goods_transactions/{location_id}": {
      "post": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Transaction",
        "operationId": "create_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/storage_operation_good_transaction_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_good_transaction_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3428010,
                    "document_id": 22254960,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "company_id": 4564,
                    "good_id": 232674,
                    "amount": -1,
                    "cost_per_unit": 100,
                    "discount": 10,
                    "cost": 90,
                    "unit_id": 1,
                    "storage_id": 36539,
                    "supplier_id": 0,
                    "client_id": 0,
                    "master_id": 26781,
                    "create_date": "2026-09-21T23:00:00.000-05:00",
                    "last_change_date": "2026-02-01T12:00:00-0500",
                    "comment": "Transaction comment",
                    "deleted": false,
                    "good": {
                      "id": 232674,
                      "title": "Edition De Luxe"
                    },
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "supplier": [],
                    "client": [],
                    "master": {
                      "id": 26781,
                      "name": "Angelina Jolie"
                    },
                    "unit": {
                      "id": 1,
                      "title": "Thing"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/400_bad_request_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/storage_operations/goods_transactions/{location_id}/{transaction_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a transaction",
        "operationId": "get_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_good_transaction_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3428010,
                    "document_id": 22254960,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "company_id": 4564,
                    "good_id": 232674,
                    "amount": -1,
                    "cost_per_unit": 100,
                    "discount": 10,
                    "cost": 90,
                    "unit_id": 1,
                    "storage_id": 36539,
                    "supplier_id": 0,
                    "client_id": 0,
                    "master_id": 26781,
                    "create_date": "2026-09-21T23:00:00.000-05:00",
                    "comment": "Transaction comment",
                    "deleted": false,
                    "good": {
                      "id": 232674,
                      "title": "Edition De Luxe",
                      "unit": "PC.",
                      "value": "delete yy",
                      "label": "delete yy",
                      "article": "",
                      "category": "goose category",
                      "category_id": 303603,
                      "salon_id": 91372,
                      "good_id": 15086312,
                      "cost": 500,
                      "unit_id": 216760,
                      "unit_short_title": "PC",
                      "service_unit_id": 216760,
                      "service_unit_short_title": "PC",
                      "actual_cost": 0,
                      "unit_actual_cost": 0,
                      "unit_actual_cost_format": "0 USD",
                      "unit_equals": 1,
                      "barcode": "",
                      "loyalty_abonement_type_id": "0",
                      "loyalty_certificate_type_id": "0",
                      "loyalty_allow_empty_code": true,
                      "actual_amounts": [],
                      "last_change_date": "2026-03-05T18:21:34-0500"
                    },
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "sale_unit": null,
                    "service_unit": null,
                    "supplier": [],
                    "client": [],
                    "master": {
                      "id": 26781,
                      "name": "Angelina Jolie"
                    },
                    "unit": {
                      "id": 1,
                      "title": "Thing",
                      "short_title": "PC."
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Transaction update",
        "operationId": "update_transaction",
        "parameters": [
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/storage_operation_good_transaction_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_good_transaction_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 3428010,
                    "document_id": 22254960,
                    "type_id": 1,
                    "type": {
                      "id": 1,
                      "title": "Sale of goods"
                    },
                    "company_id": 4564,
                    "good_id": 232674,
                    "amount": -1,
                    "cost_per_unit": 100,
                    "discount": 10,
                    "cost": 90,
                    "unit_id": 1,
                    "operation_unit_type": 1,
                    "storage_id": 36539,
                    "supplier_id": 0,
                    "client_id": 0,
                    "master_id": 26781,
                    "create_date": "2026-09-21T23:00:00.000-05:00",
                    "last_change_date": "2026-02-01T12:00:00-0500",
                    "comment": "Updated transaction comment",
                    "deleted": false,
                    "good": {
                      "id": 232674,
                      "title": "Edition De Luxe"
                    },
                    "storage": {
                      "id": 36539,
                      "title": "Products"
                    },
                    "supplier": [],
                    "client": [],
                    "master": {
                      "id": 26781,
                      "name": "Angelina Jolie"
                    },
                    "unit": {
                      "id": 1,
                      "title": "Thing"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Deleting a transaction",
        "operationId": "delete_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storage_operations/documents/goods_transactions/{document_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Product Transactions of a Document",
        "operationId": "get_document_product_transactions",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_good_transaction_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 3728232,
                      "document_id": 22256643,
                      "type_id": 1,
                      "company_id": 4564,
                      "good_id": 587018,
                      "amount": -10,
                      "cost_per_unit": 100,
                      "discount": 0,
                      "cost": 1000,
                      "unit_id": 88272,
                      "operation_unit_type": 1,
                      "storage_id": 36539,
                      "supplier_id": 0,
                      "record_id": 0,
                      "client_id": 0,
                      "master_id": 49754,
                      "create_date": "2026-09-21T23:00:00.000-05:00",
                      "comment": "",
                      "service_id": 0,
                      "user_id": 3,
                      "deleted": false,
                      "pkg_amount": 0
                    },
                    {
                      "id": 3728233,
                      "document_id": 22256643,
                      "type_id": 1,
                      "company_id": 4564,
                      "good_id": 232674,
                      "amount": -10,
                      "cost_per_unit": 127.5,
                      "discount": 0,
                      "cost": 1275,
                      "unit_id": 1,
                      "operation_unit_type": 2,
                      "storage_id": 36539,
                      "supplier_id": 0,
                      "record_id": 0,
                      "client_id": 0,
                      "master_id": 49754,
                      "create_date": "2026-09-21T23:00:00.000-05:00",
                      "comment": "",
                      "service_id": 0,
                      "user_id": 3,
                      "deleted": false,
                      "pkg_amount": 0
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/storage_operations/documents/finance_transactions/{document_id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get document financial transactions",
        "operationId": "get_document_financial_transactions",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/storage_operation_finance_transaction_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 9053737,
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "type_id": 2640,
                      "expense_id": 2640,
                      "account_id": 35501,
                      "amount": 434,
                      "client_id": 4240788,
                      "master_id": 0,
                      "supplier_id": 0,
                      "comment": "Transaction comment",
                      "item_id": 0,
                      "target_type_id": 0,
                      "record_id": 0,
                      "expense": {
                        "id": 2640,
                        "title": "Provision of corporate services"
                      },
                      "account": {
                        "id": 35501,
                        "title": "Location account",
                        "type_id": 0,
                        "type": 0,
                        "comment": "",
                        "company_id": 4564
                      },
                      "client": {
                        "id": 4240788,
                        "name": "Client",
                        "phone": "+13155550175"
                      },
                      "master": [],
                      "supplier": []
                    },
                    {
                      "id": 9053738,
                      "date": "2026-09-21T23:00:00.000-05:00",
                      "type_id": 2640,
                      "expense_id": 2640,
                      "account_id": 35501,
                      "amount": 434,
                      "client_id": 4240788,
                      "master_id": 0,
                      "supplier_id": 0,
                      "comment": "Transaction comment",
                      "item_id": 0,
                      "target_type_id": 0,
                      "record_id": 0,
                      "expense": {
                        "id": 2640,
                        "title": "Provision of corporate services"
                      },
                      "account": {
                        "id": 35501,
                        "title": "Location account",
                        "type_id": 0,
                        "type": 0,
                        "comment": "",
                        "company_id": 4564
                      },
                      "client": {
                        "id": 4240788,
                        "name": "Client",
                        "phone": "+13155550175"
                      },
                      "master": [],
                      "supplier": []
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/technological_cards/{location_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Retrieve a list of bill of materials and consumables",
        "operationId": "get_bill_of_materials_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "parameter for searching by the name of those lists",
            "schema": {
              "type": "string"
            },
            "example": "'test'"
          },
          {
            "name": "page",
            "in": "query",
            "description": "page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "number of those lists per page",
            "schema": {
              "type": "number"
            },
            "example": 20
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/technological_cards_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Tech map 1",
                      "technological_card_items": [
                        {
                          "id": 3,
                          "technological_card_id": 1,
                          "storage_id": 4234,
                          "good_id": 34234,
                          "amount": 12,
                          "unit": "l",
                          "price": 0.0742,
                          "title": "Consumable 3"
                        }
                      ]
                    },
                    {
                      "id": 2,
                      "title": "Tech map 2",
                      "technological_card_items": [
                        {
                          "id": 4,
                          "technological_card_id": 2,
                          "storage_id": 4234,
                          "good_id": 34235,
                          "amount": 10,
                          "unit": "l",
                          "price": 0.02412,
                          "title": "Consumable 4"
                        }
                      ]
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/technological_cards/default_for_staff_and_service/{location_id}/{team_member_id}/{service_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get the Bill of Materials for a Team Member’s Service",
        "operationId": "get_team_member_service_bill_of_materials",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "team_member_id",
            "in": "path",
            "description": "team member ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/technological_cards_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "title": "Tech map 1",
                    "technological_card_items": [
                      {
                        "id": 3,
                        "technological_card_id": 1,
                        "storage_id": 4234,
                        "good_id": 34234,
                        "amount": 12,
                        "unit": "l",
                        "price": 0.0742,
                        "title": "Consumable 3"
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/technological_cards/record_consumables/{location_id}/{record_id}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Retrieve a list of bill of materials and consumables",
        "operationId": "get_appointment_consumables",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/technological_cards_consumables_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "service_id": 21558,
                      "record_id": 1233243,
                      "technological_cards": [
                        {
                          "id": 36069,
                          "title": "Tech map",
                          "technological_card_items": [
                            {
                              "id": 208568,
                              "technological_card_id": 36069,
                              "storage_id": 91303,
                              "good_id": 6858783,
                              "amount": 10,
                              "price": 1000,
                              "good": {
                                "id": 6858783,
                                "title": "Product",
                                "unit": "G"
                              }
                            }
                          ]
                        }
                      ],
                      "consumables": [
                        {
                          "goods_transaction_id": 2180771,
                          "record_id": 121793129,
                          "service_id": 695486,
                          "storage_id": 91303,
                          "good_id": 6858783,
                          "price": 1000,
                          "amount": 10,
                          "good": {
                            "id": 6858783,
                            "title": "Product",
                            "unit": "G"
                          }
                        }
                      ]
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/technological_cards/record_consumables/consumables/{location_id}/{record_id}/{service_id}": {
      "put": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Consumables for the Appointment-Service Association",
        "operationId": "update_appointment_service_consumables",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/consumables"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/technological_cards_consumables_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "service_id": 21558,
                      "record_id": 1233243,
                      "technological_cards": [
                        {
                          "id": 36069,
                          "title": "Tech map",
                          "technological_card_items": [
                            {
                              "id": 208568,
                              "technological_card_id": 36069,
                              "storage_id": 91303,
                              "good_id": 6858783,
                              "amount": 10,
                              "price": 1000,
                              "good": {
                                "id": 6858783,
                                "title": "Product",
                                "unit": "G"
                              }
                            }
                          ]
                        }
                      ],
                      "consumables": [
                        {
                          "goods_transaction_id": 2180771,
                          "record_id": 121793129,
                          "service_id": 695486,
                          "storage_id": 91303,
                          "good_id": 6858783,
                          "price": 1000,
                          "amount": 10,
                          "good": {
                            "id": 6858783,
                            "title": "Product",
                            "unit": "G"
                          }
                        }
                      ]
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/technological_cards/record_consumables/technological_cards/{location_id}/{record_id}/{service_id}": {
      "delete": {
        "tags": [
          "Inventory"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Unlink Appointment-Service Association",
        "operationId": "unlink_appointment_service_association",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "path",
            "description": "Appointment ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "service_id",
            "in": "path",
            "description": "Service ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "delete_consumables",
            "in": "query",
            "description": "Whether to remove consumables along with deleting bill of materials. Default 0",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "type": "object",
                "properties": {
                  "delete_consumables": {
                    "type": "number",
                    "description": "Whether to remove consumables along with deleting bill of materials. Default 0"
                  }
                },
                "example": []
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/technological_cards_consumables_response200_delete_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "service_id": 7224099,
                      "record_id": 310013764,
                      "technological_cards": [],
                      "consumables": []
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/sale/{document_id}": {
      "get": {
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Receipt of a Sales Transaction",
        "operationId": "get_sale_transaction",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Sales Document ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_salon_id_sale_documentid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "state": {
                      "items": [
                        {
                          "id": 2181520,
                          "type": "good",
                          "title": "item 12",
                          "amount": 1,
                          "default_cost_per_unit": 1300,
                          "default_cost_total": 1300,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 1170
                        },
                        {
                          "id": 22017,
                          "type": "service",
                          "document_id": 8200391,
                          "title": "Manicure",
                          "amount": 1,
                          "default_cost_per_unit": 500,
                          "default_cost_total": 500,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 450
                        }
                      ],
                      "loyalty_transactions": [
                        {
                          "id": 25042,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 9.9,
                          "type_id": 11,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "deposit_transaction_id": 775,
                          "chain": {
                            "id": 500,
                            "title": "YC BE Chain"
                          },
                          "type": {
                            "id": 11,
                            "title": "Withdrawal from personal account"
                          },
                          "deposit": {
                            "id": 220,
                            "balance": 990.1,
                            "reserved_balance": 0,
                            "type": {
                              "id": 5,
                              "title": "deposit 1"
                            }
                          }
                        },
                        {
                          "id": 25043,
                          "document_id": 8201102,
                          "amount": 0.1,
                          "type_id": 2,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_card_id": 185395,
                          "loyalty_program_id": 264,
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "type": {
                            "id": 2,
                            "title": "Loyalty programs"
                          },
                          "loyalty_card": {
                            "id": 185395,
                            "type_id": 265,
                            "number": 23100185395,
                            "balance": 50.15,
                            "type": {
                              "id": 265,
                              "type": "Loyalty program template test"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          },
                          "loyalty_program": {
                            "id": 264,
                            "title": "CASHBACK BigBro",
                            "type_id": 7,
                            "is_value_percent": true,
                            "type": {
                              "id": 7,
                              "title": "Cumulative cashback (paid)"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        },
                        {
                          "id": 25050,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 100,
                          "type_id": 8,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_certificate_id": 339,
                          "chain": {
                            "id": 79,
                            "title": "Bank 24"
                          },
                          "type": {
                            "id": 8,
                            "title": "Write-off from the certificate"
                          },
                          "loyalty_certificate": {
                            "id": 339,
                            "balance": 0,
                            "applicable_balance": 0,
                            "type": {
                              "id": 20,
                              "title": "Test Certificate",
                              "is_code_required": true
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        }
                      ],
                      "payment_transactions": [
                        {
                          "id": 6033940,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 32,
                          "account": {
                            "id": 90218,
                            "title": "Cash by default",
                            "is_cash": true,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6033941,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 27,
                          "account": {
                            "id": 90218,
                            "title": "location account",
                            "is_cash": true,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034121,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 43,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring by default",
                            "is_cash": false,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034122,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 12,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring",
                            "is_cash": false,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        }
                      ]
                    },
                    "kkm_state": {
                      "last_operation_type": 1,
                      "transactions": [
                        {
                          "id": 2424,
                          "document_id": 8200904,
                          "print_date": "2026-09-21T23:00:00.000-05:00",
                          "printed_count": 0,
                          "sum": 0,
                          "type": {
                            "id": 0,
                            "title": "Sale operation"
                          },
                          "status": {
                            "id": 1,
                            "title": "Successfully"
                          },
                          "document": {
                            "id": 7215,
                            "type": 1,
                            "type_title": "Sale of goods"
                          },
                          "cashier": {
                            "id": 746310,
                            "name": "Jack Smith"
                          }
                        }
                      ]
                    },
                    "payment_methods": [
                      {
                        "slug": "account",
                        "is_applicable": false,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "account_id": 36785,
                        "account": {
                          "id": 36785,
                          "title": "Location account - non-cash",
                          "is_cash": false
                        }
                      },
                      {
                        "slug": "loyalty_card",
                        "is_applicable": true,
                        "applicable_amount": 51.65,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_card_id": 19283,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_program",
                        "is_applicable": true,
                        "applicable_amount": 234,
                        "applicable_count": 0,
                        "applicable_value": 20,
                        "loyalty_card_id": 19283,
                        "loyalty_program_id": 183,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        },
                        "loyalty_program": {
                          "id": 183,
                          "title": "permanent discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_abonement",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_abonement_id": 27,
                        "loyalty_abonement": {
                          "id": 27,
                          "is_united_balance": false,
                          "united_balance": 0,
                          "type": {
                            "id": 7,
                            "title": "subscription to 5000 QA net",
                            "is_code_required": true
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "balance_container": {
                            "links": [
                              {
                                "count": 5,
                                "category": {
                                  "id": 229680,
                                  "category_id": 1,
                                  "title": "Manicure"
                                }
                              },
                              {
                                "count": 5,
                                "category": {
                                  "id": 429813,
                                  "category_id": 429812,
                                  "title": "1 Lesson"
                                }
                              }
                            ]
                          }
                        }
                      },
                      {
                        "slug": "loyalty_certificate",
                        "is_applicable": true,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_certificate_id": 338,
                        "loyalty_certificate": {
                          "id": 338,
                          "balance": 10000,
                          "applicable_balance": 10000,
                          "type": {
                            "id": 130,
                            "title": "test",
                            "is_code_required": true
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "referral_loyalty_program",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_program_id": 424,
                        "loyalty_program": {
                          "id": 424,
                          "title": "Fixed discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "deposit",
                        "is_applicable": true,
                        "applicable_amount": 9.9,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "deposit_id": 220,
                        "deposit": {
                          "id": 220,
                          "balance": 1000,
                          "reserved_balance": 0,
                          "type": {
                            "id": 5,
                            "title": "deposit 1"
                          }
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/sale/{document_id}/payment": {
      "post": {
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Payment at the Location Account and Loyalty (Various Methods)",
        "description": "As a response, information about the [Sale operation](#sale-operation) is returned",
        "operationId": "create_payment_with_loyalty_methods",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "description": "1. In the case of payment by a gift card, if the user does not have the \"Pay by gift card and membership without code\" right, the \"number\" (string) parameter containing the gift card code must also be passed in the request body.\n2. In the case of payment by membership, if the user does not have the \"Pay by gift card and membership without code\" right, the \"number\" (string) parameter containing the membership code must also be passed in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_account"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_deposit"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_certificate"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_abonements"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_referal"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_loyalty_card"
                  },
                  {
                    "$ref": "#/components/schemas/company_salonid_sale_documentid_payment_loyalty_program"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_salon_id_sale_documentid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "state": {
                      "items": [
                        {
                          "id": 2181520,
                          "type": "good",
                          "title": "item 12",
                          "amount": 1,
                          "default_cost_per_unit": 1300,
                          "default_cost_total": 1300,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 1170
                        },
                        {
                          "id": 22017,
                          "type": "service",
                          "document_id": 8200391,
                          "title": "Manicure",
                          "amount": 1,
                          "default_cost_per_unit": 500,
                          "default_cost_total": 500,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 450
                        }
                      ],
                      "loyalty_transactions": [
                        {
                          "id": 25042,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 9.9,
                          "type_id": 11,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "deposit_transaction_id": 775,
                          "chain": {
                            "id": 500,
                            "title": "YC BE chain"
                          },
                          "type": {
                            "id": 11,
                            "title": "Withdrawal from personal account"
                          },
                          "deposit": {
                            "id": 220,
                            "balance": 990.1,
                            "reserved_balance": 0,
                            "type": {
                              "id": 5,
                              "title": "deposit 1"
                            }
                          }
                        },
                        {
                          "id": 25043,
                          "document_id": 8201102,
                          "amount": 0.1,
                          "type_id": 2,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_card_id": 185395,
                          "loyalty_program_id": 264,
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "type": {
                            "id": 2,
                            "title": "Loyalty programs"
                          },
                          "loyalty_card": {
                            "id": 185395,
                            "type_id": 265,
                            "number": 23100185395,
                            "balance": 50.15,
                            "type": {
                              "id": 265,
                              "type": "Loyalty program template test"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          },
                          "loyalty_program": {
                            "id": 264,
                            "title": "CASHBACK BigBro",
                            "type_id": 7,
                            "is_value_percent": true,
                            "type": {
                              "id": 7,
                              "title": "Cumulative cashback (paid)"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        },
                        {
                          "id": 25050,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 100,
                          "type_id": 8,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_certificate_id": 339,
                          "chain": {
                            "id": 79,
                            "title": "Bank 24"
                          },
                          "type": {
                            "id": 8,
                            "title": "Write-off from the certificate"
                          },
                          "loyalty_certificate": {
                            "id": 339,
                            "balance": 0,
                            "applicable_balance": 0,
                            "type": {
                              "id": 20,
                              "title": "Test Certificate",
                              "is_code_required": true
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        }
                      ],
                      "payment_transactions": [
                        {
                          "id": 6033940,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 32,
                          "account": {
                            "id": 90218,
                            "title": "Cash by default",
                            "is_cash": true,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6033941,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 27,
                          "account": {
                            "id": 90218,
                            "title": "location account",
                            "is_cash": true,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034121,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 43,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring by default",
                            "is_cash": false,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034122,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 12,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring",
                            "is_cash": false,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        }
                      ]
                    },
                    "kkm_state": {
                      "last_operation_type": 1,
                      "transactions": [
                        {
                          "id": 2424,
                          "document_id": 8200904,
                          "print_date": "2026-09-21T23:00:00.000-05:00",
                          "printed_count": 0,
                          "sum": 0,
                          "type": {
                            "id": 0,
                            "title": "Sale operation"
                          },
                          "status": {
                            "id": 1,
                            "title": "Successfully"
                          },
                          "document": {
                            "id": 7215,
                            "type": 1,
                            "type_title": "Sale of goods"
                          },
                          "cashier": {
                            "id": 746310,
                            "name": "Jack Smith"
                          }
                        }
                      ]
                    },
                    "payment_methods": [
                      {
                        "slug": "account",
                        "is_applicable": false,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "account_id": 36785,
                        "account": {
                          "id": 36785,
                          "title": "Location account - non-cash",
                          "is_cash": false
                        }
                      },
                      {
                        "slug": "loyalty_card",
                        "is_applicable": true,
                        "applicable_amount": 51.65,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_card_id": 19283,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_program",
                        "is_applicable": true,
                        "applicable_amount": 234,
                        "applicable_count": 0,
                        "applicable_value": 20,
                        "loyalty_card_id": 19283,
                        "loyalty_program_id": 183,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        },
                        "loyalty_program": {
                          "id": 183,
                          "title": "permanent discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_abonement",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_abonement_id": 27,
                        "loyalty_abonement": {
                          "id": 27,
                          "is_united_balance": false,
                          "united_balance": 0,
                          "type": {
                            "id": 7,
                            "title": "subscription to 5000 QA net",
                            "is_code_required": true
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "balance_container": {
                            "links": [
                              {
                                "count": 5,
                                "category": {
                                  "id": 229680,
                                  "category_id": 1,
                                  "title": "Manicure"
                                }
                              },
                              {
                                "count": 5,
                                "category": {
                                  "id": 429813,
                                  "category_id": 429812,
                                  "title": "1 Lesson"
                                }
                              }
                            ]
                          }
                        }
                      },
                      {
                        "slug": "loyalty_certificate",
                        "is_applicable": true,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_certificate_id": 338,
                        "loyalty_certificate": {
                          "id": 338,
                          "balance": 10000,
                          "applicable_balance": 10000,
                          "type": {
                            "id": 130,
                            "title": "test",
                            "is_code_required": true
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "referral_loyalty_program",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_program_id": 424,
                        "loyalty_program": {
                          "id": 424,
                          "title": "Fixed discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "deposit",
                        "is_applicable": true,
                        "applicable_amount": 9.9,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "deposit_id": 220,
                        "deposit": {
                          "id": 220,
                          "balance": 1000,
                          "reserved_balance": 0,
                          "type": {
                            "id": 5,
                            "title": "deposit 1"
                          }
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/sale/{document_id}/payment/loyalty_transaction/{payment_transaction_id}": {
      "delete": {
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete a Loyalty Payment Transaction",
        "description": "As a response, information about the [Sale operation](#sale-operation) is returned",
        "operationId": "delete_loyalty_payment_transaction",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Sales Document ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "payment_transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_salon_id_sale_documentid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "state": {
                      "items": [
                        {
                          "id": 2181520,
                          "type": "good",
                          "title": "item 12",
                          "amount": 1,
                          "default_cost_per_unit": 1300,
                          "default_cost_total": 1300,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 1170
                        },
                        {
                          "id": 22017,
                          "type": "service",
                          "document_id": 8200391,
                          "title": "Manicure",
                          "amount": 1,
                          "default_cost_per_unit": 500,
                          "default_cost_total": 500,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 450
                        }
                      ],
                      "loyalty_transactions": [
                        {
                          "id": 25042,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 9.9,
                          "type_id": 11,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "deposit_transaction_id": 775,
                          "chain": {
                            "id": 500,
                            "title": "YC BE chain"
                          },
                          "type": {
                            "id": 11,
                            "title": "Withdrawal from personal account"
                          },
                          "deposit": {
                            "id": 220,
                            "balance": 990.1,
                            "reserved_balance": 0,
                            "type": {
                              "id": 5,
                              "title": "deposit 1"
                            }
                          }
                        },
                        {
                          "id": 25043,
                          "document_id": 8201102,
                          "amount": 0.1,
                          "type_id": 2,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_card_id": 185395,
                          "loyalty_program_id": 264,
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "type": {
                            "id": 2,
                            "title": "Loyalty programs"
                          },
                          "loyalty_card": {
                            "id": 185395,
                            "type_id": 265,
                            "number": 23100185395,
                            "balance": 50.15,
                            "type": {
                              "id": 265,
                              "type": "Loyalty program template test"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          },
                          "loyalty_program": {
                            "id": 264,
                            "title": "CASHBACK BigBro",
                            "type_id": 7,
                            "is_value_percent": true,
                            "type": {
                              "id": 7,
                              "title": "Cumulative cashback (paid)"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        },
                        {
                          "id": 25050,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 100,
                          "type_id": 8,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_certificate_id": 339,
                          "chain": {
                            "id": 79,
                            "title": "Bank 24"
                          },
                          "type": {
                            "id": 8,
                            "title": "Write-off from the certificate"
                          },
                          "loyalty_certificate": {
                            "id": 339,
                            "balance": 0,
                            "applicable_balance": 0,
                            "type": {
                              "id": 20,
                              "title": "Test Certificate",
                              "is_code_required": true
                            }
                          }
                        }
                      ],
                      "payment_transactions": [
                        {
                          "id": 6033940,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 32,
                          "account": {
                            "id": 90218,
                            "title": "Cash by default",
                            "is_cash": true,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6033941,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 27,
                          "account": {
                            "id": 90218,
                            "title": "location account",
                            "is_cash": true,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034121,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 43,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring by default",
                            "is_cash": false,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034122,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 12,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring",
                            "is_cash": false,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        }
                      ]
                    },
                    "kkm_state": {
                      "last_operation_type": 1,
                      "transactions": [
                        {
                          "id": 2424,
                          "document_id": 8200904,
                          "print_date": "2026-09-21T23:00:00.000-05:00",
                          "printed_count": 0,
                          "sum": 0,
                          "type": {
                            "id": 0,
                            "title": "Sale operation"
                          },
                          "status": {
                            "id": 1,
                            "title": "Successfully"
                          },
                          "document": {
                            "id": 7215,
                            "type": 1,
                            "type_title": "Sale of goods"
                          },
                          "cashier": {
                            "id": 746310,
                            "name": "Jack Smith"
                          }
                        }
                      ]
                    },
                    "payment_methods": [
                      {
                        "slug": "account",
                        "is_applicable": false,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "account_id": 36785,
                        "account": {
                          "id": 36785,
                          "title": "Location account - non-cash",
                          "is_cash": false
                        }
                      },
                      {
                        "slug": "loyalty_card",
                        "is_applicable": true,
                        "applicable_amount": 51.65,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_card_id": 19283,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_program",
                        "is_applicable": true,
                        "applicable_amount": 234,
                        "applicable_count": 0,
                        "applicable_value": 20,
                        "loyalty_card_id": 19283,
                        "loyalty_program_id": 183,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        },
                        "loyalty_program": {
                          "id": 183,
                          "title": "permanent discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_abonement",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_abonement_id": 27,
                        "loyalty_abonement": {
                          "id": 27,
                          "is_united_balance": false,
                          "united_balance": 0,
                          "type": {
                            "id": 7,
                            "title": "subscription to 5000 QA net",
                            "is_code_required": true
                          },
                          "balance_container": {
                            "links": [
                              {
                                "count": 5,
                                "category": {
                                  "id": 229680,
                                  "category_id": 1,
                                  "title": "Manicure"
                                }
                              },
                              {
                                "count": 5,
                                "category": {
                                  "id": 429813,
                                  "category_id": 429812,
                                  "title": "1 Lesson"
                                }
                              }
                            ]
                          }
                        }
                      },
                      {
                        "slug": "loyalty_certificate",
                        "is_applicable": true,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_certificate_id": 338,
                        "loyalty_certificate": {
                          "id": 338,
                          "balance": 10000,
                          "applicable_balance": 10000,
                          "type": {
                            "id": 130,
                            "title": "test",
                            "is_code_required": true
                          }
                        }
                      },
                      {
                        "slug": "referral_loyalty_program",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_program_id": 424,
                        "loyalty_program": {
                          "id": 424,
                          "title": "Fixed discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "deposit",
                        "is_applicable": true,
                        "applicable_amount": 9.9,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "deposit_id": 220,
                        "deposit": {
                          "id": 220,
                          "balance": 1000,
                          "reserved_balance": 0,
                          "type": {
                            "id": 5,
                            "title": "deposit 1"
                          }
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/sale/{document_id}/payment/payment_transaction/{payment_transaction_id}": {
      "delete": {
        "tags": [
          "Sales"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete a Cashier Payment Transaction",
        "description": "As a response, information about the [Sale operation](#sale-operation) is returned",
        "operationId": "delete_location_account_payment",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Sales Document ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "payment_transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_salon_id_sale_documentid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "state": {
                      "items": [
                        {
                          "id": 2181520,
                          "type": "good",
                          "title": "item 12",
                          "amount": 1,
                          "default_cost_per_unit": 1300,
                          "default_cost_total": 1300,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 1170
                        },
                        {
                          "id": 22017,
                          "type": "service",
                          "document_id": 8200391,
                          "title": "Manicure",
                          "amount": 1,
                          "default_cost_per_unit": 500,
                          "default_cost_total": 500,
                          "client_discount_percent": 10,
                          "cost_to_pay_total": 450
                        }
                      ],
                      "loyalty_transactions": [
                        {
                          "id": 25042,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 9.9,
                          "type_id": 11,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "deposit_transaction_id": 775,
                          "chain": {
                            "id": 500,
                            "title": "YC BE Chain"
                          },
                          "type": {
                            "id": 11,
                            "title": "Withdrawal from personal account"
                          },
                          "deposit": {
                            "id": 220,
                            "balance": 990.1,
                            "reserved_balance": 0,
                            "type": {
                              "id": 5,
                              "title": "deposit 1"
                            }
                          }
                        },
                        {
                          "id": 25043,
                          "document_id": 8201102,
                          "amount": 0.1,
                          "type_id": 2,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_card_id": 185395,
                          "loyalty_program_id": 264,
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          },
                          "type": {
                            "id": 2,
                            "title": "Loyalty programs"
                          },
                          "loyalty_card": {
                            "id": 185395,
                            "type_id": 265,
                            "number": 23100185395,
                            "balance": 50.15,
                            "type": {
                              "id": 265,
                              "type": "Loyalty program template test"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          },
                          "loyalty_program": {
                            "id": 264,
                            "title": "CASHBACK BigBro",
                            "type_id": 7,
                            "is_value_percent": true,
                            "type": {
                              "id": 7,
                              "title": "Cumulative cashback (paid)"
                            },
                            "chain": {
                              "id": 231,
                              "title": "Example chain."
                            }
                          }
                        },
                        {
                          "id": 25050,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "amount": 100,
                          "type_id": 8,
                          "created_at": "2026-09-21T23:00:00.000-05:00",
                          "loyalty_certificate_id": 339,
                          "chain": {
                            "id": 79,
                            "title": "Bank 24"
                          },
                          "type": {
                            "id": 8,
                            "title": "Write-off from the certificate"
                          },
                          "loyalty_certificate": {
                            "id": 339,
                            "balance": 0,
                            "applicable_balance": 0,
                            "type": {
                              "id": 20,
                              "title": "Test Certificate",
                              "is_code_required": true
                            }
                          }
                        }
                      ],
                      "payment_transactions": [
                        {
                          "id": 6033940,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 32,
                          "account": {
                            "id": 90218,
                            "title": "Cash by default",
                            "is_cash": true,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6033941,
                          "document_id": 8200904,
                          "sale_item_id": 2181442,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 90218,
                          "amount": 27,
                          "account": {
                            "id": 90218,
                            "title": "location account",
                            "is_cash": true,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034121,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 43,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring by default",
                            "is_cash": false,
                            "is_default": true
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        },
                        {
                          "id": 6034122,
                          "document_id": 8201102,
                          "sale_item_id": 2181521,
                          "sale_item_type": "good",
                          "expense_id": 7,
                          "account_id": 23182,
                          "amount": 12,
                          "account": {
                            "id": 23182,
                            "title": "Cards - acquiring",
                            "is_cash": false,
                            "is_default": false
                          },
                          "expense": {
                            "id": 7,
                            "title": "Sale of goods"
                          }
                        }
                      ]
                    },
                    "kkm_state": {
                      "last_operation_type": 1,
                      "transactions": [
                        {
                          "id": 2424,
                          "document_id": 8200904,
                          "print_date": "2026-09-21T23:00:00.000-05:00",
                          "printed_count": 0,
                          "sum": 0,
                          "type": {
                            "id": 0,
                            "title": "Sale operation"
                          },
                          "status": {
                            "id": 1,
                            "title": "Successfully"
                          },
                          "document": {
                            "id": 7215,
                            "type": 1,
                            "type_title": "Sale of goods"
                          },
                          "cashier": {
                            "id": 746310,
                            "name": "Jack Smith"
                          }
                        }
                      ]
                    },
                    "payment_methods": [
                      {
                        "slug": "account",
                        "is_applicable": false,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "account_id": 36785,
                        "account": {
                          "id": 36785,
                          "title": "Location account - non-cash",
                          "is_cash": false
                        }
                      },
                      {
                        "slug": "loyalty_card",
                        "is_applicable": true,
                        "applicable_amount": 51.65,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_card_id": 19283,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_program",
                        "is_applicable": true,
                        "applicable_amount": 234,
                        "applicable_count": 0,
                        "applicable_value": 20,
                        "loyalty_card_id": 19283,
                        "loyalty_program_id": 183,
                        "loyalty_card": {
                          "id": 19283,
                          "type_id": 155,
                          "number": 31200019283,
                          "balance": 51.65,
                          "type": {
                            "id": 155,
                            "type": "discount card"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        },
                        "loyalty_program": {
                          "id": 183,
                          "title": "permanent discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 312,
                            "title": "Trinity group"
                          }
                        }
                      },
                      {
                        "slug": "loyalty_abonement",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_abonement_id": 27,
                        "loyalty_abonement": {
                          "id": 27,
                          "is_united_balance": false,
                          "united_balance": 0,
                          "type": {
                            "id": 7,
                            "title": "subscription to 5000 QA net",
                            "is_code_required": true
                          },
                          "balance_container": {
                            "links": [
                              {
                                "count": 5,
                                "category": {
                                  "id": 229680,
                                  "category_id": 1,
                                  "title": "Manicure"
                                }
                              },
                              {
                                "count": 5,
                                "category": {
                                  "id": 429813,
                                  "category_id": 429812,
                                  "title": "1 Lesson"
                                }
                              }
                            ]
                          }
                        }
                      },
                      {
                        "slug": "loyalty_certificate",
                        "is_applicable": true,
                        "applicable_amount": 1170,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_certificate_id": 338,
                        "loyalty_certificate": {
                          "id": 338,
                          "balance": 10000,
                          "applicable_balance": 10000,
                          "type": {
                            "id": 130,
                            "title": "test",
                            "is_code_required": true
                          }
                        }
                      },
                      {
                        "slug": "referral_loyalty_program",
                        "is_applicable": false,
                        "applicable_amount": 0,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "loyalty_program_id": 424,
                        "loyalty_program": {
                          "id": 424,
                          "title": "Fixed discount",
                          "type_id": 1,
                          "is_value_percent": true,
                          "type": {
                            "id": 1,
                            "title": "Fixed discount"
                          },
                          "chain": {
                            "id": 231,
                            "title": "Example chain."
                          }
                        }
                      },
                      {
                        "slug": "deposit",
                        "is_applicable": true,
                        "applicable_amount": 9.9,
                        "applicable_count": 0,
                        "applicable_value": 0,
                        "deposit_id": 220,
                        "deposit": {
                          "id": 220,
                          "balance": 1000,
                          "reserved_balance": 0,
                          "type": {
                            "id": 5,
                            "title": "deposit 1"
                          }
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{location_id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get location accounts",
        "description": "The location account object has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| id | number | Location account ID |\r\n| title | string | Title |\r\n| type | number | 1 - for non-cash payments, 0 for cash |\r\n| comment | string | Description to the location account |",
        "operationId": "get_account_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accounts_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 13881,
                      "title": "Main location account",
                      "type": 0,
                      "comment": "Standing at the reception"
                    },
                    {
                      "id": 13882,
                      "title": "Payment account",
                      "type": 1,
                      "comment": "For non-cash payments"
                    },
                    {
                      "id": 21961,
                      "title": "Advances",
                      "type": 0,
                      "comment": ""
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/kkm_transactions/{location_id}": {
      "get": {
        "tags": [
          "Fiscalization"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get fiscal transactions",
        "operationId": "get_fiscal_transaction_list",
        "description": "Filters\n\n| Parameter | Description |\n| ------------- | ------------- |\n| page | Page number |\n| editable_length | Number of clients per page |\n| type | Operation type |\n| status | Operation status |\n| start_date | Period start date |\n| end_date | Period end date |\n\n<a name=\"kkm-transaction-types\"></a>\nTypes of all transactions with location account\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 |  Sales operation – Active for documents of type Visit |\n| 1 | Sale return operation – Active for documents of type Visit |\n| 2 | Correction operation |\n| 4 | Shift opening operation – Opens a new POS shift |\n| 5 | Shift closing operation – Closes the current POS shift |\n| 9 | Get POS status – Retrieves the current status of the POS device |\n| 11 | Get POS team status – Retrieves the status of all POS devices connected to the team |\n| 12 | Correction operation |\n| 13 | Print X-report – Prints a non-fiscal summary report of the current shift |\n| 6 | Cash deposit – Registers a cash-in transaction in the POS |\n| 7 | Cash withdrawal – Registers a cash-out transaction in the POS |\n\nStatuses of All POS Operations\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 |  Connection error with POS – Unable to establish a connection with the POS device |\n| 1 |  Success – Operation completed successfully |\n| 2 | Sent for printing – The request has been sent to the POS and is waiting for print completion |\n| 3 | Runtime error – An error occurred while processing the operation on the POS device |\n| 4 | Status check error – Failed to retrieve the current status of the POS |\n| 5 | Waiting for POS readiness – Operation is pending until the POS device becomes ready |\n\nDocument Types\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 1 | Sale of products |\n| 2 | Provision of services |\n| 3 | Arrival of products |\n| 4 | Products write-off |\n| 5 | Transfer of products |\n| 6 | Inventory |\n| 7 | Visit |\n| 8 | Consumables write-off |\n| 9 | Deposit replenishment |",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "editable_length",
            "in": "query",
            "description": "Number of customers per page",
            "schema": {
              "type": "number"
            },
            "example": 25
          },
          {
            "name": "type",
            "in": "query",
            "description": "Type of transaction",
            "schema": {
              "type": "number"
            },
            "example": 20
          },
          {
            "name": "status",
            "in": "query",
            "description": "Operation status",
            "schema": {
              "type": "number"
            },
            "example": 6
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Period start date",
            "schema": {
              "type": "number"
            },
            "example": 20251201
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Period end date",
            "schema": {
              "type": "number"
            },
            "example": 20251231
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer access_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/kkm_transactions_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1059,
                      "print_date": "2026-09-21T23:00:00.000-05:00",
                      "printed_count": 1,
                      "sum": 10,
                      "type": {
                        "id": 1,
                        "title": "Sales return operation"
                      },
                      "status": {
                        "id": 3,
                        "title": "Runtime error"
                      },
                      "document": {
                        "id": 2045,
                        "type": 7,
                        "type_title": "Visit"
                      },
                      "cashier": {
                        "id": 746310,
                        "name": "Jack Smith"
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/kkm_transactions/{location_id}/print_document_bill": {
      "post": {
        "tags": [
          "Fiscalization"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Print fiscal receipt",
        "description": "Types of all transactions with location account\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 0 | Sale operation (active for documents with types \"Visit\" and \"Client account replenishment\") |\n| 1 | Sale return operation (active for documents with types \"Visit\" and \"Client account replenishment\") |\n| 2 | Correction operation |\n| 4 | Shift opening operation – Opens a new POS shift |\n| 5 | Shift closing operation – Closes the current POS shift |\n| 9 | Get POS status – Retrieves the current status of the POS device |\n| 11 | Get POS team status – Retrieves the status of all POS devices connected to the team |\n| 12 | Correction operation |\n| 13 | Print X-report – Prints a non-fiscal summary report of the current shift |\n| 6 | Cash deposit – Registers a cash-in transaction in the POS |\n| 7 | Cash withdrawal – Registers a cash-out transaction in the POS |\n\nDocument Types\n\n| Meaning | Description |\n| ------------- | ------------- |\n| 1 | Sale of products |\n| 2 | Provision of services |\n| 3 | Arrival of products |\n| 4 | Products write-off |\n| 5 | Transfer of products |\n| 6 | Inventory |\n| 7 | Visit |\n| 8 | Consumables write-off |\n| 9 | Client account replenishment |",
        "operationId": "print_fiscal_receipt",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "document_id",
                  "type"
                ],
                "type": "object",
                "properties": {
                  "document_id": {
                    "type": "number",
                    "description": "Document ID"
                  },
                  "type": {
                    "type": "number",
                    "description": "type of operation with location account (see table of types of all operations)"
                  },
                  "is_pos_enabled": {
                    "type": "boolean",
                    "description": "enable POS terminal (default false)"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/kkm_transactions_print_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "kkm_type": 0,
                    "kkm_transactions": [
                      {
                        "id": 1954,
                        "print_date": "2026-09-21T23:00:00.000-05:00",
                        "printed_count": 0,
                        "sum": 0,
                        "type": {
                          "id": 0,
                          "title": "Sale operation"
                        },
                        "status": {
                          "id": 2,
                          "title": "Sent for printing"
                        },
                        "document": {
                          "id": 164,
                          "type": 9,
                          "type_title": "Deposit replenishment"
                        },
                        "cashier": {
                          "id": 1138453,
                          "name": "Jack Smith"
                        }
                      }
                    ],
                    "status": 2,
                    "bill_json": [
                      []
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/transactions/{location_id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get transactions",
        "description": "#### Transaction filtering\n\n+ page: Page number\n\n+ count: Number of customers per page\n\n+ account_id: Checkout ID\n\n+ supplier_id: Supplier ID\n\n+ client_id: Client ID\n\n+ user_id: user ID\n\n+ master_id: team member ID\n\n+ type: transaction type\n\n+ real_money: Indicates whether this is a real-money (fiat) transaction\n\n+ deleted: whether the transaction was deleted\n\n+ start_date: start date of the period\n\n+ end_date: end date of the period\n\n+ balance_is: 0 - any balance, 1 - positive, 2 - negative\n\n+ document_id: document ID",
        "operationId": "get_transactions",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of customers per page",
            "schema": {
              "type": "number"
            },
            "example": 50
          },
          {
            "name": "account_id",
            "in": "query",
            "description": "Checkout ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "supplier_id",
            "in": "query",
            "description": "Supplier ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Client ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "User ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "master_id",
            "in": "query",
            "description": "team member ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "type",
            "in": "query",
            "description": "transaction type",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "real_money",
            "in": "query",
            "description": "Indicates whether this is a real-money (fiat) transaction",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "deleted",
            "in": "query",
            "description": "whether the transaction was deleted",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "period start date",
            "schema": {
              "type": "number"
            },
            "example": 20251201
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "period end date",
            "schema": {
              "type": "number"
            },
            "example": 20251231
          },
          {
            "name": "balance_is",
            "in": "query",
            "description": "0 - any balance, 1 - positive, 2 - negative",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "document_id",
            "in": "query",
            "description": "document ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transaction_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 4815162342,
                      "document_id": 22256641,
                      "expense": {
                        "id": 5,
                        "title": "Provision of services"
                      },
                      "date": "2026-04-13T15:34:31-0500",
                      "amount": 1000,
                      "comment": "Comment",
                      "master": {
                        "id": 1926,
                        "title": "Sweeney Todd"
                      },
                      "supplier": {
                        "id": 1968,
                        "title": "George"
                      },
                      "account": {
                        "id": 23182,
                        "title": "Cards"
                      },
                      "client": {
                        "id": 481516,
                        "name": "John Turk",
                        "phone": 13155550176
                      },
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "record_id": 308786662,
                      "visit_id": 262551993,
                      "sold_item_id": 7134634,
                      "sold_item_type": "service"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/timetable/transactions/{location_id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Transactions by Visit or Appointment ID",
        "description": "#### Transaction filtering\n\n+ record_id: Appointment ID\n\n+ visit_id: ID of the visit",
        "operationId": "get_transactions_by_visit_or_appointment_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "record_id",
            "in": "query",
            "description": "Appointment ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "visit_id",
            "in": "query",
            "description": "Visit ID",
            "schema": {
              "type": "number"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transaction_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 4815162342,
                      "document_id": 22256641,
                      "expense": {
                        "id": 5,
                        "title": "Provision of services"
                      },
                      "date": "2026-04-13T15:34:31-0500",
                      "amount": 1000,
                      "comment": "Comment",
                      "master": {
                        "id": 1926,
                        "title": "Sweeney Todd"
                      },
                      "supplier": {
                        "id": 1968,
                        "title": "George"
                      },
                      "account": {
                        "id": 23182,
                        "title": "Cards"
                      },
                      "client": {
                        "id": 481516,
                        "name": "John Turk",
                        "phone": 13155550176
                      },
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "record_id": 308786662,
                      "visit_id": 262551993,
                      "sold_item_id": 7134634,
                      "sold_item_type": "service"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/finance_transactions/{location_id}": {
      "post": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a Financial Transaction",
        "operationId": "create_financial_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/finance_transaction_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/finance_transaction_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 277016617,
                    "document_id": 0,
                    "date": "2026-09-21T23:00:00.000-05:00",
                    "type_id": 5,
                    "expense_id": 5,
                    "account_id": 774020,
                    "amount": 100,
                    "client_id": 51520012,
                    "master_id": 921395,
                    "supplier_id": 0,
                    "comment": "Transaction comment",
                    "item_id": 0,
                    "target_type_id": 0,
                    "record_id": 0,
                    "goods_transaction_id": 0,
                    "expense": {
                      "id": 5,
                      "title": "Provision of services"
                    },
                    "account": {
                      "id": 774020,
                      "title": "Archive location account",
                      "is_cash": true,
                      "is_default": false
                    },
                    "client": {
                      "id": 51520012,
                      "name": "Sweeney Todd",
                      "phone": "+13155550175",
                      "email": "mail@example.com"
                    },
                    "master": {
                      "id": 921395,
                      "name": "Valeria"
                    },
                    "supplier": []
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/finance_transactions/{location_id}/{transaction_id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Getting a financial transaction",
        "operationId": "get_financial_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transaction_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 4815162342,
                      "document_id": 22256641,
                      "expense": {
                        "id": 5,
                        "title": "Provision of services"
                      },
                      "date": "2026-04-13T15:34:31-0500",
                      "amount": 1000,
                      "comment": "Comment",
                      "master": {
                        "id": 1926,
                        "title": "Sweeney Todd"
                      },
                      "supplier": {
                        "id": 1968,
                        "title": "George"
                      },
                      "account": {
                        "id": 23182,
                        "title": "Cards"
                      },
                      "client": {
                        "id": 481516,
                        "name": "John Turk",
                        "phone": 13155550176
                      },
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "record_id": 308786662,
                      "visit_id": 262551993,
                      "sold_item_id": 7134634,
                      "sold_item_type": "service"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Financial Transaction Update",
        "operationId": "update_financial_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/finance_transaction_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/transaction_companyid_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 4815162342,
                      "document_id": 22256641,
                      "expense": {
                        "id": 5,
                        "title": "Provision of services"
                      },
                      "date": "2026-04-13T15:34:31-0500",
                      "amount": 1000,
                      "comment": "Comment",
                      "master": {
                        "id": 1926,
                        "title": "Sweeney Todd"
                      },
                      "supplier": {
                        "id": 1968,
                        "title": "George"
                      },
                      "account": {
                        "id": 23182,
                        "title": "Cards"
                      },
                      "client": {
                        "id": 481516,
                        "name": "John Turk",
                        "phone": 13155550176
                      },
                      "last_change_date": "2026-02-01T12:00:00-0500",
                      "record_id": 308786662,
                      "visit_id": 262551993,
                      "sold_item_id": 7134634,
                      "sold_item_type": "service"
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Payments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Deleting a transaction",
        "operationId": "delete_financial_transaction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "transaction_id",
            "in": "path",
            "description": "transaction ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/sms/clients/by_id/{location_id}": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Send SMS to the list of clients",
        "description": "The object for creating SMS mailing has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| client_ids | array of numbers | Array of client IDs |\r\n| text | string | SMS text message |",
        "operationId": "send_sms_to_clients",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sms_clients_by_id_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sms_clients_by_id_response_data_types"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required - Insufficient funds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Insufficient funds on the account. Refill your balance."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity - validation errors or insufficient funds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/sms/clients/by_filter/{location_id}": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Send SMS campaigns to customers matching the filters",
        "description": "The object for creating SMS mailing has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| text | string | SMS text message |\r\n\r\n#### Client filtering\r\n+ fullname:'Joh' (optional, string) - Name (part of name) to filter clients\r\n+ phone:'1315' (optional, string) - Phone (part of the number) to filter clients\r\n+ email:'test@' (optional, string) - Email (part) for client filtering\r\n+ card:'5663rt' (optional, string) - Card (part) to filter customers by loyalty card number\r\n\r\nAttention: If there are no filters, SMS mailing will go to the entire database!",
        "operationId": "send_sms_campaign_to_filtered_clients",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fullname",
            "in": "query",
            "description": "Name (part of the name) for client filtering",
            "schema": {
              "type": "string"
            },
            "example": "'Joh'"
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Phone (part of the number) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "'1315'"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Email (part) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "'test@'"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sms_clients_by_filter_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sms_clients_by_id_response_data_types"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/email/clients/by_id/{location_id}": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Send Email newsletter according to the list of clients",
        "description": "The object for creating an Email campaign has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| client_ids | array of numbers | Array of client IDs |\r\n| text | string | Text Email Message |\r\n| subject | string | Email Subject |",
        "operationId": "send_email_newsletter_to_clients",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/email_clients_by_id_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sms_clients_by_id_response_data_types"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/email/clients/by_filter/{location_id}": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Send email campaigns for clients matching the filters",
        "description": "The object for creating an Email campaign has the following fields:\r\n\r\n| Field | Type | Description |\r\n| ------------- | ------------- | ------------- |\r\n| text | string | Text Email Message |\r\n| subject | string | Email Subject |\r\n\r\n#### Client filtering\r\n+ fullname:'Joh' (optional, string) - Name (part of name) to filter clients\r\n+ phone:'1315' (optional, string) - Phone (part of the number) to filter clients\r\n+ email:'test@' (optional, string) - Email (part) for client filtering\r\n+ card:'5663rt' (optional, string) - Card (part) to filter customers by loyalty card number\r\n\r\nAttention: If there are no filters, email distribution will go to the entire database!",
        "operationId": "send_email_campaign_to_filtered_clients",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "fullname",
            "in": "query",
            "description": "Name (part of the name) for client filtering",
            "schema": {
              "type": "string"
            },
            "example": "'Joh'"
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Phone (part of the number) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "'1315'"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Email (part) for customer filtering",
            "schema": {
              "type": "string"
            },
            "example": "'test@'"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/email_clients_by_filter_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sms_clients_by_id_response_data_types"
                },
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/delivery/status": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Getting Message Statuses",
        "description": "### Get message statuses\n| Number | Title |\n| ------------- | ------------- |\n| 1 | Delivered |\n| 2 | Not delivered |\n| 4 | Sent to phone |\n| 8 | Transferred to the operator |\n| 16 | Rejected by operator |\n| 52 | Not enough funds |\n\nIn the event of an error, the corresponding HTTP status code is returned. In some cases, a descriptive error message is also included in the response.\nThe following error codes may be returned by all API methods:\n\n| error code | Http status code | Title | Description |\n| ------------- | ------------- | ------------- | ------------- |\n| 5 | 400 | ENTITY_VALIDATION_ERROR | The request body did not pass validation |\n| 10 | 400 | FIELD_VALIDATION_ERROR | Parameter not validated |\n| 15 | 403 | ACCESS_FORBIDDEN | The action is not available, the application does not have the required permissions. |\n| 20 | 401 | INVALID_PARTNER_TOKEN | partner_token missing or invalid |\n| 30 | 404 | RESOURCE_NOT_FOUND | The resource at the requested path does not exist |\n\nWhen sending SMS, the delivery_callback_url attribute is passed in the request - this is the url to which message statuses should be sent.\n\nUse it to send message statuses. Url to which message statuses should be sent - https://app.alteg.io/smsprovider/status/callback/{partner_token}",
        "operationId": "get_message_status_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/delivery_status_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "example": {
                  "error_code": 5,
                  "error_message": "explicit error message"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "example": {
                  "error_code": 20,
                  "error_message": "explicit error message"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "example": {
                  "error_code": 30,
                  "error_message": "explicit error message"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/settings/online": {
      "get": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Online Booking Settings",
        "operationId": "get_online_booking_settings",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Online Booking Settings Data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_get_online_settings_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "confirm_number": false,
                    "any_master": true,
                    "seance_delay_step": 90,
                    "activity_online_record_clients_count_max": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Online Booking Settings",
        "operationId": "update_online_booking_settings",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/company_update_online_settings_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated online booking settings data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_get_online_settings_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "confirm_number": false,
                    "any_master": true,
                    "seance_delay_step": 90,
                    "activity_online_record_clients_count_max": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/settings/timeslots": {
      "get": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get timeslot settings",
        "description": "Retrieves the timeslot configuration for online booking at a location.\n\nTimeslot settings control how available booking times are displayed to clients:\n- Grid type (predefined, schedule-based, or dynamic)\n- Available time range\n- Step interval between slots\n- Delay before nearest available slot\n- Per-weekday and per-date overrides\n\n**Timeslot values are in seconds from midnight** (e.g., 7200 = 02:00, 50400 = 14:00).\n",
        "operationId": "get_timeslot_settings",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          }
        ],
        "responses": {
          "200": {
            "description": "Timeslot settings retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "description": "Timeslot settings object",
                      "properties": {
                        "is_enabled": {
                          "type": "boolean",
                          "description": "Whether custom timeslots are enabled",
                          "example": true
                        },
                        "weekdays_settings": {
                          "type": "array",
                          "description": "Settings for each day of the week",
                          "items": {
                            "type": "object",
                            "properties": {
                              "weekday": {
                                "type": "integer",
                                "description": "Day of week (1 = Monday, 7 = Sunday)",
                                "minimum": 1,
                                "maximum": 7,
                                "example": 1
                              },
                              "timeslots": {
                                "type": "array",
                                "description": "Available timeslots in seconds from midnight.\nOnly used when grid_base_type = \"predefined\".\n",
                                "items": {
                                  "type": "integer"
                                },
                                "example": [
                                  7200,
                                  14400,
                                  21600
                                ]
                              },
                              "setting": {
                                "type": "object",
                                "description": "Grid generation rules",
                                "properties": {
                                  "grid_first_timeslot": {
                                    "type": "integer",
                                    "description": "Earliest available slot time in seconds from midnight",
                                    "example": 0
                                  },
                                  "grid_last_timeslot": {
                                    "type": "integer",
                                    "description": "Latest available slot time in seconds from midnight",
                                    "example": 85800
                                  },
                                  "grid_display_step": {
                                    "type": "integer",
                                    "description": "Interval between displayed slots in seconds",
                                    "example": 7200
                                  },
                                  "grid_nearest_timeslot_delay": {
                                    "type": "integer",
                                    "description": "Minimum delay before nearest available slot in seconds",
                                    "example": 1800
                                  },
                                  "grid_base_type": {
                                    "type": "string",
                                    "description": "Grid type: predefined, schedule, or timeslots",
                                    "enum": [
                                      "predefined",
                                      "schedule",
                                      "timeslots"
                                    ],
                                    "example": "predefined"
                                  },
                                  "is_grid_flexible": {
                                    "type": "boolean",
                                    "description": "Whether to add a flexible slot option",
                                    "example": false
                                  }
                                }
                              }
                            }
                          }
                        },
                        "dates_settings": {
                          "type": "array",
                          "description": "Per-date overrides (e.g., holidays, special days)",
                          "items": {
                            "type": "object",
                            "properties": {
                              "date": {
                                "type": "string",
                                "format": "date",
                                "description": "Date for override (YYYY-MM-DD)",
                                "example": "2026-12-25"
                              },
                              "timeslots": {
                                "type": "array",
                                "description": "Available timeslots for this date (empty = unavailable)",
                                "items": {
                                  "type": "integer"
                                },
                                "example": []
                              },
                              "setting": {
                                "type": "object",
                                "description": "Grid generation rules",
                                "properties": {
                                  "grid_first_timeslot": {
                                    "type": "integer",
                                    "example": 0
                                  },
                                  "grid_last_timeslot": {
                                    "type": "integer",
                                    "example": 85800
                                  },
                                  "grid_display_step": {
                                    "type": "integer",
                                    "example": 7200
                                  },
                                  "grid_nearest_timeslot_delay": {
                                    "type": "integer",
                                    "example": 1800
                                  },
                                  "grid_base_type": {
                                    "type": "string",
                                    "enum": [
                                      "predefined",
                                      "schedule",
                                      "timeslots"
                                    ],
                                    "example": "predefined"
                                  },
                                  "is_grid_flexible": {
                                    "type": "boolean",
                                    "example": false
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "is_enabled": true,
                    "weekdays_settings": [
                      {
                        "weekday": 1,
                        "timeslots": [
                          7200,
                          14400
                        ],
                        "setting": {
                          "grid_first_timeslot": 0,
                          "grid_last_timeslot": 85800,
                          "grid_display_step": 7200,
                          "grid_nearest_timeslot_delay": 1800,
                          "grid_base_type": "predefined",
                          "is_grid_flexible": false
                        }
                      }
                    ],
                    "dates_settings": [
                      {
                        "date": "2026-12-25",
                        "timeslots": [],
                        "setting": {
                          "grid_first_timeslot": 0,
                          "grid_last_timeslot": 85800,
                          "grid_display_step": 7200,
                          "grid_nearest_timeslot_delay": 1800,
                          "grid_base_type": "predefined",
                          "is_grid_flexible": false
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/booking_forms": {
      "get": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of booking widgets",
        "operationId": "get_booking_widget_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of letterforms",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/booking_form_list_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Name",
                      "is_default": false,
                      "description": "Description",
                      "without_menu": false,
                      "service_step_default": 0,
                      "service_step_hide": false,
                      "master_step_default": 0,
                      "master_step_hide": false,
                      "service_step_num": 2,
                      "master_step_num": 1,
                      "datetime_step_num": 3,
                      "show_button": true,
                      "button_position": "bottom right",
                      "form_position": "right",
                      "button_color": "#1c84c6",
                      "button_animation": true,
                      "html_code": "",
                      "ab_test_enabled": false
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a Booking Widget",
        "operationId": "create_booking_widget",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bookform_create_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "appointment Widget Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/booking_form_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "title": "Name",
                    "is_default": false,
                    "description": "Description",
                    "without_menu": false,
                    "service_step_default": 0,
                    "service_step_hide": false,
                    "master_step_default": 0,
                    "master_step_hide": false,
                    "service_step_num": 2,
                    "master_step_num": 1,
                    "datetime_step_num": 3,
                    "show_button": true,
                    "button_position": "bottom right",
                    "form_position": "right",
                    "button_color": "#1c84c6",
                    "button_animation": true,
                    "html_code": "",
                    "ab_test_enabled": false
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/booking_forms/{form_id}": {
      "get": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a Booking Widget",
        "operationId": "get_booking_widget",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "form_id",
            "in": "path",
            "description": "appointment widget ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "appointment Widget Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/booking_form_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "title": "Name",
                    "is_default": false,
                    "description": "Description",
                    "without_menu": false,
                    "service_step_default": 0,
                    "service_step_hide": false,
                    "master_step_default": 0,
                    "master_step_hide": false,
                    "service_step_num": 2,
                    "master_step_num": 1,
                    "datetime_step_num": 3,
                    "show_button": true,
                    "button_position": "bottom right",
                    "form_position": "right",
                    "button_color": "#1c84c6",
                    "button_animation": true,
                    "html_code": "",
                    "ab_test_enabled": false
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Online Booking Settings"
        ],
        "summary": "Delete Booking Widget",
        "operationId": "delete_booking_widget",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "form_id",
            "in": "path",
            "description": "appointment widget ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Online Booking Settings"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change Booking Widget",
        "operationId": "update_booking_widget",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "form_id",
            "in": "path",
            "description": "appointment widget ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bookform_update_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "appointment Widget Settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/booking_form_response_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "title": "Name",
                    "is_default": false,
                    "description": "Description",
                    "without_menu": false,
                    "service_step_default": 0,
                    "service_step_hide": false,
                    "master_step_default": 0,
                    "master_step_hide": false,
                    "service_step_num": 2,
                    "master_step_num": 1,
                    "datetime_step_num": 3,
                    "show_button": true,
                    "button_position": "bottom right",
                    "form_position": "right",
                    "button_color": "#1c84c6",
                    "button_animation": true,
                    "html_code": "",
                    "ab_test_enabled": false
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/analytics/overall": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get key location metrics",
        "operationId": "get_location_analytics_overall",
        "description": "The method allows you to get the main indicators of the location for the selected period and compare with the previous period of the same duration",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "position_id",
            "in": "query",
            "description": "location position ID to analyze the work of all team members belonging to the same position",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The user ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Basic indicators",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_analytics_overall_data_type"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/overall/charts/fullness_daily": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get occupancy data by day",
        "operationId": "get_location_analytics_occupancy_daily",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The user ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Occupancy by day",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/analytics_report_overall_chart_daily_row"
                  }
                },
                "example": [
                  {
                    "label": "Working day occupancy, %",
                    "data": [
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        89.7
                      ],
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        91.2
                      ]
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/overall/charts/income_daily": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get data on revenue by day",
        "operationId": "get_location_analytics_revenue_daily",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "position_id",
            "in": "query",
            "description": "location position ID to analyze the work of all team members belonging to the same position",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The user ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revenue by day",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/analytics_report_overall_chart_daily_row"
                  }
                },
                "example": [
                  {
                    "label": "Revenue",
                    "data": [
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        1000
                      ],
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        500
                      ]
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/overall/charts/record_source": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get the Structure of Appointments by Source",
        "operationId": "get_appointment_analytics_by_source",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The user ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structure of appointments by sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/analytics_report_overall_chart_scalar_item"
                  }
                },
                "example": [
                  {
                    "label": "Administrator",
                    "data": 10
                  },
                  {
                    "label": "Widget",
                    "data": 30
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/overall/charts/record_status": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get the Structure of Appointments by Visit Status",
        "operationId": "get_appointment_analytics_by_status",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "The user ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structure of appointments by visit status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/analytics_report_overall_chart_scalar_item"
                  }
                },
                "example": [
                  {
                    "label": "Customer expectation",
                    "data": 10
                  },
                  {
                    "label": "The client came",
                    "data": 30
                  },
                  {
                    "label": "Customer confirmed",
                    "data": 5
                  },
                  {
                    "label": "Client didn't come",
                    "data": 2
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/overall/charts/records_daily": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Data on the Number of Appointments by Day",
        "operationId": "get_location_analytics_appointments_daily",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Start date of the analyzed period",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "End date of the analyzed period (included in the report)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "team_member_id",
            "in": "query",
            "description": "ID of the location team member whose work needs to be analyzed",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "User ID of the location whose work you want to analyze",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Number of appointments by day",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/analytics_report_overall_chart_daily_row"
                  }
                },
                "example": [
                  {
                    "label": "Number of records",
                    "data": [
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        1000
                      ],
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        500
                      ]
                    ]
                  },
                  {
                    "label": "Number of online appointments",
                    "data": [
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        1000
                      ],
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        500
                      ]
                    ]
                  },
                  {
                    "label": "Number of new customer appointments",
                    "data": [
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        1000
                      ],
                      [
                        "2026-09-21T23:00:00.000-05:00",
                        500
                      ]
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/loyalty_programs/income": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get revenue statistics",
        "operationId": "get_loyalty_program_revenue_statistics",
        "description": "The method allows you to get statistics on revenue.",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Period end date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Period start date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "query",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_analytics_loyalty_programs_income_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "income_stats": {
                      "new": {
                        "all_sum": 0,
                        "returned_sum": 0
                      },
                      "old": {
                        "all_sum": 0,
                        "returned_sum": 0
                      },
                      "total": {
                        "all_sum": 0,
                        "returned_sum": 0
                      }
                    },
                    "currency": {
                      "id": 1,
                      "iso": "USD",
                      "name": "US Dollar",
                      "symbol": "USD",
                      "is_symbol_after_amount": true
                    },
                    "income_stats_by_day": [
                      {
                        "date": "2026-09-21",
                        "new_sum": 0,
                        "old_sum": 0
                      },
                      {
                        "date": "2026-09-21",
                        "new_sum": 0,
                        "old_sum": 0
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/loyalty_programs/staff": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get team member return",
        "operationId": "get_loyalty_program_team_member_statistics",
        "description": "The method allows you to get the return statistics for a team member",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Period end date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Period start date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "query",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_analytics_loyalty_programs_staff_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "client_stats": {
                        "all_count": 1,
                        "lost_count": 0,
                        "returned_count": 1,
                        "returned_percent": 100
                      },
                      "staff": {
                        "id": 1140369,
                        "name": "Doniella Davy"
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/analytics/loyalty_programs/visits": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get customer statistics",
        "operationId": "get_loyalty_program_client_statistics",
        "description": "The method allows you to get statistics on returning, new and lost customers",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Period end date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Period start date",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "query",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_analytics_loyalty_programs_visits_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "client_stats": {
                      "new": {
                        "all_count": 0,
                        "lost_count": 0,
                        "returned_count": 0,
                        "returned_percent": 0
                      },
                      "old": {
                        "all_count": 0,
                        "lost_count": 0,
                        "returned_count": 0,
                        "returned_percent": 0
                      },
                      "total": {
                        "all_count": 0,
                        "lost_count": 0,
                        "returned_count": 0,
                        "returned_percent": 0
                      }
                    },
                    "visits_stats_by_day": [
                      {
                        "date": "2026-09-21",
                        "new_count": 0,
                        "old_count": 0
                      },
                      {
                        "date": "2026-09-21",
                        "new_count": 0,
                        "old_count": 0
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/reports/z_report/{location_id}": {
      "get": {
        "tags": [
          "Analytics & Reports"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get day-end report data",
        "description": "+ start_date: Report date\n\n+ team_member_id: team member ID",
        "operationId": "get_day_end_report_data",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "period start date",
            "schema": {
              "type": "string"
            },
            "example": "''"
          },
          {
            "name": "master_id",
            "in": "query",
            "description": "team member ID",
            "schema": {
              "type": "integer"
            },
            "example": 0
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/z_report_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "stats": {
                      "clients": 7,
                      "clients_average": 123.45,
                      "records": 14,
                      "records_average": 4231.51,
                      "visit_records": 13,
                      "visit_records_average": 100500.01,
                      "non_visit_records": 1,
                      "non_visit_records_average": 200,
                      "targets": 14,
                      "targets_paid": 10255,
                      "goods": 4,
                      "goods_paid": 12452.18,
                      "certificates": 1,
                      "certificates_paid": 9876,
                      "abonement": 0,
                      "abonement_paid": 0
                    },
                    "paids": {
                      "accounts": [
                        {
                          "title": "Cards",
                          "amount": 6987
                        },
                        {
                          "title": "Cash",
                          "amount": 54321.13
                        },
                        {
                          "title": "Cash register",
                          "amount": 12531
                        }
                      ],
                      "discount": [
                        {
                          "title": "Advance Discount",
                          "amount": 1816.875
                        },
                        {
                          "title": "Written off bonuses",
                          "amount": 800
                        },
                        {
                          "title": "Promotion discount",
                          "amount": 123
                        }
                      ],
                      "total": {
                        "accounts": 2657.13,
                        "discount": 1241.875
                      }
                    },
                    "z_data": {
                      "2026-09-21T23:00:00.000-05:00": [
                        {
                          "client_id": 11223344,
                          "client_name": "John Smith",
                          "client_phone": "+13155550175",
                          "client_email": "j.smith@example.com",
                          "masters": [
                            {
                              "master_id": 321123,
                              "master_name": "Robert Brown",
                              "service": [
                                {
                                  "item_title": "Highlighting from 9 strands",
                                  "first_cost": 3500,
                                  "discount": 0,
                                  "result_cost": 3500,
                                  "transactions": [
                                    {
                                      "accounts_amount": 0,
                                      "loyalty_amount": 700,
                                      "payment_type": "Card: Gold Card"
                                    },
                                    {
                                      "accounts_amount": 0,
                                      "loyalty_amount": 100,
                                      "payment_type": "Card: Gold Card"
                                    },
                                    {
                                      "accounts_amount": 0,
                                      "loyalty_amount": 1,
                                      "payment_type": "Card: Bonus card"
                                    }
                                  ]
                                }
                              ],
                              "good": [
                                {
                                  "item_title": "Spray For Hair",
                                  "first_cost": 15,
                                  "discount": 2.25,
                                  "result_cost": 12.75,
                                  "transactions": [
                                    {
                                      "accounts_amount": 12.75,
                                      "loyalty_amount": 0,
                                      "payment_type": "Cash"
                                    }
                                  ]
                                }
                              ],
                              "others": {
                                "item_title": "Other operations",
                                "first_cost": 347,
                                "discount": 0,
                                "result_cost": 347,
                                "transactions": [
                                  {
                                    "accounts_amount": 23,
                                    "loyalty_amount": 0,
                                    "payment_type": "Cash"
                                  },
                                  {
                                    "accounts_amount": 324,
                                    "loyalty_amount": 0,
                                    "payment_type": "Cash"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      ]
                    },
                    "currency": "USD"
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/labels/{location_id}": {
      "post": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Create a Tag (Deprecated)",
        "description": "**Deprecated:** Use `POST /api/v2/companies/{company_id}/tags` instead.\n\nCreates a new tag for the specified location.\n",
        "operationId": "create_tag",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Name of tag",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "color",
            "in": "query",
            "description": "Tag color in #RRGGBB format",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entity",
            "in": "query",
            "description": "Tag type (0 - general tags, 1 - customer tags, 2 - appointment tags)",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "icon",
            "in": "query",
            "description": "Icon name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tags_create_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "title": "test",
                    "salon_id": 68570,
                    "color": "#00ff11",
                    "entity": 1,
                    "id": 3599560
                  },
                  "meta": []
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/labels/{location_id}/{entity}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Get location tags (Deprecated)",
        "description": "**Deprecated:** Use `GET /api/v2/companies/{company_id}/tags?entity={entity}` instead.\nReturns tags for the specified entity type.\n\nThe `entity` parameter accepts string aliases:\n- `common` - common tags\n- `client` - client tags\n- `record` - appointment/record tags\n- `activity` - activity/event tags\n\n> **Legacy support:** Numeric values (`0`, `1`, `2`, `3`) are also accepted but string aliases are preferred.\n",
        "operationId": "get_tag_list_by_entity",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "entity",
            "in": "path",
            "description": "Tag type alias",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "common",
                "client",
                "record",
                "activity"
              ]
            },
            "example": "client"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tags_company_entity_response200_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 241625,
                      "salon_id": 68570,
                      "title": "VIP client",
                      "color": "#ff2828",
                      "icon": "star",
                      "entity": 1,
                      "deleted": 0,
                      "not_editable": 0
                    },
                    {
                      "id": 241626,
                      "salon_id": 68570,
                      "title": "Regular client",
                      "color": "#009800",
                      "icon": "user",
                      "entity": 1,
                      "deleted": 0,
                      "not_editable": 0
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/labels/{location_id}/{tag_id}": {
      "put": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Update Tag (Deprecated)",
        "description": "**Deprecated:** Use `PUT /api/v2/companies/{company_id}/tags/{tag_id}` instead.\n",
        "operationId": "update_tag_by_tag_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "tag_id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tags_update_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "deprecated": true,
        "summary": "Delete location tag (Deprecated)",
        "description": "**Deprecated:** Use `DELETE /api/v2/companies/{company_id}/tags/{tag_id}` instead.\n",
        "operationId": "delete_tag_by_tag_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "tag_id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Accepted"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/deposits/company/{location_id}/client/{client_id}": {
      "get": {
        "tags": [
          "Deposits"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Client Accounts by Location and Client",
        "operationId": "get_client_account_list_by_location_and_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "deposit": {
                        "id": 1,
                        "salon_group_id": 1,
                        "deposit_type_id": 1,
                        "initial_balance": 0,
                        "balance": 1000,
                        "reserved_balance": 0,
                        "blocked": false,
                        "date_create": "2026-09-21T23:00:00.000-05:00"
                      },
                      "deposit_type": {
                        "id": 1,
                        "salon_group_id": 1,
                        "title": "Account type header",
                        "date_create": "2026-09-21T23:00:00.000-05:00",
                        "deleted": false
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/deposits/chain/{chain_id}": {
      "get": {
        "tags": [
          "Deposits"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of client accounts by chain and a set of filters",
        "operationId": "get_client_account_list_by_chain",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "balance_from",
            "in": "query",
            "description": "Minimum balance for filtering",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "balance_to",
            "in": "query",
            "description": "Maximum balance for filtering",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items per page",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "deposit": {
                        "id": 1,
                        "salon_group_id": 1,
                        "deposit_type_id": 1,
                        "initial_balance": 0,
                        "balance": 1000,
                        "reserved_balance": 0,
                        "blocked": false,
                        "date_create": "2026-09-21T23:00:00.000-05:00"
                      },
                      "deposit_type": {
                        "id": 1,
                        "salon_group_id": 1,
                        "title": "Account type header",
                        "date_create": "2026-09-21T23:00:00.000-05:00",
                        "deleted": false
                      },
                      "client": {
                        "id": 1,
                        "name": "Client name",
                        "phone": 13155550180
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/deposits/chain/{chain_id}/phone/{phone}": {
      "get": {
        "tags": [
          "Deposits"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of client accounts by chain and customer phone number",
        "operationId": "get_client_account_by_chain_and_phone",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "phone",
            "in": "path",
            "description": "Customer phone number",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": [
                    {
                      "deposit": {
                        "id": 1,
                        "salon_group_id": 1,
                        "deposit_type_id": "1,",
                        "initial_balance": 0,
                        "balance": 1000,
                        "reserved_balance": 0,
                        "blocked": false,
                        "date_create": "2026-09-21T23:00:00.000-05:00"
                      },
                      "deposit_type": {
                        "id": 1,
                        "salon_group_id": 1,
                        "title": "Account type header",
                        "date_create": "2026-09-21T23:00:00.000-05:00",
                        "deleted": false
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/deposits_operations/{location_id}": {
      "post": {
        "tags": [
          "Deposits"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a client account topup operation",
        "description": "Creating a transaction with a client account involves creating a document, a transaction with a client account, and a financial transaction within a single API request.",
        "operationId": "create_client_account_topup_operation",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "required": [
                  "account_id",
                  "amount",
                  "client_id",
                  "deposit_id"
                ],
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "number",
                    "description": "ID of the client, the owner of the client account"
                  },
                  "deposit_id": {
                    "type": "number",
                    "description": "client account ID"
                  },
                  "amount": {
                    "type": "number",
                    "description": "replenishment amount"
                  },
                  "master_id": {
                    "type": "number",
                    "description": "team member ID"
                  },
                  "account_id": {
                    "type": "number",
                    "description": "Checkout ID for payment"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/deposit_operation_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "document": {
                      "id": 1,
                      "user_id": 1,
                      "salon_id": 1,
                      "type_id": 9,
                      "type": {
                        "id": 9,
                        "title": "Account replenishment (advance payment)"
                      },
                      "comment": "",
                      "number": 1,
                      "salon": {
                        "id": 1,
                        "title": "Location in New York",
                        "public_title": "Location in New York",
                        "business_group_id": 1,
                        "business_type_id": 1,
                        "country_id": 7,
                        "city_id": 2,
                        "timezone": "-5",
                        "timezone_name": "America/New_York",
                        "address": "New York, 787 Jackson Drive",
                        "coordinate_lat": 40.73061,
                        "coordinate_lon": -73.935242,
                        "logo": "http://app.alteg.io/images/icon.png",
                        "zip": "129090",
                        "phone": "+13155550175",
                        "phones": [],
                        "site": "www.example.com",
                        "allow_delete_record": true,
                        "allow_change_record": true
                      },
                      "user": {
                        "id": 1,
                        "name": "James Smith",
                        "phone": "+13155550175"
                      }
                    },
                    "deposits_transactions": [
                      {
                        "id": 1,
                        "salon_id": 1,
                        "salon_group_id": 1,
                        "document_id": 1,
                        "deposit_id": 1,
                        "deposit_type_id": 1,
                        "master_id": 1,
                        "user_id": 1,
                        "amount": 100.5,
                        "balance_after": 12239.56,
                        "reserved_balance_after": 0,
                        "comment": "",
                        "date_create": "2026-09-21T23:00:00.000-05:00",
                        "deleted": false,
                        "deposit": {
                          "id": 1,
                          "deposit_type_id": 1,
                          "salon_group_id": 1,
                          "initial_balance": 10000,
                          "balance": 12239.56,
                          "reserved_balance": 0,
                          "blocked": false,
                          "date_create": "2026-09-21T23:00:00.000-05:00"
                        },
                        "deposit_type": {
                          "id": 1,
                          "salon_group_id": 1,
                          "title": "Account type 1",
                          "date_create": "2026-09-21T23:00:00.000-05:00",
                          "deleted": false
                        }
                      }
                    ],
                    "payment_transactions": [
                      {
                        "id": 1,
                        "document_id": 1,
                        "date": "2026-09-21T23:00:00.000-05:00",
                        "type_id": 10,
                        "expense_id": 10,
                        "account_id": 1,
                        "amount": 100.5,
                        "client_id": 1,
                        "master_id": 1,
                        "supplier_id": 0,
                        "comment": "",
                        "item_id": 1,
                        "target_type_id": 0,
                        "record_id": 0,
                        "goods_transaction_id": 0,
                        "type": {
                          "id": 10,
                          "title": "Refill"
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/chain/{chain_id}/deposits/{deposit_id}/history": {
      "get": {
        "tags": [
          "Deposits"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get client account transaction history",
        "description": "Retrieves the transaction history for a specific client account in the chain.\n\nReturns a list of all transactions (top-ups, withdrawals, etc.) made on the client account.\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "get_chain_client_account_history",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "deposit_id",
            "in": "path",
            "description": "Client account ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 12345
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction history retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "deposit_transaction": {
                            "type": "object",
                            "description": "Client account transaction details",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Transaction ID",
                                "example": 1
                              },
                              "salon_id": {
                                "type": "integer",
                                "description": "Location ID where transaction occurred",
                                "example": 720441
                              },
                              "salon_group_id": {
                                "type": "integer",
                                "description": "Chain ID",
                                "example": 706028
                              },
                              "user_id": {
                                "type": "integer",
                                "description": "User ID associated with the client account",
                                "example": 123456
                              },
                              "amount": {
                                "type": "number",
                                "format": "double",
                                "description": "Transaction amount (positive for top-up, negative for withdrawal)",
                                "example": 100.5
                              },
                              "balance_after": {
                                "type": "number",
                                "format": "double",
                                "description": "Personal account balance after this transaction",
                                "example": 12239.56
                              },
                              "reserved_balance_after": {
                                "type": "number",
                                "format": "double",
                                "description": "Personal account reserved balance after this transaction",
                                "example": 0
                              },
                              "date_create": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Transaction creation date and time",
                                "example": "2026-01-15T14:30:00.000000Z"
                              },
                              "comment": {
                                "type": "string",
                                "description": "Transaction comment",
                                "example": "Top-up payment"
                              },
                              "deleted": {
                                "type": "boolean",
                                "description": "Whether transaction has been deleted",
                                "example": false
                              }
                            }
                          },
                          "deposit_transaction_type": {
                            "type": "object",
                            "description": "Transaction type information",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "description": "Transaction type ID",
                                "example": 1
                              },
                              "comment": {
                                "type": "string",
                                "description": "Transaction type name",
                                "example": "Top-up"
                              }
                            }
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Client account not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/client_cards/{client_id}": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Customer Cards by ID",
        "description": "Returns a list of customer cards with programs that are active in this location\r\n\r\nThe attributes in the response to the request completely match the \"Get a list of issued cards by phone number\" method described above",
        "operationId": "get_loyalty_card_list_by_client_id",
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_cards_response_data_types"
                },
                "example": {
                  "id": 9210520,
                  "balance": 100,
                  "points": 0,
                  "paid_amount": 1000,
                  "sold_amount": 1000,
                  "visits_count": 1,
                  "number": 14507109210520,
                  "type_id": 10992,
                  "salon_group_id": 145071,
                  "type": {
                    "id": 10992,
                    "title": "5+2",
                    "salon_group_id": 145071
                  },
                  "salon_group": {
                    "id": 145071,
                    "title": "Dough chain1."
                  },
                  "programs": [
                    {
                      "id": 18005,
                      "title": "5+2",
                      "value": 0,
                      "loyalty_type_id": 13,
                      "item_type_id": 3,
                      "value_unit_id": 1,
                      "group_id": 145071,
                      "loyalty_type": {
                        "id": 13,
                        "title": "Discount for a given number of accumulated services",
                        "is_discount": true,
                        "is_cashback": false,
                        "is_static": false,
                        "is_accumulative": false
                      },
                      "rules": [
                        {
                          "id": 72803,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 20,
                          "parameter": 0
                        },
                        {
                          "id": 72804,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 10,
                          "parameter": 0
                        },
                        {
                          "id": 72805,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 100,
                          "parameter": 0
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/cards/{phone}/{chain_id}/{location_id}": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Customer Cards by Phone Number",
        "description": "Returns a list of customer cards with programs that are active in this location\n\n| Attribute        | Type    | Description                                                                                   |\n|------------------|---------|-----------------------------------------------------------------------------------------------|\n| id               | int     | Loyalty card ID                                                                               |\n| balance          | decimal | Loyalty card balance                                                                          |\n| paid_amount      | decimal | Amount \"Paid\"                                                                                 |\n| sold_amount      | decimal | Amount \"Sold\"                                                                                |\n| visits_count     | int     | Number of visits                                                                              |\n| number           | string  | Card number                                                                                   |\n| type_id          | int     | Loyalty card type identifier                                                                  |\n| salon_group_id   | int     | ID of the chain where the card was created                                                    |\n| type             | object  | Object that contains the \"id\" and \"title\" fields: card type identifier and name             |\n| salon_group      | object  | Object that contains the \"id\" and \"title\" fields: identifier of the chain where the card type was created and the name of this chain |\n| programs         | array   | Array with information about promotions linked to a loyalty card                              |\n| rules            | array   | Array with information about the rules configured in the action                               |\n\nThe programs array consists of objects with the following fields:\n\n| Attribute         | Type    | Description                                   |\n|-------------------|---------|-----------------------------------------------|\n| id                | int     | Promotion ID                                  |\n| title             | string  | Action name                                   |\n| loyalty_type_id   | int     | Promotion type ID                             |\n| item_type_id      | int     | Is cashback accrued from products             |\n| value_unit_id     | int     | Bonus field — Discount % or Fixed amount      |\n| group_id          | int     | ID of the chain where the action was created  |\n| loyalty_type      | object  | Object with information about the action      |\n\nThe rules array consists of objects with the following fields:\n\n| Attribute           | Type    | Description                                                  |\n|---------------------|---------|--------------------------------------------------------------|\n| id                  | int     | Rule ID                                                      |\n| loyalty_program_id  | int     | Identifier of the promotion to which the rule is attached    |\n| loyalty_type_id     | int     | Promotion type ID                                            |\n| value               | decimal | Value from which the rule will work                          |",
        "operationId": "get_loyalty_card_list_by_phone",
        "parameters": [
          {
            "name": "phone",
            "in": "path",
            "description": "Customer phone number in the format +13155550175",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_cards_response_data_types"
                },
                "example": {
                  "id": 9210520,
                  "balance": 100,
                  "points": 0,
                  "paid_amount": 1000,
                  "sold_amount": 1000,
                  "visits_count": 1,
                  "number": 14507109210520,
                  "type_id": 10992,
                  "salon_group_id": 145071,
                  "type": {
                    "id": 10992,
                    "title": "5+2",
                    "salon_group_id": 145071
                  },
                  "salon_group": {
                    "id": 145071,
                    "title": "Dough chain1."
                  },
                  "programs": [
                    {
                      "id": 18005,
                      "title": "5+2",
                      "value": 0,
                      "loyalty_type_id": 13,
                      "item_type_id": 3,
                      "value_unit_id": 1,
                      "group_id": 145071,
                      "loyalty_type": {
                        "id": 13,
                        "title": "Discount for a given number of accumulated services",
                        "is_discount": true,
                        "is_cashback": false,
                        "is_static": false,
                        "is_accumulative": false
                      },
                      "rules": [
                        {
                          "id": 72803,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 20,
                          "parameter": 0
                        },
                        {
                          "id": 72804,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 10,
                          "parameter": 0
                        },
                        {
                          "id": 72805,
                          "loyalty_program_id": 18005,
                          "loyalty_type_id": 13,
                          "value": 100,
                          "parameter": 0
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/user/loyalty_cards/{chain_id}": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get User Loyalty Cards",
        "description": "Returns a list of cards of an authorized user with programs, filtering cards by location chain / location",
        "operationId": "get_user_loyalty_cards",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_cards_response_data_types"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/card_types/salon/{location_id}": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of card types available at the location",
        "description": "Returns a list of card types that are valid for the given location.\r\n\r\nThe attributes and their descriptions match those defined in the \"Collection of Card Types Available to the Client\" method described above.",
        "operationId": "get_loyalty_card_type_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_card_types_response_data_types"
                },
                "example": [
                  {
                    "id": 10992,
                    "title": "Cashback",
                    "salon_group_id": 145071,
                    "salon_group": {
                      "id": 145071,
                      "title": "Chain 1"
                    }
                  },
                  {
                    "id": 8230,
                    "title": "Referral program",
                    "salon_group_id": 145071,
                    "salon_group": {
                      "id": 145071,
                      "title": "Chain 1"
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/card_types/client/{location_id}/{phone}": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Card Types Available for Issuance to the Client",
        "description": "Returns a list of card types that are available for issuance to a location client.\n\n| Attribute        | Type    | Description                                                                                   |\n|------------------|---------|-----------------------------------------------------------------------------------------------|\n| id               | int     | Card type identifier                                                                          |\n| title            | string  | Card type name                                                                                 |\n| salon_group_id   | int     | ID of the chain where the card type was created                                                |\n| salon_group      | object  | An object that contains the \"id\" and \"title\" fields: identifier of the chain where the card type was created and the name of this chain |",
        "operationId": "get_loyalty_card_type_list_for_client",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 12345
          },
          {
            "name": "phone",
            "in": "path",
            "description": "Customer phone number",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 13155550175
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_card_types_response_data_types"
                },
                "example": [
                  {
                    "id": 10992,
                    "title": "Cashback",
                    "salon_group_id": 145071,
                    "salon_group": {
                      "id": 145071,
                      "title": "Chain 1"
                    }
                  },
                  {
                    "id": 8230,
                    "title": "Referral program",
                    "salon_group_id": 145071,
                    "salon_group": {
                      "id": 145071,
                      "title": "Chain 1"
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/card_types": {
      "get": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get a List of Card Types Available at the Chain",
        "operationId": "get_chain_loyalty_card_type_list",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/loyalty_card_type"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/cards/{location_id}": {
      "post": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Issue a Loyalty Card",
        "description": "| Attribute | Type | Description |\r\n|----------------------|--------|----------------- ------------------------------|\r\n| loyalty_card_number | number | Loyalty card number |\r\n| loyalty_card_type_id | number | Loyalty card type identifier |\r\n| phone | number | Customer phone number (e.g., 13155550175 for +13155550175) |",
        "operationId": "issue_loyalty_card",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/loyalty_cards_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_cards_response_data_types"
                },
                "example": {
                  "id": 9250498,
                  "balance": 0,
                  "points": 0,
                  "paid_amount": 16300,
                  "sold_amount": 19320,
                  "visits_count": 5,
                  "number": 1010101,
                  "type_id": 8230,
                  "salon_group_id": 145071,
                  "type": {
                    "id": 8230,
                    "title": "cashmesh",
                    "salon_group_id": 145071
                  },
                  "salon_group": {
                    "id": 145071,
                    "title": "Dough chain1."
                  },
                  "programs": [
                    {
                      "id": 12720,
                      "title": "cumulative cache paid",
                      "value": 10,
                      "loyalty_type_id": 7,
                      "item_type_id": 0,
                      "value_unit_id": 1,
                      "group_id": 145071,
                      "loyalty_type": {
                        "id": 7,
                        "title": "Cumulative cashback (paid)",
                        "is_discount": false,
                        "is_cashback": true,
                        "is_static": false,
                        "is_accumulative": true
                      },
                      "rules": [
                        {
                          "id": 71149,
                          "loyalty_program_id": 12720,
                          "loyalty_type_id": 7,
                          "value": 10,
                          "parameter": 100
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/loyalty/cards/{location_id}/{card_id}": {
      "delete": {
        "tags": [
          "Loyalty Cards"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Remove a Loyalty Card",
        "operationId": "remove_loyalty_card",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "loyalty card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/cards/{card_id}/manual_transaction": {
      "post": {
        "tags": [
          "Loyalty Cards"
        ],
        "summary": "Manual withdraw/deposit to loyalty card in location",
        "description": "Manual withdraw/deposit to loyalty card in location",
        "operationId": "create_loyalty_card_transaction",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Loyalty card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "amount"
                ],
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Withdraw/deposit amount. Positive for deposit, negative for withdraw.",
                    "example": 100.5
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional comment"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/loyalty_card"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/cards/{card_id}/manual_transaction": {
      "post": {
        "tags": [
          "Loyalty Cards"
        ],
        "summary": "Manual withdraw/deposit to loyalty card in chain",
        "description": "Manual withdraw/deposit to loyalty card in chain",
        "operationId": "create_chain_loyalty_card_transaction",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/chain_id"
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Loyalty card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "amount"
                ],
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Withdraw/deposit amount. Positive for deposit, negative for withdraw.",
                    "example": 100.5
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional comment"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/loyalty_card"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/abonements": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get Client Memberships",
        "description": "Returns a list of client's memberships by phone",
        "operationId": "get_client_memberships",
        "parameters": [
          {
            "name": "company_id",
            "in": "query",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Customer phone number",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_abonements_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 659878,
                      "number": 788376,
                      "balance_string": "Surfing (x10)",
                      "is_frozen": false,
                      "freeze_period": 0,
                      "period": 9999,
                      "period_unit_id": 3,
                      "status": {
                        "id": 1,
                        "title": "Released",
                        "extended_title": "Released"
                      },
                      "balance_container": {
                        "links": [
                          {
                            "count": 10,
                            "category": {
                              "id": 3129591,
                              "category_id": 1,
                              "title": "Surfing"
                            }
                          }
                        ]
                      },
                      "type": {
                        "id": 97804,
                        "salon_group_id": 145071,
                        "title": 89999,
                        "period": 9999,
                        "period_unit_id": 3,
                        "allow_freeze": false,
                        "freeze_limit": 0,
                        "is_allow_empty_code": false,
                        "is_united_balance": false,
                        "united_balance_services_count": 0,
                        "balance_container": {
                          "links": [
                            {
                              "count": 10,
                              "category": {
                                "id": 3129591,
                                "category_id": 1,
                                "title": "Surfing"
                              }
                            }
                          ]
                        }
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/user/loyalty/abonements": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get User Memberships",
        "description": "Returns a list of memberships of an authorized user",
        "operationId": "get_user_memberships",
        "parameters": [
          {
            "name": "company_id",
            "in": "query",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_abonements_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 659878,
                      "number": 788376,
                      "balance_string": "Surfing (x10)",
                      "is_frozen": false,
                      "freeze_period": 0,
                      "period": 9999,
                      "period_unit_id": 3,
                      "status": {
                        "id": 1,
                        "title": "Released",
                        "extended_title": "Released"
                      },
                      "balance_container": {
                        "links": [
                          {
                            "count": 10,
                            "category": {
                              "id": 3129591,
                              "category_id": 1,
                              "title": "Surfing"
                            }
                          }
                        ]
                      },
                      "type": {
                        "id": 97804,
                        "salon_group_id": 145071,
                        "title": 89999,
                        "period": 9999,
                        "period_unit_id": 3,
                        "allow_freeze": false,
                        "freeze_limit": 0,
                        "is_allow_empty_code": false,
                        "is_united_balance": false,
                        "united_balance_services_count": 0,
                        "balance_container": {
                          "links": [
                            {
                              "count": 10,
                              "category": {
                                "id": 3129591,
                                "category_id": 1,
                                "title": "Surfing"
                              }
                            }
                          ]
                        }
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonements": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get a List of Memberships by Filter",
        "operationId": "get_membership_list",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID.",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 123
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Creation date from (filter by creation date).",
            "schema": {
              "type": "string"
            },
            "example": "2026-09-21T23:00:00.000-05:00"
          },
          {
            "name": "created_before",
            "in": "query",
            "description": "Creation date by (filter by creation date).",
            "schema": {
              "type": "string"
            },
            "example": "2026-09-21T23:00:00.000-05:00"
          },
          {
            "name": "abonements_ids",
            "in": "query",
            "description": "List of membership IDs for the filter.",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of appointments per page.",
            "schema": {
              "type": "number"
            },
            "example": 25
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": [
                  {
                    "success": true,
                    "data": [
                      {
                        "id": 123,
                        "number": 123456,
                        "balance_string": "Services (x5)",
                        "created_date": "2026-09-21T23:00:00.000-05:00",
                        "activated_date": "2026-09-21T23:00:00.000-05:00",
                        "is_frozen": false,
                        "freeze_period": 0,
                        "period": 0,
                        "period_unit_id": 1,
                        "status": {
                          "id": 2,
                          "title": "activated",
                          "extended_title": "activated"
                        },
                        "is_united_balance": false,
                        "united_balance_services_count": 0,
                        "balance_container": {
                          "links": [
                            {
                              "count": 9,
                              "category": {
                                "id": 7182839,
                                "category_id": 1,
                                "title": "Services"
                              }
                            }
                          ]
                        },
                        "type": {
                          "id": 896,
                          "salon_group_id": 279982,
                          "title": "Subscription for everything",
                          "period": 0,
                          "period_unit_id": 1,
                          "allow_freeze": true,
                          "freeze_limit": 0,
                          "is_allow_empty_code": true,
                          "is_united_balance": false,
                          "united_balance_services_count": 0,
                          "is_code_required": false,
                          "balance_container": {
                            "links": [
                              {
                                "count": 10,
                                "category": {
                                  "id": 7182839,
                                  "category_id": 1,
                                  "title": "Services"
                                }
                              }
                            ]
                          }
                        }
                      },
                      {
                        "id": 720,
                        "number": 208867,
                        "balance_string": "Some services (x10)",
                        "created_date": "2026-09-21T23:00:00.000-05:00",
                        "is_frozen": false,
                        "freeze_period": 0,
                        "period": 0,
                        "period_unit_id": 1,
                        "status": {
                          "id": 3,
                          "title": "Overdue",
                          "extended_title": "Overdue"
                        },
                        "is_united_balance": false,
                        "united_balance_services_count": 0,
                        "balance_container": {
                          "links": [
                            {
                              "count": 10,
                              "category": {
                                "id": 7182839,
                                "category_id": 1,
                                "title": "Some services"
                              }
                            }
                          ]
                        },
                        "type": {
                          "id": 897,
                          "salon_group_id": 279982,
                          "title": "Subscription for everything",
                          "period": 0,
                          "period_unit_id": 1,
                          "allow_freeze": true,
                          "freeze_limit": 0,
                          "is_allow_empty_code": true,
                          "is_united_balance": false,
                          "united_balance_services_count": 0,
                          "is_code_required": false,
                          "balance_container": {
                            "links": [
                              {
                                "count": 10,
                                "category": {
                                  "id": 7182839,
                                  "category_id": 1,
                                  "title": "Some services"
                                }
                              }
                            ]
                          }
                        }
                      }
                    ],
                    "meta": {
                      "count": 2
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "example": [
                  {
                    "success": false,
                    "meta": {
                      "message": "Subscription IDs or date range not specified."
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/abonement_types/fetch": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Membership Types by ID",
        "description": "A list of **membership types** available at a location can be obtained by querying the location ID and membership type IDs.\r\n\r\nThe list is an array of [membership types](#loyalty-membership-type).\r\n\r\n### Get a list of membership types by ID\r\n\r\n+ Parameters\r\n    + company_id (required, number) - location ID\r\n    + id: 1 (optional, number) - membership type ID (you can specify several additional parameters `&ids[]={id}`",
        "operationId": "get_membership_type_list_by_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "ids[]",
            "in": "query",
            "description": "Membership type ID (you can specify several additional parameters &ids[]={id}",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_abonements_type_search_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 12233,
                      "salon_group_id": 123,
                      "title": "Subscription with the possibility of freezing for 14 days",
                      "period": 0,
                      "period_unit_id": 0,
                      "allow_freeze": true,
                      "freeze_limit": 14,
                      "is_allow_empty_code": false,
                      "is_united_balance": false,
                      "united_balance_services_count": 0
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/abonement_types/search": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Available Membership Types",
        "description": "A list of **membership types** available at a location can be obtained by requesting the location ID.\nThe list can be filtered by membership type name by passing the title parameter. Pagination is supported, specified by the `page` and `page_size` parameters.\n\nThe list is an array of [membership types](#loyalty-membership-type).\n\n<a name=\"loyalty-membership-type\"></a>\n**Membership type** has the following structure:\n\n| Field                          | Type    | Description                                                                                                          |\n|-------------------------------|---------|----------------------------------------------------------------------------------------------------------------------|\n| id                            | number  | Membership type identifier                                                                                           |\n| title                         | string  | Membership type name                                                                                               |\n| allow_freeze                  | boolean | Is it possible to freeze memberships? true - allowed, false - not allowed                                            |\n| freeze limit                  | number  | Maximum total freezing period (days)                                                                                 |\n| salon_group_id                | number  | Identifier of the chain in which the membership type is valid                                                        |\n| period                        | number  | Membership expiration date (0 if not set)                                                                            |\n| period_unit_id                | number  | Membership expiration unit (list of possible values, if not set - 0)                                               |\n| is_allow_empty_code           | boolean | Allow the sale of a membership without a code? true - allow, false - do not allow                                    |\n| is_united_balance             | boolean | Total or separate membership balance: true - total, false - separate                                                 |\n| united_balance_services_count | number  | Number of visits for total balance                                                                                   |\n\n<a name=\"loyalty-membership-expiration-unit\"></a>\n**Measurement units of membership type validity period**\n\n| Meaning | Description |\n|---------|-------------|\n| 1       | Day         |\n| 2       | Week        |\n| 3       | Month       |\n| 4       | Year        |",
        "operationId": "get_membership_type_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Conetnt-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Membeship type name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "The number of output lines per page. Maximum 100",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_abonements_type_search_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 12233,
                      "salon_group_id": 123,
                      "title": "Subscription with the possibility of freezing for 14 days",
                      "period": 0,
                      "period_unit_id": 0,
                      "allow_freeze": true,
                      "freeze_limit": 14,
                      "is_allow_empty_code": false,
                      "is_united_balance": false,
                      "united_balance_services_count": 0
                    },
                    {
                      "id": 255789,
                      "salon_group_id": 456,
                      "title": "Subscription for 6 months",
                      "period": 6,
                      "period_unit_id": 3,
                      "allow_freeze": false,
                      "freeze_limit": 0,
                      "is_allow_empty_code": false,
                      "is_united_balance": false,
                      "united_balance_services_count": 0
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonements/{membership_id}/freeze": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Freeze membership",
        "description": "Freezes a subscription (membership) until the specified date.\n\nThe subscription's expiration date will be extended by the freeze period.\nFrozen subscriptions cannot be used for appointments.\n\n**Requirements:**\n- Membership type must have `allow_freeze: true`\n- Freeze period must not exceed `freeze_limit` from membership type\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_memberships_freeze",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "membership_id",
            "in": "path",
            "description": "Membership ID to freeze",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "freeze_till"
                ],
                "type": "object",
                "properties": {
                  "freeze_till": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Date until which the membership will be frozen (ISO 8601 format)",
                    "example": "2026-12-31T23:59:59-05:00"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription frozen successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 123
                        },
                        "number": {
                          "type": "string",
                          "example": "123456"
                        },
                        "is_frozen": {
                          "type": "boolean",
                          "example": true
                        },
                        "freeze_period": {
                          "type": "integer",
                          "description": "Total freeze period in days",
                          "example": 14
                        },
                        "freeze_till": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date until which membership is frozen",
                          "example": "2026-12-31T23:59:59-05:00"
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - membership cannot be frozen",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Subscription cannot be frozen"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (freeze limit exceeded, freeze not allowed, etc.)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Freeze period exceeds limit"
                        },
                        "errors": {
                          "type": "object",
                          "description": "Validation errors by field",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonements/{membership_id}/unfreeze": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Unfreeze membership",
        "description": "Removes the freeze from a subscription (membership).\n\nThe subscription's expiration date will remain extended by the freeze period\nthat was already applied during the freeze.\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_memberships_unfreeze",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "membership_id",
            "in": "path",
            "description": "Membership ID to unfreeze",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "description": "Empty body required (or omit entirely)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription unfrozen successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 123
                        },
                        "number": {
                          "type": "string",
                          "example": "123456"
                        },
                        "is_frozen": {
                          "type": "boolean",
                          "example": false
                        },
                        "freeze_period": {
                          "type": "integer",
                          "description": "Total freeze period that was applied (in days)",
                          "example": 14
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - membership is not frozen",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Subscription is not frozen"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonements/{membership_id}/set_balance": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change membership balance",
        "description": "Modifies the remaining visit count for a subscription (membership).\n\n**For unified balance subscriptions:**\n- Use `united_balance_services_count` to set total visits\n\n**For separate balance subscriptions:**\n- Use `services_balance_count` array with service_id and balance for each service/category\n\n**Use cases:**\n- Adjust balance after administrative changes\n- Correct errors in visit counts\n- Add bonus visits\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_memberships_set_balance",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "membership_id",
            "in": "path",
            "description": "Membership ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "united_balance_services_count": {
                    "type": "integer",
                    "description": "New visit count for unified balance subscriptions",
                    "example": 10
                  },
                  "services_balance_count": {
                    "type": "array",
                    "description": "New balance for separate balance subscriptions (per service/category)",
                    "items": {
                      "type": "object",
                      "required": [
                        "service_id",
                        "balance"
                      ],
                      "properties": {
                        "service_id": {
                          "type": "integer",
                          "description": "Service or category ID",
                          "example": 13160808
                        },
                        "balance": {
                          "type": "integer",
                          "description": "New visit count for this service/category",
                          "example": 5
                        }
                      }
                    },
                    "example": [
                      {
                        "service_id": 13160808,
                        "balance": 5
                      },
                      {
                        "service_id": 13160809,
                        "balance": 3
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Balance updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 123
                        },
                        "united_balance_services_count": {
                          "type": "integer",
                          "example": 10
                        },
                        "balance_container": {
                          "type": "object",
                          "description": "Updated balance details"
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - cannot change balance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Cannot change balance"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (invalid balance values, wrong membership type, etc.)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Invalid service ID"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonements/{membership_id}/set_period": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change membership validity period",
        "description": "Modifies the validity period (duration) of a subscription (membership).\n\nThis changes how long the subscription remains active before expiring.\n\n**Period units:**\n- 1 = day\n- 2 = week\n- 3 = month\n- 4 = year\n\n**Use cases:**\n- Extend expiration as customer service gesture\n- Adjust period after policy changes\n- Correct administrative errors\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_memberships_set_period",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "membership_id",
            "in": "path",
            "description": "Membership ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "period",
                  "period_unit_id"
                ],
                "type": "object",
                "properties": {
                  "period": {
                    "type": "integer",
                    "description": "Duration value",
                    "example": 90
                  },
                  "period_unit_id": {
                    "type": "integer",
                    "description": "Period unit: 1 = day, 2 = week, 3 = month, 4 = year",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Period updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 123
                        },
                        "period": {
                          "type": "integer",
                          "description": "Updated period duration",
                          "example": 90
                        },
                        "period_unit_id": {
                          "type": "integer",
                          "description": "Period unit type",
                          "example": 1
                        },
                        "expiration_date": {
                          "type": "string",
                          "format": "date-time",
                          "description": "New expiration date",
                          "example": "2026-03-31T23:59:59+00:00"
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - cannot change period",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Cannot change period"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (invalid period values, etc.)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Invalid period unit"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonement_types": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "List membership types",
        "description": "Retrieves all membership types available in the chain.\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_list",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          }
        ],
        "responses": {
          "200": {
            "description": "List of membership types retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/chain_loyalty_membership_type"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total_count": {
                          "type": "integer",
                          "example": 5
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create membership type",
        "description": "Creates a new membership type at the chain level. Membership types define reusable packages\n(e.g., \"10 visits\", \"Monthly unlimited\") that can be sold across multiple locations in the chain.\n\n**Important API Differences:**\n- `services` and `service_categories` must be **objects** (key-value pairs), not arrays\n- Example: `{\"service_id\": count}` not `[service_id]`\n- Some legacy documentation shows arrays, but the real API requires objects\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_create",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "salon_group_id",
                  "cost",
                  "service_categories",
                  "is_united_balance",
                  "united_balance_services_count"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Membership type name",
                    "example": "Fitness 10-pack"
                  },
                  "salon_group_id": {
                    "type": "integer",
                    "description": "Chain ID (API uses salon_group_id parameter name)",
                    "example": 1
                  },
                  "cost": {
                    "type": "number",
                    "format": "float",
                    "description": "Subscription price",
                    "example": 500
                  },
                  "location_ids": {
                    "type": "array",
                    "description": "List of location IDs where this membership type is available",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      123,
                      456
                    ]
                  },
                  "period": {
                    "type": "integer",
                    "description": "Validity period duration",
                    "example": 30
                  },
                  "period_unit_id": {
                    "type": "integer",
                    "description": "Period unit type: 1 = day, 2 = week, 3 = month, 4 = year",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 3
                  },
                  "allow_freeze": {
                    "type": "boolean",
                    "description": "Whether membership can be frozen",
                    "default": false,
                    "example": true
                  },
                  "freeze_limit": {
                    "type": "integer",
                    "description": "Maximum total freeze period",
                    "example": 14
                  },
                  "freeze_limit_unit_id": {
                    "type": "integer",
                    "description": "Freeze period unit: 1 = day, 2 = week, 3 = month, 4 = year",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  },
                  "service_price_correction": {
                    "type": "boolean",
                    "description": "Whether service price can be adjusted when using membership",
                    "default": false,
                    "example": true
                  },
                  "expiration_type_id": {
                    "type": "integer",
                    "description": "Activation type: 1 = on sale, 2 = on first use, 3 = from specific date",
                    "enum": [
                      1,
                      2,
                      3
                    ],
                    "example": 1
                  },
                  "is_allow_empty_code": {
                    "type": "boolean",
                    "description": "Personal vs shared subscription.\n- true = personal (only purchaser can use)\n- false = shared (multiple people can use with code)\n",
                    "default": true,
                    "example": true
                  },
                  "is_united_balance": {
                    "type": "boolean",
                    "description": "Balance type: true = unified balance, false = separate balance",
                    "example": false
                  },
                  "united_balance_services_count": {
                    "type": "integer",
                    "description": "Number of visits for unified balance",
                    "example": 10
                  },
                  "balance_edit_type_id": {
                    "type": "integer",
                    "description": "Balance adjustment permission: 0 = prohibited, 1 = only at sale location, 2 = at all locations",
                    "enum": [
                      0,
                      1,
                      2
                    ],
                    "example": 2
                  },
                  "is_online_sale_enabled": {
                    "type": "boolean",
                    "description": "Whether online sale is enabled.\nIf true, online_sale_price becomes required.\n",
                    "default": false,
                    "example": false
                  },
                  "online_sale_title": {
                    "type": "string",
                    "description": "Subscription title for online sale",
                    "example": "Fitness Pack - 10 sessions"
                  },
                  "online_sale_description": {
                    "type": "string",
                    "description": "Subscription description for online sale",
                    "example": "Perfect for beginners. Valid for 3 months."
                  },
                  "online_sale_price": {
                    "type": "number",
                    "format": "float",
                    "description": "Price for online sale (required if is_online_sale_enabled = true)",
                    "example": 450
                  },
                  "online_image": {
                    "type": "string",
                    "description": "Image URL for online sale",
                    "example": "https://example.com/images/fitness-pack.jpg"
                  },
                  "autoactivation_period": {
                    "type": "integer",
                    "description": "Maximum autoactivation period",
                    "example": 3
                  },
                  "autoactivation_time_in_days": {
                    "type": "integer",
                    "description": "Time units for autoactivation",
                    "example": 10
                  },
                  "autoactivation_time_unit_id": {
                    "type": "integer",
                    "description": "Autoactivation time unit: 1 = days, 2 = weeks, 3 = months, 4 = years",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "Whether membership type is archived",
                    "default": false,
                    "example": false
                  },
                  "category": {
                    "type": "string",
                    "description": "Subscription category type (always \"standard\")",
                    "default": "standard",
                    "example": "standard"
                  },
                  "salon_ids": {
                    "type": "array",
                    "description": "List of location IDs where this membership type is available",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      720441,
                      703092
                    ]
                  },
                  "services": {
                    "type": "object",
                    "description": "Object with service IDs as keys and usage count as values.\nFor separate balance: count = number of visits per service.\nFor unified balance: use empty object {}.\n\n**Important:** This is an object (key-value pairs), NOT an array.\n",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "example": {
                      "13160808": 5,
                      "13160809": 3
                    }
                  },
                  "service_categories": {
                    "type": "object",
                    "description": "Object with service category IDs as keys and usage count as values.\nFor separate balance: count = number of visits per category.\nFor unified balance: count value is ignored (set to any number or 0).\n\n**Important:** This is an object (key-value pairs), NOT an array.\n",
                    "additionalProperties": {
                      "type": "integer"
                    },
                    "example": {
                      "13160806": 10
                    }
                  },
                  "delete_online_image": {
                    "type": "boolean",
                    "description": "Whether to delete existing online sale image",
                    "default": false,
                    "example": false
                  },
                  "availability": {
                    "type": "array",
                    "description": "Time-based availability rules. Empty array = available anytime.\n",
                    "items": {
                      "type": "object",
                      "properties": {
                        "week_days": {
                          "type": "array",
                          "description": "Days of week when rule applies: 1 = Monday, 7 = Sunday",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          },
                          "example": [
                            1,
                            2,
                            3
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "description": "Time intervals when membership is valid",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "integer",
                                "description": "Interval start in seconds from midnight",
                                "example": 28800
                              },
                              "to": {
                                "type": "integer",
                                "description": "Interval end in seconds from midnight",
                                "example": 64800
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Membership type created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Membership type created successfully (alternate code)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Chain not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "errors": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonement_types/{loyalty_membership_type_id}": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "Get membership type details",
        "description": "Retrieves detailed information about a specific membership type.\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_read",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 468039
          }
        ],
        "responses": {
          "200": {
            "description": "Membership type details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update membership type",
        "description": "Updates an existing membership type. You can update basic information\n(title, cost, period) without modifying the service/category links.\n\n**Note:** To preserve existing services, pass empty arrays for\n`services` and `service_categories` fields.\n",
        "operationId": "chain_loyalty_membership_types_update",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 468039
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "salon_group_id",
                  "cost",
                  "service_categories",
                  "is_united_balance",
                  "united_balance_services_count"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Membership type name",
                    "example": "Updated Fitness 10-pack"
                  },
                  "salon_group_id": {
                    "type": "integer",
                    "description": "Chain ID (API uses salon_group_id parameter name)",
                    "example": 1
                  },
                  "cost": {
                    "type": "number",
                    "format": "float",
                    "description": "Subscription price",
                    "example": 550
                  },
                  "location_ids": {
                    "type": "array",
                    "description": "List of location IDs where this membership type is available",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      123,
                      456
                    ]
                  },
                  "period": {
                    "type": "integer",
                    "description": "Validity period duration",
                    "example": 90
                  },
                  "period_unit_id": {
                    "type": "integer",
                    "description": "Period unit type: 1 = day, 2 = week, 3 = month, 4 = year",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  },
                  "allow_freeze": {
                    "type": "boolean",
                    "description": "Whether membership can be frozen",
                    "default": false,
                    "example": true
                  },
                  "freeze_limit": {
                    "type": "integer",
                    "description": "Maximum total freeze period",
                    "example": 30
                  },
                  "freeze_limit_unit_id": {
                    "type": "integer",
                    "description": "Freeze period unit: 1 = day, 2 = week, 3 = month, 4 = year",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  },
                  "service_price_correction": {
                    "type": "boolean",
                    "description": "Whether service price can be adjusted when using membership",
                    "default": false,
                    "example": true
                  },
                  "expiration_type_id": {
                    "type": "integer",
                    "description": "Activation type: 1 = on sale, 2 = on first use, 3 = from specific date",
                    "enum": [
                      1,
                      2,
                      3
                    ],
                    "example": 1
                  },
                  "is_allow_empty_code": {
                    "type": "boolean",
                    "description": "Personal vs shared subscription.\n- true = personal (only purchaser can use)\n- false = shared (multiple people can use with code)\n",
                    "default": true,
                    "example": true
                  },
                  "is_united_balance": {
                    "type": "boolean",
                    "description": "Balance type: true = unified balance, false = separate balance",
                    "example": false
                  },
                  "united_balance_services_count": {
                    "type": "integer",
                    "description": "Number of visits for unified balance",
                    "example": 10
                  },
                  "balance_edit_type_id": {
                    "type": "integer",
                    "description": "Balance adjustment permission: 0 = prohibited, 1 = only at sale location, 2 = at all locations",
                    "enum": [
                      0,
                      1,
                      2
                    ],
                    "example": 2
                  },
                  "is_online_sale_enabled": {
                    "type": "boolean",
                    "description": "Whether online sale is enabled",
                    "default": false,
                    "example": false
                  },
                  "online_sale_title": {
                    "type": "string",
                    "description": "Subscription title for online sale",
                    "example": "Updated Fitness Pack"
                  },
                  "online_sale_description": {
                    "type": "string",
                    "description": "Subscription description for online sale",
                    "example": "Updated description"
                  },
                  "online_sale_price": {
                    "type": "number",
                    "format": "float",
                    "description": "Price for online sale",
                    "example": 500
                  },
                  "online_image": {
                    "type": "string",
                    "description": "Image URL for online sale",
                    "example": "https://example.com/images/updated.jpg"
                  },
                  "autoactivation_period": {
                    "type": "integer",
                    "description": "Maximum autoactivation period",
                    "example": 3
                  },
                  "autoactivation_time_in_days": {
                    "type": "integer",
                    "description": "Time units for autoactivation",
                    "example": 10
                  },
                  "autoactivation_time_unit_id": {
                    "type": "integer",
                    "description": "Autoactivation time unit: 1 = days, 2 = weeks, 3 = months, 4 = years",
                    "enum": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 1
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "Whether membership type is archived",
                    "default": false,
                    "example": false
                  },
                  "services": {
                    "type": "array",
                    "description": "List of service IDs. Pass empty array to preserve existing services.\n",
                    "items": {
                      "type": "integer"
                    },
                    "example": []
                  },
                  "service_categories": {
                    "type": "array",
                    "description": "List of service category IDs. Pass empty array to preserve existing categories.\n",
                    "items": {
                      "type": "integer"
                    },
                    "example": []
                  },
                  "availability": {
                    "type": "array",
                    "description": "Time-based availability rules. Empty array = available anytime.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "week_days": {
                          "type": "array",
                          "description": "Days of week when rule applies: 1 = Monday, 7 = Sunday",
                          "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 7
                          },
                          "example": [
                            1,
                            2,
                            3
                          ]
                        },
                        "intervals": {
                          "type": "array",
                          "description": "Time intervals when membership is valid",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "integer",
                                "description": "Interval start in seconds from midnight",
                                "example": 28800
                              },
                              "to": {
                                "type": "integer",
                                "description": "Interval end in seconds from midnight",
                                "example": 64800
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Membership type updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "errors": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "Delete membership type",
        "description": "Deletes a membership type from the chain.\n\n**Warning:** This action cannot be undone. Active subscriptions using this type\nmay be affected.\n",
        "operationId": "chain_loyalty_membership_types_delete",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID to delete",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 468039
          }
        ],
        "responses": {
          "204": {
            "description": "Membership type deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error (e.g., membership type is in use)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonement_types/{loyalty_membership_type_id}/clone": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Clone membership type",
        "description": "Creates a copy of an existing membership type with a new ID.\n\nThe cloned membership type will:\n- Have the same settings (cost, period, services, etc.)\n- Get a modified title with \" (2)\" suffix automatically added\n- Have a new unique ID\n- Preserve all service/category links from the original\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_clone",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID to clone",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 489159
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "description": "Empty body required (or omit entirely)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Membership type cloned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Membership type cloned successfully (alternate code)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/chain_loyalty_membership_type"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Source membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonement_types/{loyalty_membership_type_id}/restore": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "Restore deleted membership type",
        "description": "Restores a previously deleted membership type.\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_restore",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID to restore",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 489159
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "restore_in_title"
                ],
                "type": "object",
                "properties": {
                  "restore_in_title": {
                    "type": "string",
                    "description": "New title for the restored membership type",
                    "example": "Fitness Membership"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Membership type restored successfully",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/abonement_types/{loyalty_membership_type_id}/archive": {
      "patch": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Archive or unarchive membership type",
        "description": "Archives or unarchives a membership type.\n\nArchived membership types:\n- Cannot be sold to new clients\n- Existing active memberships remain functional\n- Can be unarchived at any time\n\n**Note:** Requires chain-level permissions.\n",
        "operationId": "chain_loyalty_membership_types_archive",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "loyalty_membership_type_id",
            "in": "path",
            "description": "Membership type ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 489159
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "is_archived"
                ],
                "type": "object",
                "properties": {
                  "is_archived": {
                    "type": "boolean",
                    "description": "Archive status:\n- true = archived (cannot be sold)\n- false = active (available for sale)\n",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Archive status updated successfully",
            "content": {
              "application/json": {}
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Membership type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/{location_id}/client/{client_id}/loyalty/abonements/search_for_activity": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Search available subscriptions for event",
        "description": "Retrieves subscriptions that can be used to create a client schedule for a series of events.\n\nThis method returns subscriptions (memberships) that:\n- Belong to the specified client\n- Are valid and active\n- Can be applied to the specified activity\n- Have remaining visits available\n\n**Use cases:**\n- Display available subscriptions when scheduling recurring activity sessions\n- Check which subscriptions cover specific activity types\n- Validate subscription applicability before creating schedules\n\n**Note:** Returns subscriptions with their types and availability intervals.\n",
        "operationId": "search_memberships_for_event",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 146915197
          },
          {
            "name": "event_id",
            "in": "query",
            "description": "Event (group event) ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 12345
          }
        ],
        "responses": {
          "200": {
            "description": "List of available subscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Membership instance ID",
                            "example": "5248829"
                          },
                          "type": {
                            "type": "string",
                            "example": "loyalty_abonement"
                          },
                          "attributes": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "string",
                                "description": "Subscription number",
                                "example": "690348"
                              },
                              "balance": {
                                "type": "integer",
                                "description": "Remaining visits",
                                "example": 10
                              }
                            }
                          },
                          "relationships": {
                            "type": "object",
                            "properties": {
                              "loyalty_abonement_type": {
                                "type": "object",
                                "properties": {
                                  "data": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "example": "489159"
                                      },
                                      "type": {
                                        "type": "string",
                                        "example": "loyalty_abonement_type"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Related membership types and availability intervals",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Event or client not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Event not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/company/{location_id}/client/{client_id}/loyalty/abonements/{membership_id}/check_for_activity": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Check membership availability for event",
        "description": "Validates a specific subscription for creating activity schedules.\n\nReturns:\n- **Last possible appointment date** based on membership expiration\n- **Available visit count** for the selected subscription\n- **Schedule day IDs** that can be booked\n\n**Use cases:**\n- Validate subscription before creating recurring appointments\n- Check if subscription has enough visits for schedule\n- Determine last bookable date based on expiration\n- Pre-validate schedule parameters\n\n**Note:** Requires schedule_day_ids parameter to check specific dates.\n",
        "operationId": "check_memberships_for_event",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 720441
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 146915197
          },
          {
            "name": "membership_id",
            "in": "path",
            "description": "Membership instance ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 5248829
          },
          {
            "name": "event_id",
            "in": "query",
            "description": "Event (group event) ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 12345
          },
          {
            "name": "schedule_day_ids",
            "in": "query",
            "description": "Comma-separated list of schedule day IDs to check",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "1,2,3,4,5"
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription availability information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Check result ID",
                          "example": "check_1"
                        },
                        "type": {
                          "type": "string",
                          "example": "loyalty_abonement_check"
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "last_booking_date": {
                              "type": "string",
                              "format": "date-time",
                              "description": "Last possible appointment date (based on membership expiration)",
                              "example": "2026-03-31T23:59:59+00:00"
                            },
                            "available_visits": {
                              "type": "integer",
                              "description": "Number of visits available in membership",
                              "example": 10
                            },
                            "can_book_all_days": {
                              "type": "boolean",
                              "description": "Whether membership can cover all requested schedule days",
                              "example": true
                            },
                            "bookable_day_ids": {
                              "type": "array",
                              "description": "Schedule day IDs that can be booked",
                              "items": {
                                "type": "integer"
                              },
                              "example": [
                                1,
                                2,
                                3,
                                4,
                                5
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Invalid schedule_day_ids"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Event, client, or membership not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Event not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/certificates": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get client gift cards",
        "description": "Returns a list of client gift cards by phone\n\n| Attribute         | Type      | Description                                                              |\n|-------------------|-----------|---------------------------------------------------------------------------|\n| id                | int       | Gift card ID                                                              |\n| number            | string    | Gift card code                                                            |\n| balance           | decimal   | Current balance                                                           |\n| default_balance   | decimal   | Initial balance                                                           |\n| type_id           | int       | Gift card type identifier                                                 |\n| status_id         | int       | Status ID                                                                 |\n| created_date      | timestamp | Date of sale                                                              |\n| expiration_date   | datetime  | Burn date                                                                 |\n| type              | object    | Object with gift card type information                                    |\n| status            | object    | An object with information about the current gift card status             |\n\nThe type array contains the following objects:\n\n| Attribute                | Type      | Description                                                                                                           |\n|--------------------------|-----------|-----------------------------------------------------------------------------------------------------------------------|\n| id                       | int       | Gift card type identifier                                                                                            |\n| title                    | string    | Type name                                                                                                             |\n| balance                  | decimal   | Gift card denomination                                                                                               |\n| is_multi                 | boolean   | Is it available for multiple debits                                                                                  |\n| company_group_id         | int       | ID of the chain where the certificate type was created                                                               |\n| item_type_id             | int       | Restriction on the use of redemption points. 0 - no limit, 1 - services only, 2 - some services + all products, 3 - some services, 4 - products only |\n| expiration_type_id       | int       | The ID of the expiration limit. 0 - unlimited, 1 - fixed date, 2 - fixed term                                        |\n| expiration_date          | timestamp | Burn date of all gift cards. Populated with expiration_type_id = 1                                                  |\n| expiration_timeout       | int       | Validity period of gift card. Populated with expiration_type_id = 2                                                 |\n| expiration_timeout_unit_id | int     | Time units. 1 - Day, 2 - Week, 3 - Month, 4 - Year                                                                   |\n| is_allow_empty_code      | boolean   | Sale without code                                                                                                    |\n| item_type                | object    | Object with item_type_id and its name                                                                               |",
        "operationId": "get_client_gift_cards",
        "parameters": [
          {
            "name": "copmany_id",
            "in": "query",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Customer phone number",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_certificates_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 409726,
                      "number": 888,
                      "balance": 9000,
                      "default_balance": 9000,
                      "type_id": 27841,
                      "status_id": 2,
                      "created_date": "2026-09-21T23:00:00.000-05:00",
                      "expiration_date": "2026-09-21T23:00:00.000-05:00",
                      "type": {
                        "id": 27841,
                        "title": "certificate 9000",
                        "balance": 9000,
                        "is_multi": true,
                        "company_group_id": 128284,
                        "item_type_id": 0,
                        "expiration_type_id": 2,
                        "expiration_timeout": 365,
                        "expiration_timeout_unit_id": 1,
                        "is_allow_empty_code": false,
                        "item_type": {
                          "id": 0,
                          "title": "No limits"
                        }
                      },
                      "status": {
                        "id": 2,
                        "title": "activated"
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/user/loyalty/certificates": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get user gift cards",
        "description": "Returns a list of authorized user gift cards",
        "operationId": "get_user_gift_cards",
        "parameters": [
          {
            "name": "company_id",
            "in": "query",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_certificates_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 409726,
                      "number": 888,
                      "balance": 9000,
                      "default_balance": 9000,
                      "type_id": 27841,
                      "status_id": 2,
                      "created_date": "2026-09-21T23:00:00.000-05:00",
                      "expiration_date": "2026-09-21T23:00:00.000-05:00",
                      "type": {
                        "id": 27841,
                        "title": "certificate 9000",
                        "balance": 9000,
                        "is_multi": true,
                        "company_group_id": 128284,
                        "item_type_id": 0,
                        "expiration_type_id": 2,
                        "expiration_timeout": 365,
                        "expiration_timeout_unit_id": 1,
                        "is_allow_empty_code": false,
                        "item_type": {
                          "id": 0,
                          "title": "No limits"
                        }
                      },
                      "status": {
                        "id": 2,
                        "title": "activated"
                      }
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/certificate_types/fetch": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Gift Card Types by ID",
        "description": "A list of **gift card types** available at the location can be obtained by querying the location ID and gift card type IDs.\r\n\r\nThe list is an array of [gift card types](#loyalty-certificate-type).",
        "operationId": "get_gift_card_type_list_by_id",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_certificate_type_search_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Fixed burn date certificate without application restrictions",
                      "balance": 10,
                      "is_multi": true,
                      "company_group_id": 12,
                      "item_type_id": 0,
                      "expiration_type_id": 1,
                      "expiration_date": "2026-09-21T23:00:00.000-05:00",
                      "expiration_timeout": 0,
                      "expiration_timeout_unit_id": 0,
                      "is_allow_empty_code": true
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/certificate_types/search": {
      "get": {
        "tags": [
          "Subscriptions & Certificates"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Available Gift Card Types",
        "description": "A list of **gift card types** available at a location can be obtained by querying the location ID.\nThe list can be filtered by the name of the gift card type by passing the title parameter.\nPagination is supported, specified by the `page` and `page_size` parameters.\n\nThe list is an array of [gift card types](#loyalty-certificate-type).\n\n<a name=\"loyalty-certificate-type\"></a>\n**Gift card type** has the following structure:\n\n| Field                      | Type    | Description                                                                                                                        |\n|----------------------------|---------|------------------------------------------------------------------------------------------------------------------------------------|\n| id                         | number  | Gift card type identifier                                                                                                          |\n| title                      | string  | Gift card type name                                                                                                                |\n| balance                    | number  | Gift card denomination                                                                                                           |\n| is_multi                   | boolean | Write-off type: true - multiple write-off, false - single write-off                                                               |\n| company_group_id           | number  | ID of the chain where the gift card type is valid                                                                                  |\n| item_type_id               | number  | Application Constraint (list of possible values)                                                                                   |\n| expiration_type_id         | number  | Expiration limit (list of possible values)                                                                                         |\n| expiration_date            | string  | Fixed burn date in ISO8601 format (null if not set)                                                                                |\n| expiration_timeout         | number  | Gift card validity period from the date of sale (0 if not set)                                                                     |\n| expiration_timeout_unit_id | number  | The unit of measurement of the validity period of the gift card from the moment of sale (list of possible values, if not set - 0) |\n| is_allow_empty_code        | boolean | Allow sale of gift card without code? true - allow, false - do not allow                                                           |\n\n<a name=\"loyalty-certificate-item-type\"></a>\n**Gift Card Type Restriction**\n\n| Meaning | Description                     |\n|---------|---------------------------------|\n| 0       | Unlimited                       |\n| 1       | Any services without products   |\n| 2       | Any products without services   |\n| 3       | Some services without products  |\n| 4       | Some services and any products  |\n\n<a name=\"loyalty-certificate-expiration-type\"></a>\n**Gift Card Type Expiration Limit**\n\n| Meaning | Description                            |\n|---------|----------------------------------------|\n| 0       | No expiration date                     |\n| 1       | Fixed date for all instances           |\n| 2       | Fixed period of validity from the date of sale |\n\n<a name=\"loyalty-certificate-expiration-unit\"></a>\n**Units of certificate type validity period**\n\n| Meaning | Description |\n|---------|-------------|\n| 1       | Day         |\n| 2       | Week        |\n| 3       | Month       |\n| 4       | Year        |",
        "operationId": "get_gift_card_type_list",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Gift card type name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "The number of output lines per page. Maximum 100",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_certificate_type_search_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "title": "Fixed burn date certificate without application restrictions",
                      "balance": 10,
                      "is_multi": true,
                      "company_group_id": 12,
                      "item_type_id": 0,
                      "expiration_type_id": 1,
                      "expiration_date": "2026-09-21T23:00:00.000-05:00",
                      "expiration_timeout": 0,
                      "expiration_timeout_unit_id": 0,
                      "is_allow_empty_code": true
                    },
                    {
                      "id": 11,
                      "title": "Certificate valid for 6 months from the date of sale for any goods without services",
                      "balance": 100,
                      "is_multi": false,
                      "company_group_id": 12,
                      "item_type_id": 2,
                      "expiration_type_id": 2,
                      "expiration_timeout": 6,
                      "expiration_timeout_unit_id": 3,
                      "is_allow_empty_code": false
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/certificate_types": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List certificate types",
        "description": "Retrieves a list of certificate types at the chain level.\n\nReturns all certificate types configured for the chain with optional filtering\nand pagination.\n\n**Query Parameters:**\n- `title` - Filter by certificate type name (partial match)\n- `page` - Page number (default: 1)\n- `page_size` - Items per page (default: 10, max: 100)\n\n**Item Type Restrictions:**\n- 0 = All services and products\n- 1 = Any services (no products)\n- 2 = Any products (no services)\n- 3 = Specific services only (no products)\n- 4 = Specific services + any products\n\n**Expiration Types:**\n- 0 = No expiration\n- 1 = Fixed date for all instances\n- 2 = Fixed period from sale date\n\n**Expiration Units:**\n- 1 = day\n- 2 = week\n- 3 = month\n- 4 = year\n",
        "operationId": "chain_loyalty_certificate_types_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "title",
            "in": "query",
            "description": "Filter by certificate type name (partial match)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Gift"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100
            },
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "List of certificate types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 289056
                          },
                          "title": {
                            "type": "string",
                            "example": "Gift Certificate 1000"
                          },
                          "balance": {
                            "type": "number",
                            "example": 1000
                          },
                          "is_multi": {
                            "type": "boolean",
                            "example": true
                          },
                          "company_group_id": {
                            "type": "integer",
                            "example": 706028
                          },
                          "category_id": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "example": null
                          },
                          "weight": {
                            "type": "integer",
                            "example": 1
                          },
                          "item_type_id": {
                            "type": "integer",
                            "example": 0
                          },
                          "expiration_type_id": {
                            "type": "integer",
                            "example": 2
                          },
                          "expiration_date": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "example": null
                          },
                          "expiration_timeout": {
                            "type": "integer",
                            "example": 6
                          },
                          "expiration_timeout_unit_id": {
                            "type": "integer",
                            "example": 3
                          },
                          "balance_edit_type_id": {
                            "type": "integer",
                            "example": 1
                          },
                          "is_allow_empty_code": {
                            "type": "boolean",
                            "example": false
                          },
                          "is_serial_number_limited": {
                            "type": "boolean",
                            "example": false
                          },
                          "is_archived": {
                            "type": "boolean",
                            "example": false
                          },
                          "date_archived": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "online_sale_is_enabled": {
                            "type": "boolean",
                            "example": false
                          },
                          "online_sale_title": {
                            "type": "string",
                            "example": "Gift Certificate 1000"
                          },
                          "online_sale_description": {
                            "type": "string",
                            "example": ""
                          },
                          "online_sale_price": {
                            "type": "number",
                            "example": 0
                          },
                          "online_sale_image": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "example": null
                          },
                          "released_total": {
                            "type": "integer",
                            "example": 0
                          },
                          "item_type": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 0
                              },
                              "title": {
                                "type": "string",
                                "example": "All services and products"
                              }
                            }
                          },
                          "service_ids": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": []
                          },
                          "salon_ids": {
                            "type": "array",
                            "items": {
                              "type": "integer"
                            },
                            "example": [
                              720441
                            ]
                          }
                        }
                      }
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "total_count": {
                          "type": "integer",
                          "description": "Total number of certificate types",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create certificate type",
        "description": "Creates a new certificate type at the chain level.\n\nCertificate types define gift certificate templates that can be sold across multiple locations.\n\n**Item Type Restrictions:**\n- 0 = All services and products\n- 1 = Any services (no products)\n- 2 = Any products (no services)\n- 3 = Specific services only (no products)\n- 4 = Specific services + any products\n\n**Expiration Types:**\n- 0 = No expiration\n- 1 = Fixed date for all instances\n- 2 = Fixed period from sale date\n\n**Expiration Units:**\n- 1 = day\n- 2 = week\n- 3 = month\n- 4 = year\n\n**Balance Edit Types:**\n- 1 = Can be edited\n- 2 = Cannot be edited\n\n**Note:** After creation, certificate products are automatically created in inventory.\n",
        "operationId": "chain_loyalty_certificate_types_create",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "balance",
                  "is_multi",
                  "item_type_id",
                  "is_allow_empty_code",
                  "balance_edit_type_id",
                  "service_ids",
                  "salon_ids",
                  "expiration",
                  "online_sale"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Certificate type name",
                    "example": "Gift Certificate 1000"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Certificate face value",
                    "example": 1000
                  },
                  "is_multi": {
                    "type": "boolean",
                    "description": "true = multiple use, false = single use",
                    "example": true
                  },
                  "item_type_id": {
                    "type": "integer",
                    "description": "Usage restrictions (0-4)",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 0
                  },
                  "is_allow_empty_code": {
                    "type": "boolean",
                    "description": "Allow selling without code?",
                    "example": false
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Service category restriction (null = no restriction)",
                    "example": null
                  },
                  "balance_edit_type_id": {
                    "type": "integer",
                    "description": "Balance editability (1 = editable, 2 = not editable)",
                    "enum": [
                      1,
                      2
                    ],
                    "example": 1
                  },
                  "service_ids": {
                    "type": "array",
                    "description": "Specific service IDs (empty if no restriction)",
                    "items": {
                      "type": "integer"
                    },
                    "example": []
                  },
                  "salon_ids": {
                    "type": "array",
                    "description": "Location IDs where certificate is valid",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      720441
                    ]
                  },
                  "expiration": {
                    "type": "object",
                    "description": "Expiration settings",
                    "required": [
                      "type_id"
                    ],
                    "properties": {
                      "type_id": {
                        "type": "integer",
                        "description": "Expiration type: 0 = none, 1 = fixed date, 2 = period from sale",
                        "enum": [
                          0,
                          1,
                          2
                        ],
                        "example": 2
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Fixed expiration date (ISO 8601, required if type_id = 1)",
                        "example": "2026-12-31T23:59:59+00:00"
                      },
                      "timeout": {
                        "type": "integer",
                        "description": "Duration value (required if type_id = 2)",
                        "example": 6
                      },
                      "timeout_unit_id": {
                        "type": "integer",
                        "description": "Duration unit (required if type_id = 2): 1 = day, 2 = week, 3 = month, 4 = year",
                        "enum": [
                          1,
                          2,
                          3,
                          4
                        ],
                        "example": 3
                      }
                    }
                  },
                  "online_sale": {
                    "type": "object",
                    "description": "Online sale settings",
                    "required": [
                      "is_enabled"
                    ],
                    "properties": {
                      "is_enabled": {
                        "type": "boolean",
                        "description": "Enable online purchase?",
                        "example": false
                      },
                      "title": {
                        "type": "string",
                        "description": "Title for online store",
                        "example": "Gift Certificate"
                      },
                      "description": {
                        "type": "string",
                        "description": "Description for online store",
                        "example": "Perfect gift for any occasion"
                      },
                      "price": {
                        "type": "number",
                        "description": "Online sale price",
                        "example": 1000
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Certificate type created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "description": "Certificate type ID",
                          "example": 289056
                        },
                        "title": {
                          "type": "string",
                          "example": "Gift Certificate 1000"
                        },
                        "balance": {
                          "type": "number",
                          "example": 1000
                        },
                        "is_multi": {
                          "type": "boolean",
                          "example": true
                        },
                        "company_group_id": {
                          "type": "integer",
                          "description": "Chain ID",
                          "example": 706028
                        },
                        "category_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "example": null
                        },
                        "weight": {
                          "type": "integer",
                          "description": "Sort order",
                          "example": 1
                        },
                        "item_type_id": {
                          "type": "integer",
                          "example": 0
                        },
                        "expiration_type_id": {
                          "type": "integer",
                          "example": 2
                        },
                        "expiration_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": null
                        },
                        "expiration_timeout": {
                          "type": "integer",
                          "example": 6
                        },
                        "expiration_timeout_unit_id": {
                          "type": "integer",
                          "example": 3
                        },
                        "balance_edit_type_id": {
                          "type": "integer",
                          "example": 1
                        },
                        "is_allow_empty_code": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_serial_number_limited": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_archived": {
                          "type": "boolean",
                          "example": false
                        },
                        "date_archived": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "online_sale_is_enabled": {
                          "type": "boolean",
                          "example": false
                        },
                        "online_sale_title": {
                          "type": "string",
                          "example": "Gift Certificate 1000"
                        },
                        "online_sale_description": {
                          "type": "string",
                          "example": ""
                        },
                        "online_sale_price": {
                          "type": "number",
                          "example": 0
                        },
                        "online_sale_image": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "released_total": {
                          "type": "integer",
                          "description": "Total certificates issued",
                          "example": 0
                        },
                        "item_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 0
                            },
                            "title": {
                              "type": "string",
                              "example": "All services and products"
                            }
                          }
                        },
                        "service_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": []
                        },
                        "salon_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            720441
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "An error has occurred"
                        },
                        "errors": {
                          "type": "object",
                          "description": "Field-specific validation errors"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/certificate_types/{type_id}": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "Get certificate type",
        "description": "Retrieves a specific certificate type by ID at the chain level.\n\nReturns complete certificate type configuration including expiration rules,\nrestrictions, and online sale settings.\n",
        "operationId": "chain_loyalty_certificate_types_get",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "type_id",
            "in": "path",
            "description": "Certificate type ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 289056
          }
        ],
        "responses": {
          "200": {
            "description": "Certificate type details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 289056
                        },
                        "title": {
                          "type": "string",
                          "example": "Gift Certificate 1000"
                        },
                        "balance": {
                          "type": "number",
                          "example": 1000
                        },
                        "is_multi": {
                          "type": "boolean",
                          "example": true
                        },
                        "company_group_id": {
                          "type": "integer",
                          "example": 706028
                        },
                        "category_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "example": null
                        },
                        "weight": {
                          "type": "integer",
                          "example": 1
                        },
                        "item_type_id": {
                          "type": "integer",
                          "example": 0
                        },
                        "expiration_type_id": {
                          "type": "integer",
                          "example": 2
                        },
                        "expiration_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "example": null
                        },
                        "expiration_timeout": {
                          "type": "integer",
                          "example": 6
                        },
                        "expiration_timeout_unit_id": {
                          "type": "integer",
                          "example": 3
                        },
                        "balance_edit_type_id": {
                          "type": "integer",
                          "example": 1
                        },
                        "is_allow_empty_code": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_serial_number_limited": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_archived": {
                          "type": "boolean",
                          "example": false
                        },
                        "date_archived": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "online_sale_is_enabled": {
                          "type": "boolean",
                          "example": false
                        },
                        "online_sale_title": {
                          "type": "string",
                          "example": "Gift Certificate 1000"
                        },
                        "online_sale_description": {
                          "type": "string",
                          "example": ""
                        },
                        "online_sale_price": {
                          "type": "number",
                          "example": 0
                        },
                        "online_sale_image": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "released_total": {
                          "type": "integer",
                          "example": 0
                        },
                        "item_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 0
                            },
                            "title": {
                              "type": "string",
                              "example": "All services and products"
                            }
                          }
                        },
                        "service_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": []
                        },
                        "salon_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            720441
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Certificate type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update certificate type",
        "description": "Updates an existing certificate type at the chain level.\n\nAll fields from creation are required. Use GET first to retrieve current values,\nthen modify needed fields and send complete object.\n\n**Note:** Cannot update certificate types that have already been issued.\n",
        "operationId": "chain_loyalty_certificate_types_update",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "type_id",
            "in": "path",
            "description": "Certificate type ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 289056
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "balance",
                  "is_multi",
                  "item_type_id",
                  "is_allow_empty_code",
                  "balance_edit_type_id",
                  "service_ids",
                  "salon_ids",
                  "expiration",
                  "online_sale"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Certificate type name",
                    "example": "Gift Certificate 1500"
                  },
                  "balance": {
                    "type": "number",
                    "description": "Certificate face value",
                    "example": 1500
                  },
                  "is_multi": {
                    "type": "boolean",
                    "description": "true = multiple use, false = single use",
                    "example": true
                  },
                  "item_type_id": {
                    "type": "integer",
                    "description": "Usage restrictions (0-4)",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4
                    ],
                    "example": 0
                  },
                  "is_allow_empty_code": {
                    "type": "boolean",
                    "description": "Allow selling without code?",
                    "example": false
                  },
                  "category_id": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Service category restriction (null = no restriction)",
                    "example": null
                  },
                  "balance_edit_type_id": {
                    "type": "integer",
                    "description": "Balance editability (1 = editable, 2 = not editable)",
                    "enum": [
                      1,
                      2
                    ],
                    "example": 1
                  },
                  "service_ids": {
                    "type": "array",
                    "description": "Specific service IDs (empty if no restriction)",
                    "items": {
                      "type": "integer"
                    },
                    "example": []
                  },
                  "salon_ids": {
                    "type": "array",
                    "description": "Location IDs where certificate is valid",
                    "items": {
                      "type": "integer"
                    },
                    "example": [
                      720441
                    ]
                  },
                  "expiration": {
                    "type": "object",
                    "description": "Expiration settings",
                    "required": [
                      "type_id"
                    ],
                    "properties": {
                      "type_id": {
                        "type": "integer",
                        "description": "Expiration type: 0 = none, 1 = fixed date, 2 = period from sale",
                        "enum": [
                          0,
                          1,
                          2
                        ],
                        "example": 2
                      },
                      "date": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Fixed expiration date (ISO 8601, required if type_id = 1)",
                        "example": "2026-12-31T23:59:59+00:00"
                      },
                      "timeout": {
                        "type": "integer",
                        "description": "Duration value (required if type_id = 2)",
                        "example": 6
                      },
                      "timeout_unit_id": {
                        "type": "integer",
                        "description": "Duration unit (required if type_id = 2): 1 = day, 2 = week, 3 = month, 4 = year",
                        "enum": [
                          1,
                          2,
                          3,
                          4
                        ],
                        "example": 3
                      }
                    }
                  },
                  "online_sale": {
                    "type": "object",
                    "description": "Online sale settings",
                    "required": [
                      "is_enabled"
                    ],
                    "properties": {
                      "is_enabled": {
                        "type": "boolean",
                        "description": "Enable online purchase?",
                        "example": false
                      },
                      "title": {
                        "type": "string",
                        "description": "Title for online store",
                        "example": "Gift Certificate"
                      },
                      "description": {
                        "type": "string",
                        "description": "Description for online store",
                        "example": "Perfect gift for any occasion"
                      },
                      "price": {
                        "type": "number",
                        "description": "Online sale price",
                        "example": 1500
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Certificate type updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 289056
                        },
                        "title": {
                          "type": "string",
                          "example": "Gift Certificate 1500"
                        },
                        "balance": {
                          "type": "number",
                          "example": 1500
                        },
                        "is_multi": {
                          "type": "boolean",
                          "example": true
                        },
                        "company_group_id": {
                          "type": "integer",
                          "example": 706028
                        },
                        "category_id": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "example": null
                        },
                        "weight": {
                          "type": "integer",
                          "example": 1
                        },
                        "item_type_id": {
                          "type": "integer",
                          "example": 0
                        },
                        "expiration_type_id": {
                          "type": "integer",
                          "example": 2
                        },
                        "expiration_date": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "expiration_timeout": {
                          "type": "integer",
                          "example": 6
                        },
                        "expiration_timeout_unit_id": {
                          "type": "integer",
                          "example": 3
                        },
                        "balance_edit_type_id": {
                          "type": "integer",
                          "example": 1
                        },
                        "is_allow_empty_code": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_serial_number_limited": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_archived": {
                          "type": "boolean",
                          "example": false
                        },
                        "date_archived": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "online_sale_is_enabled": {
                          "type": "boolean",
                          "example": false
                        },
                        "online_sale_title": {
                          "type": "string",
                          "example": "Gift Certificate 1500"
                        },
                        "online_sale_description": {
                          "type": "string",
                          "example": ""
                        },
                        "online_sale_price": {
                          "type": "number",
                          "example": 0
                        },
                        "online_sale_image": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "example": null
                        },
                        "released_total": {
                          "type": "integer",
                          "example": 0
                        },
                        "item_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 0
                            },
                            "title": {
                              "type": "string",
                              "example": "All services and products"
                            }
                          }
                        },
                        "service_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": []
                        },
                        "salon_ids": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "example": [
                            720441
                          ]
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - validation errors or certificate already issued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "An error has occurred"
                        },
                        "errors": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Certificate type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "summary": "Delete certificate type",
        "description": "Deletes a certificate type from the chain.\n\n**Warning:** This action cannot be undone. Certificate types that have\nissued certificates cannot be deleted.\n",
        "operationId": "chain_loyalty_certificate_types_delete",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/vnd.api.v2+json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 706028
          },
          {
            "name": "type_id",
            "in": "path",
            "description": "Certificate type ID to delete",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 289056
          }
        ],
        "responses": {
          "200": {
            "description": "Certificate type deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "array",
                      "example": []
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "Certificate type deleted successfully (no content)"
          },
          "400": {
            "description": "Bad Request - certificate type has issued certificates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Cannot delete certificate type with issued certificates"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Certificate type not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/loyalty/programs/search": {
      "get": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Promotions Active in the Location",
        "operationId": "get_location_loyalty_program_list",
        "description": "The method allows you to get a list of promotions that are active for the specified location.",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "The first_transaction_date value adds the date of the first stock transaction to the response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Promotion type",
            "schema": {
              "type": "string",
              "enum": [
                "discount_static",
                "discount_accumulative_visits",
                "discount_accumulative_sold",
                "discount_accumulative_paid",
                "cashback_static_sold",
                "cashback_static_paid",
                "cashback_accumulative_paid",
                "cashback_accumulative_sold",
                "cashback_accumulative_paid_visits",
                "cashback_accumulative_sold_visits",
                "cashback_sold_visits",
                "cashback_paid_visits",
                "package_discount"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/company_loyalty_programs_search_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 53591,
                      "title": "100 USD discount on Altegio Implementation Consultation",
                      "type": "discount_static",
                      "loyalty_type_id": 1,
                      "item_type_id": 4,
                      "service_item_type": "custom_allowed",
                      "good_item_type": "any_allowed",
                      "value_unit_id": 2,
                      "value_unit": "amount",
                      "group_id": 502054,
                      "usage_limit": 0,
                      "visit_multiplicity": 1,
                      "sold_items_multiplicity": 1,
                      "current_package_progress": 0,
                      "allowed_usages_amount": 0,
                      "expiration_timeout": 0,
                      "expiration_timeout_unit": "day",
                      "expiration_notification_timeout": 0,
                      "params_source_type": "loyalty_card",
                      "on_changed_notification_template_id": 0,
                      "on_expiration_notification_template_id": 0
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/visit/loyalty/transactions/{visit_id}": {
      "get": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get loyalty transactions by visit",
        "description": "List of transactions for loyalty promotions for this visit",
        "operationId": "get_loyalty_transactions_by_visit",
        "parameters": [
          {
            "name": "visit_id",
            "in": "path",
            "description": "Visit ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_transaction_reaponse_data_types"
                },
                "example": [
                  {
                    "id": 22989715,
                    "status_id": 1,
                    "amount": 100,
                    "type_id": 1,
                    "program_id": 12705,
                    "card_id": 0,
                    "salon_group_id": 145071,
                    "item_id": 5048371,
                    "item_type_id": 7,
                    "item_record_id": 0,
                    "goods_transaction_id": 96082477,
                    "is_discount": true,
                    "is_loyalty_withdraw": false,
                    "type": {
                      "id": 1,
                      "title": "Promotion discount"
                    },
                    "program": {
                      "id": 12705,
                      "title": "invited",
                      "value": 10,
                      "loyalty_type_id": 1,
                      "item_type_id": 0,
                      "value_unit_id": 1,
                      "group_id": 145071
                    }
                  },
                  {
                    "id": 22994127,
                    "status_id": 1,
                    "amount": 100,
                    "type_id": 4,
                    "program_id": 19044,
                    "card_id": 9234863,
                    "salon_group_id": 145071,
                    "item_id": 0,
                    "item_type_id": 0,
                    "item_record_id": 0,
                    "goods_transaction_id": 0,
                    "is_discount": false,
                    "is_loyalty_withdraw": false,
                    "type": {
                      "id": 4,
                      "title": "Referral program accrual"
                    },
                    "program": {
                      "id": 19044,
                      "title": "inviter 2",
                      "value": 100,
                      "loyalty_type_id": 6,
                      "item_type_id": 0,
                      "value_unit_id": 2,
                      "group_id": 145071
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/loyalty/generate_code/{location_id}/{product_id}": {
      "get": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Gift Card/Membership Code Generation",
        "operationId": "generate_loyalty_code",
        "description": "+ Options\r\n    + location_id (required, number, `1`) - location ID\r\n    + product_id (required, number, `1`) - product ID (gift card/ membership)",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "product_id",
            "in": "path",
            "description": "Product ID (membership/gift card)",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "data",
                    "meta",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "LoyaltyGenerateCode200Option": {
                      "$ref": "#/components/schemas/loyalty_generate_code200_option"
                    },
                    "data": {
                      "$ref": "#/components/schemas/loyalty_generate_code200_data_option"
                    },
                    "meta": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "code": 1
                  },
                  "meta": []
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "meta",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "LoyaltyGenerateCodeErrorOption": {
                      "$ref": "#/components/schemas/loyalty_generate_code_error_option"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/loyalty_generate_code_error_meta_option"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Not enough rights"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "meta",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "LoyaltyGenerateCodeErrorOption": {
                      "$ref": "#/components/schemas/loyalty_generate_code_error_option"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/loyalty_generate_code_error_meta_option"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/visit/loyalty/apply_card_withdrawal/{location_id}/{card_id}": {
      "post": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Apply Deduction from the Loyalty Card in the Visit",
        "description": "The amount deducted will not exceed the available bonus balance. If the value is set to 0, no write-off transaction will occur",
        "operationId": "apply_loyalty_card_deduction",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Client card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/visit_loyalty_withdrawl_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_apply_response_data_types"
                },
                "example": {
                  "payment_transactions": [],
                  "loyalty_transactions": [
                    {
                      "id": 22985556,
                      "status_id": 1,
                      "amount": 20,
                      "type_id": 1,
                      "program_id": 20802,
                      "card_id": 9223622,
                      "salon_group_id": 145071,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "item_record_id": 0,
                      "goods_transaction_id": 96063258,
                      "is_discount": true,
                      "is_loyalty_withdraw": false,
                      "type": {
                        "id": 1,
                        "title": "Promotion Discount"
                      }
                    }
                  ],
                  "kkm_transaction_details_container": {
                    "last_operation_type": 1,
                    "transactions": []
                  },
                  "items": [
                    {
                      "id": 96063258,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "record_id": 0,
                      "item_title": "test two",
                      "amount": 1,
                      "first_cost": 20,
                      "manual_cost": 20,
                      "discount": 0,
                      "cost": 20,
                      "master_id": 548096,
                      "good_id": 5048384,
                      "service_id": 0,
                      "event_id": 0,
                      "is_service": false,
                      "is_event": false,
                      "is_good": true
                    },
                    {
                      "id": 0,
                      "item_id": 2560779,
                      "item_type_id": 1,
                      "record_id": 140878948,
                      "item_title": "Deep bikini",
                      "amount": 1,
                      "first_cost": 3000,
                      "manual_cost": 3000,
                      "discount": 0,
                      "cost": 3000,
                      "master_id": 140878948,
                      "good_id": 0,
                      "service_id": 2560779,
                      "event_id": 0,
                      "is_service": true,
                      "is_event": false,
                      "is_good": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/visit/loyalty/cancel_card_withdrawal/{location_id}/{card_id}": {
      "post": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Cancel Withdrawal from the Loyalty Card During the Visit",
        "description": "Cancellation of write-off from the loyalty card.",
        "operationId": "cancel_loyalty_card_withdrawal",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Client card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/visit_loyalty_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_cancel_response_data_types"
                },
                "example": {
                  "payment_transactions": [],
                  "loyalty_transactions": [],
                  "kkm_transaction_details_container": {
                    "last_operation_type": 1,
                    "transactions": []
                  },
                  "items": [
                    {
                      "id": 96063258,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "record_id": 0,
                      "item_title": "test two",
                      "amount": 1,
                      "first_cost": 20,
                      "manual_cost": 20,
                      "discount": 0,
                      "cost": 20,
                      "master_id": 548096,
                      "good_id": 5048384,
                      "service_id": 0,
                      "event_id": 0,
                      "is_service": false,
                      "is_event": false,
                      "is_good": true
                    },
                    {
                      "id": 0,
                      "item_id": 2560779,
                      "item_type_id": 1,
                      "record_id": 140878948,
                      "item_title": "Deep bikini",
                      "amount": 1,
                      "first_cost": 3000,
                      "manual_cost": 3000,
                      "discount": 0,
                      "cost": 3000,
                      "master_id": 140878948,
                      "good_id": 0,
                      "service_id": 2560779,
                      "event_id": 0,
                      "is_service": true,
                      "is_event": false,
                      "is_good": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/visit/loyalty/apply_discount_program/{location_id}/{card_id}/{program_id}": {
      "post": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Apply a Discount Promotion in a Visit",
        "description": "Applying a promotion to a visit, it only makes sense if there is a visit",
        "operationId": "apply_discount_promotion",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Client card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "program_id",
            "in": "path",
            "description": "ID of the promotion linked to the card",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/visit_loyalty_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_apply_response_data_types"
                },
                "example": {
                  "payment_transactions": [],
                  "loyalty_transactions": [
                    {
                      "id": 22985556,
                      "status_id": 1,
                      "amount": 20,
                      "type_id": 1,
                      "program_id": 20802,
                      "card_id": 9223622,
                      "salon_group_id": 145071,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "item_record_id": 0,
                      "goods_transaction_id": 96063258,
                      "is_discount": true,
                      "is_loyalty_withdraw": false,
                      "type": {
                        "id": 1,
                        "title": "Promotion Discount"
                      }
                    }
                  ],
                  "kkm_transaction_details_container": {
                    "last_operation_type": 1,
                    "transactions": []
                  },
                  "items": [
                    {
                      "id": 96063258,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "record_id": 0,
                      "item_title": "test two",
                      "amount": 1,
                      "first_cost": 20,
                      "manual_cost": 20,
                      "discount": 0,
                      "cost": 20,
                      "master_id": 548096,
                      "good_id": 5048384,
                      "service_id": 0,
                      "event_id": 0,
                      "is_service": false,
                      "is_event": false,
                      "is_good": true
                    },
                    {
                      "id": 0,
                      "item_id": 2560779,
                      "item_type_id": 1,
                      "record_id": 140878948,
                      "item_title": "Deep bikini",
                      "amount": 1,
                      "first_cost": 3000,
                      "manual_cost": 3000,
                      "discount": 0,
                      "cost": 3000,
                      "master_id": 140878948,
                      "good_id": 0,
                      "service_id": 2560779,
                      "event_id": 0,
                      "is_service": true,
                      "is_event": false,
                      "is_good": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/visit/loyalty/cancel_discount_program/{location_id}/{card_id}/{program_id}": {
      "post": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Cancel the Application of the Discount Promotion in the Visit",
        "description": "Cancellation of the promotion applied to the visit.",
        "operationId": "cancel_discount_promotion",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "card_id",
            "in": "path",
            "description": "Client card ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "program_id",
            "in": "path",
            "description": "ID of the promotion linked to the card",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/visit_loyalty_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_cancel_response_data_types"
                },
                "example": {
                  "payment_transactions": [],
                  "loyalty_transactions": [],
                  "kkm_transaction_details_container": {
                    "last_operation_type": 1,
                    "transactions": []
                  },
                  "items": [
                    {
                      "id": 96063258,
                      "item_id": 5048384,
                      "item_type_id": 7,
                      "record_id": 0,
                      "item_title": "test two",
                      "amount": 1,
                      "first_cost": 20,
                      "manual_cost": 20,
                      "discount": 0,
                      "cost": 20,
                      "master_id": 548096,
                      "good_id": 5048384,
                      "service_id": 0,
                      "event_id": 0,
                      "is_service": false,
                      "is_event": false,
                      "is_good": true
                    },
                    {
                      "id": 0,
                      "item_id": 2560779,
                      "item_type_id": 1,
                      "record_id": 140878948,
                      "item_title": "Deep bikini",
                      "amount": 1,
                      "first_cost": 3000,
                      "manual_cost": 3000,
                      "discount": 0,
                      "cost": 3000,
                      "master_id": 140878948,
                      "good_id": 0,
                      "service_id": 2560779,
                      "event_id": 0,
                      "is_service": true,
                      "is_event": false,
                      "is_good": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/visit/loyalty/apply_referral_program/{location_id}/{chain_id}": {
      "post": {
        "tags": [
          "Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Apply Referral Program During a Visit",
        "description": "Applying a referral program to a visit",
        "operationId": "apply_referral_program",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "Location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "chain_id",
            "in": "path",
            "description": "ID of the chain where the referral program is configured",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/visit_loyalty_referral_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/visit_loyalty_apply_response_data_types"
                },
                "example": {
                  "payment_transactions": [],
                  "loyalty_transactions": [
                    {
                      "id": 22989715,
                      "status_id": 1,
                      "amount": 100,
                      "type_id": 1,
                      "program_id": 12705,
                      "card_id": 0,
                      "salon_group_id": 145071,
                      "item_id": 5048371,
                      "item_type_id": 7,
                      "item_record_id": 0,
                      "goods_transaction_id": 96082477,
                      "is_discount": true,
                      "is_loyalty_withdraw": false,
                      "type": {
                        "id": 1,
                        "title": "Promotion discount"
                      }
                    }
                  ],
                  "kkm_transaction_details_container": {
                    "last_operation_type": 1,
                    "transactions": []
                  },
                  "items": [
                    {
                      "id": 96082477,
                      "item_id": 5048371,
                      "item_type_id": 7,
                      "record_id": 0,
                      "item_title": "test",
                      "amount": 1,
                      "first_cost": 1000,
                      "manual_cost": 1000,
                      "discount": 0,
                      "cost": 1000,
                      "master_id": 548042,
                      "good_id": 5048371,
                      "service_id": 0,
                      "event_id": 0,
                      "is_service": false,
                      "is_event": false,
                      "is_good": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/company/{location_id}/salary/calculation/staff/daily/{team_member_id}": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Receipt of mutual settlements of a team member grouped by date",
        "description": "The method allows location owner to get mutual settlements of a team member grouped by date.",
        "operationId": "search_team_member_calculation_daily_salary",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_calculation_daily"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "payroll_daily": [
                      {
                        "date": "2026-03-01",
                        "payroll_sum": {
                          "income": 0,
                          "expense": 0,
                          "balance": 240746.48
                        }
                      }
                    ],
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/calculation/staff/{team_member_id}": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Receipt of mutual settlements of a team member",
        "description": "The method allows location owner to get mutual settlements of a team member.",
        "operationId": "search_team_member_calculation_salary",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_calculation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "total_sum": {
                      "income": 0,
                      "expense": 0,
                      "balance": 240746.48
                    },
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/calculation/staff/{team_member_id}/salary_schemes_count": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Obtaining payroll schemes count for a team member",
        "description": "The method allows you to get salary calculation schemes count for a team member before trying to obtain calculation data.",
        "operationId": "get_team_member_calculation_schemes_count",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_schemes_count"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "staff_id": 1112684,
                    "salary_schemes_count": 2
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/payroll/staff/{team_member_id}/calculation": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Search payroll calculations of a team member",
        "description": "The method allows location owner to search payroll calculations for the period for a team member.",
        "operationId": "search_team_member_payroll_calculation",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/salary_staff_calculation"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 123,
                      "company_id": 456,
                      "staff_id": 789,
                      "amount": 1000,
                      "status": "confirmed",
                      "date_create": "2026-03-03",
                      "date_from": "2026-03-01",
                      "date_to": "2026-03-02",
                      "comment": "Calculation per day"
                    }
                  ],
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/payroll/staff/{team_member_id}/calculation/{calculation_id}": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Get payroll calculation details of a team member",
        "description": "The method allows location owner to get details of a specific payroll calculation.",
        "operationId": "get_team_member_payroll_calculation",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/calculation_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_payroll_calculation_container"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 123,
                    "company_id": 456,
                    "staff_id": 789,
                    "amount": 1000,
                    "status": "confirmed",
                    "date_create": "2026-03-03",
                    "date_from": "2026-03-01",
                    "date_to": "2026-03-02",
                    "comment": "Calculation per day",
                    "salary_items": [
                      {
                        "date": "2026-03-01",
                        "time": "12:00",
                        "item_id": 123,
                        "item_type_slug": "record",
                        "salary_sum": 10,
                        "record_id": 123,
                        "client_id": 456,
                        "cost": 1000,
                        "paid": {
                          "money_sum": 900,
                          "discount_sum": 30,
                          "bonus_sum": 70,
                          "certificate_sum": 0,
                          "abonement_sum": 0,
                          "deposit_sum": 0
                        },
                        "salary_calculation_info": {
                          "criteria_title": "Applied calculation criterium",
                          "param_title": "Applied calculation parameter",
                          "scheme_title": "Applied calculation scheme"
                        },
                        "targets": [
                          {
                            "target_type_slug": "service",
                            "target_id": 321,
                            "title": "Cuttings",
                            "cost": 1000,
                            "net_cost": 500,
                            "salary_sum": 10,
                            "salary_promotion_sum": 1,
                            "salary_calculation": {
                              "type_slug": "percent",
                              "value": 1.5,
                              "description": "1.5% of cost"
                            }
                          }
                        ],
                        "salary_discrepancy": {
                          "reason": "updated_rule",
                          "actual_sum": 15,
                          "difference_sum": 5
                        }
                      }
                    ],
                    "currency": {
                      "id": 2,
                      "iso": "USD",
                      "name": "US Dollar",
                      "symbol": "$",
                      "is_symbol_after_amount": false
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/period/staff/daily/{team_member_id}": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Getting payroll for a period for a team member grouped by date",
        "description": "The method allows location owner to get the calculation for the period for a team member grouped by date.",
        "operationId": "search_team_member_period_daily_salary",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_period_daily"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "period_calculation_daily": [
                      {
                        "date": "2026-03-01",
                        "period_calculation": {
                          "working_days_count": 32,
                          "working_hours_count": 353,
                          "group_services_count": 3,
                          "services_count": 0,
                          "services_sum": 0,
                          "goods_sales_count": 0,
                          "goods_sales_sum": 0,
                          "total_sum": 0,
                          "salary": 70600
                        }
                      }
                    ],
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": {
                    "count": 1
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/period/staff/{team_member_id}": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Getting payroll for a period for a team member",
        "description": "The method allows location owner to get the calculation for the period for a team member.",
        "operationId": "search_team_member_period_salary",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_calculation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "working_days_count": 32,
                    "working_hours_count": 353,
                    "group_services_count": 3,
                    "services_count": 0,
                    "services_sum": 0,
                    "goods_sales_count": 0,
                    "goods_sales_sum": 0,
                    "total_sum": 0,
                    "salary": 70600,
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/staff/{team_member_id}/calculation": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Get Mutual Settlements for a Specific Team Member",
        "description": "The method allows you to get mutual settlements of a specific team member. In the user's access rights, the checkbox \"Access to payroll only for a specific team member\" must be specified.",
        "operationId": "get_team_member_salary_calculation",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_calculation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "total_sum": {
                      "income": 0,
                      "expense": 0,
                      "balance": 240746.48
                    },
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/staff/{team_member_id}/period": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Get Payroll for a Specific Team Member for a Given Period",
        "description": "The method allows you to get the calculation for the period for a specific team member.\nIn the user's access rights, the checkbox \"Access to payroll only for a specific team member\" must be checked.",
        "operationId": "get_team_member_salary_period",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          },
          {
            "$ref": "#/components/parameters/date_from"
          },
          {
            "$ref": "#/components/parameters/date_to"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "$ref": "#/components/schemas/salary_staff_period"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_empty_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "working_days_count": 32,
                    "working_hours_count": 353,
                    "group_services_count": 3,
                    "services_count": 0,
                    "services_sum": 0,
                    "goods_sales_count": 0,
                    "goods_sales_sum": 0,
                    "total_sum": 0,
                    "salary": 70600,
                    "currency": {
                      "symbol": "$"
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/422_unprocessable_entity_response"
                }
              }
            }
          }
        }
      }
    },
    "/company/{location_id}/salary/staff/{team_member_id}/salary_schemes": {
      "get": {
        "tags": [
          "Salary"
        ],
        "summary": "Obtaining own payroll schemes for a specific team member",
        "description": "The method allows you to get own salary calculation schemes for a specific team member.\nIn the user's access rights, the checkbox \"Access to payroll only for a specific team member\" must be specified.",
        "operationId": "get_team_member_salary_schemes",
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/content_type_header"
          },
          {
            "$ref": "#/components/parameters/company_id"
          },
          {
            "$ref": "#/components/parameters/staff_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "$ref": "#/components/schemas/response_success_true_object"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/salary_staff_scheme"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/response_meta_count_object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "staff_id": 1112684,
                      "date_start": "2026-09-21T23:00:00.000-05:00",
                      "date_end": "2026-09-21T23:00:00.000-05:00",
                      "salary_scheme": {
                        "id": 28681,
                        "title": "Service 20%"
                      }
                    },
                    {
                      "staff_id": 1112684,
                      "date_start": "2026-09-21T23:00:00.000-05:00",
                      "salary_scheme": {
                        "id": 28680,
                        "title": "Service 30%"
                      }
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/notification_settings/{location_id}/notification_types": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get notification settings in a location",
        "operationId": "get_location_notification_settings",
        "description": "The method allows you to get notification settings in a location.",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, USer user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notification_settings_notification_types_data_type"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "type": "record_create_online_staff",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 1
                      }
                    },
                    {
                      "type": "record_move_admin",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 0
                      }
                    },
                    {
                      "type": "license_expire",
                      "channels": {
                        "push": 1,
                        "sms": 1,
                        "email": 1
                      }
                    },
                    {
                      "type": "record_create_offline_admin",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 1
                      }
                    },
                    {
                      "type": "record_create_offline_staff",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 0
                      }
                    },
                    {
                      "type": "record_create_online_admin",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 1
                      }
                    },
                    {
                      "type": "record_delete_admin",
                      "channels": {
                        "push": 0,
                        "sms": 0,
                        "email": 1
                      }
                    },
                    {
                      "type": "record_delete_staff",
                      "channels": {
                        "push": 1,
                        "sms": 0,
                        "email": 0
                      }
                    },
                    {
                      "type": "record_move_staff",
                      "channels": {
                        "push": 0,
                        "sms": 0,
                        "email": 0
                      }
                    }
                  ],
                  "meta": {
                    "count": 9
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/notification_settings/{location_id}/users/{user_id}": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get User Notification Settings",
        "operationId": "get_user_notification_settings",
        "description": "The method allows you to get notification settings for a particular location user.",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notification_settings_users_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "mode": "staff",
                    "notification_types": [
                      {
                        "type": "record_create_online_staff",
                        "channels": {
                          "push": 1,
                          "sms": 0,
                          "email": 1
                        }
                      },
                      {
                        "type": "record_create_offline_staff",
                        "channels": {
                          "push": 1,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "record_delete_staff",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "record_move_staff",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "license_expire",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Notifications"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Change User Push Notification Settings",
        "operationId": "update_user_notification_settings",
        "description": "The method allows you to change the user's PUSH notification settings.\nThe type of notification to be changed (record_create_online_staff or record_create_online_admin, etc.) should be selected based on the type of notification specified by the user (mode: admin or mode: team_member). Note: 'staff' in notification type names is a legacy term for team member.",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer bearer_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/notification_settings_users_request_data_type"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notification_settings_users_data_type"
                },
                "example": {
                  "success": true,
                  "data": {
                    "mode": "staff",
                    "notification_types": [
                      {
                        "type": "record_create_online_staff",
                        "channels": {
                          "push": 1,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "record_create_offline_staff",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "record_delete_staff",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "record_move_staff",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      },
                      {
                        "type": "license_expire",
                        "channels": {
                          "push": 0,
                          "sms": 0,
                          "email": 0
                        }
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/custom_fields/{field_category}/{location_id}": {
      "get": {
        "tags": [
          "Custom Fields"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Getting a collection of location fields",
        "operationId": "get_custom_field_list",
        "parameters": [
          {
            "name": "field_category",
            "in": "path",
            "description": "Field category.<br>\n\n- For appointments - appointment\n\n- For clients - client <br>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "record"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "salon_id": 1,
                      "custom_field": {
                        "id": 1,
                        "code": "my_text_field",
                        "show_in_ui": true,
                        "title": "test field",
                        "user_can_edit": true,
                        "type": {
                          "code": "text",
                          "title": "Text"
                        }
                      }
                    }
                  ],
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Custom Fields"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Adding a Custom Field",
        "description": "To add a field, the user must be part of the **Chain associated with the location** and have the appropriate access rights in the following section: <br>**Settings → Access → Custom Fields → Create custom fields**",
        "operationId": "create_custom_field",
        "parameters": [
          {
            "name": "field_category",
            "in": "path",
            "description": "Field category.<br>\n\n- For appointments - appointment\n\n- For clients - client <br>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "record"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/custom_fields_request_data_type"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "salon_id": 1,
                    "custom_field": {
                      "id": 1,
                      "code": "my_text_field",
                      "show_in_ui": true,
                      "title": "test field",
                      "user_can_edit": true,
                      "type": {
                        "code": "text",
                        "title": "Text"
                      }
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/custom_fields/{field_category}/{location_id}/{field_id}": {
      "put": {
        "tags": [
          "Custom Fields"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update a Custom Field",
        "description": "To update a field, the user must be part of the **Chain associated with the location** and have the appropriate access rights in the following section <br>**Settings → Access → Custom Fields → Modify custom fields**",
        "operationId": "update_custom_field",
        "parameters": [
          {
            "name": "field_category",
            "in": "path",
            "description": "Field category.<br>\n\n- For appointments - appointment\n\n- For clients - client <br>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "record"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "field_id",
            "in": "path",
            "description": "field ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/custom_fields_request_data_type"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Saved"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Not enough access rights"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Not found"
                  }
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Custom Fields"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Remove a Custom Field from a Location",
        "description": "To remove a field, the user must be part of the **Chain associated with the location** and have the appropriate access rights in the following section: <br>**Settings → Access → Custom Fields → Remove custom fields**",
        "operationId": "delete_custom_field",
        "parameters": [
          {
            "name": "field_category",
            "in": "path",
            "description": "Field category.<br>\n\n- For appointments - appointment\n\n- For clients - client <br>",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "record"
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "field_id",
            "in": "path",
            "description": "field ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Deleted"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Not enough access rights"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/custom_fields_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": null,
                  "meta": {
                    "message": "Not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/groups": {
      "get": {
        "tags": [
          "Chain Management"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Obtaining chains available to the user",
        "description": "The location chain object has the following fields:\n\n| Field | Type | Description |\n| ------------- | ------------- | ------------- |\n| id | number | Location chain ID |\n| title | string | Location chain name |\n| locations | array | List of chain locations |\n| access | object | Object with access rights for chain management |",
        "operationId": "get_chain_list",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 509,
                      "title": "Chain of locations in New York",
                      "companies": [
                        {
                          "id": 38726,
                          "title": "Location in New York"
                        },
                        {
                          "id": 39287,
                          "title": "Location in New York"
                        }
                      ],
                      "access": {
                        "settings_access": "1",
                        "clients_access": "1",
                        "users_access": "1",
                        "loyalty_access": "1",
                        "loyalty_cards_manual_transactions_access": "1",
                        "chain_services_access": "1"
                      }
                    },
                    {
                      "id": 508,
                      "title": "Chain of locations in New York",
                      "companies": [
                        {
                          "id": 38545,
                          "title": "Location in New York"
                        },
                        {
                          "id": 38704,
                          "title": "Location in New York"
                        }
                      ],
                      "access": {
                        "settings_access": "1",
                        "clients_access": "1",
                        "users_access": "1",
                        "loyalty_access": "1",
                        "loyalty_cards_manual_transactions_access": "1",
                        "chain_services_access": "1"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/group/{chain_id}/clients": {
      "get": {
        "tags": [
          "Chain Management"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a chain client by phone number.",
        "description": "+ Parameter\r\n    + group_id (required, number, `43877`) - ID of the location chain\r\n\r\n\r\n#### Client filtering\r\n+ phone:'+13155550175' (optional, string) - Phone to filter clients",
        "operationId": "get_chain_client_by_phone_number",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Phone to filter clients, required parameter",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "14264037640"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token.User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/group_groupid_clients_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": {
                    "salon_group_id": 312,
                    "phone": "+13155550175",
                    "clients": [
                      {
                        "id": 4240880,
                        "company_id": 4564,
                        "name": "lx",
                        "email": "client@example.com"
                      },
                      {
                        "id": 4243272,
                        "company_id": 24697,
                        "name": "lx",
                        "email": "client@example.com"
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/group_groupid_clients_response_data_types400"
                },
                "example": {
                  "success": false,
                  "meta": {
                    "message": "Client not found"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/programs": {
      "post": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create a Chain Promotion",
        "operationId": "create_chain_loyalty_program",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional resources in the answer",
            "schema": {
              "type": "string",
              "enum": [
                "applicable_items",
                "rules",
                "companies",
                "loyalty_card_types",
                "on_changed_notification_template",
                "on_expiration_notification_template"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/loyalty_program_create_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_program"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/chain/{chain_id}/loyalty/programs/{loyalty_program_id}": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a Chain Promotion",
        "operationId": "get_chain_loyalty_program",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional resources in the answer",
            "schema": {
              "type": "string",
              "enum": [
                "applicable_items",
                "rules",
                "companies",
                "loyalty_card_types",
                "on_changed_notification_template",
                "on_expiration_notification_template"
              ]
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_program"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404_not_found"
          }
        }
      },
      "put": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Edit Chain Promotion",
        "operationId": "update_chain_loyalty_program",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional resources in the answer",
            "schema": {
              "type": "string",
              "enum": [
                "applicable_items",
                "rules",
                "companies",
                "loyalty_card_types",
                "on_changed_notification_template",
                "on_expiration_notification_template"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/loyalty_program_update_request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_program"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        },
        "x-codegen-request-body-name": "body"
      },
      "delete": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Chain Promotion",
        "operationId": "delete_chain_loyalty_program",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "loyalty_program_id",
            "in": "path",
            "description": "Promotion ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include",
            "in": "query",
            "description": "Include additional resources in the answer",
            "schema": {
              "type": "string",
              "enum": [
                "applicable_items",
                "rules",
                "companies",
                "loyalty_card_types",
                "on_changed_notification_template",
                "on_expiration_notification_template"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content"
          },
          "401": {
            "$ref": "#/components/responses/401_unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/403_forbidden"
          },
          "404": {
            "$ref": "#/components/responses/404_not_found"
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/transactions": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a List of Chain Loyalty Transactions",
        "operationId": "get_chain_loyalty_transaction_list",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Sample start date in Y-m-d format",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "description": "Sample end date in Y-m-d format",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "types",
            "in": "query",
            "description": "Types of loyalty transactions included in the selection: 1 - Promotion discount, 2 - Loyalty program accrual, 3 - Loyalty card withdrawal, 4 - Referral program accrual, 5 - Manual replenishment, 6 - Manual withdrawal, 7 - Overdue points withdrawal , 8 - Withdrawal from the gift card, 9 - Use of the membership, 10 - Recalculation of the cost of the membership, 11 - Withdrawal from the client account",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "1",
                  "2",
                  "3",
                  "4",
                  "5",
                  "6",
                  "7",
                  "8",
                  "9",
                  "10",
                  "11"
                ]
              }
            }
          },
          {
            "name": "company_ids",
            "in": "query",
            "description": "Loyalty transaction affiliate IDs included in the sample",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "name": "visit_ids",
            "in": "query",
            "description": "Loyalty transaction visit IDs included in the sample",
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Selection page",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Number of results per selection page",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loyalty_transaction"
                }
              }
            }
          },
          "422": {
            "description": "Validation error"
          }
        }
      }
    },
    "/chain/{chain_id}/loyalty/notification_message_templates/programs": {
      "get": {
        "tags": [
          "Chain Loyalty Programs"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get a list of loyalty notification templates",
        "operationId": "get_chain_loyalty_notification_template_list",
        "parameters": [
          {
            "name": "chain_id",
            "in": "path",
            "description": "Chain ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/loyalty_notification_message_template"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/integration/kkm/references/tax_system/{country_id}": {
      "get": {
        "tags": [
          "Fiscalization"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List request example",
        "description": "A list of **tax systems** and **VAT** available for a country can be obtained by requesting the country ID for which the list is to be obtained.\r\nThe country ID can be obtained from [list of countries](#countries).\r\n\r\nThe list is an array of [tax systems](#fiscalization-tax) with a nested [VAT](#fiscalization-vat) array for each tax system.\r\n\r\n**The taxation system** has the following structure:\r\n\r\n| Field | Type | Description |\r\n| -----------------| ---------------- | ----------------------- |\r\n| title | string | Name of taxation system |\r\n| slug | string | Code name for the taxation system |\r\n| vats | Array of objects([Vat](#fiscalization-vat)[]) | List of available VAT for the taxation system |\r\n\r\n<a name=\"fiscalization-vat\"></a>\r\n**VAT** has the following structure:\r\n\r\n| Field | Type | Description |\r\n| -----------------| ---------------- | ----------------------- |\r\n| title | string | Title VAT |\r\n| slug | string | Code name VAT |",
        "operationId": "get_tax_system_list",
        "parameters": [
          {
            "name": "country_id",
            "in": "path",
            "description": "Country ID",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 1
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tax_system_response_data__types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "title": "General DOS",
                      "slug": "ru_osn",
                      "vats": [
                        {
                          "title": "0%",
                          "slug": "ru_vat_0"
                        },
                        {
                          "title": "10%",
                          "slug": "ru_vat_10"
                        },
                        {
                          "title": "20%",
                          "slug": "ru_vat_20"
                        },
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    },
                    {
                      "title": "Simplified simplified tax system (Income)",
                      "slug": "ru_usn",
                      "vats": [
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    },
                    {
                      "title": "Simplified simplified tax system (Income minus Expense)",
                      "slug": "ru_usnr",
                      "vats": [
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    },
                    {
                      "title": "Single tax on imputed income UTII",
                      "slug": "ru_envd",
                      "vats": [
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    },
                    {
                      "title": "Unified agricultural tax UST",
                      "slug": "ru_esn",
                      "vats": [
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    },
                    {
                      "title": "Patent taxation system",
                      "slug": "ru_psn",
                      "vats": [
                        {
                          "title": "is not a subject to a tax",
                          "slug": "ru_vat_none"
                        }
                      ]
                    }
                  ],
                  "meta": {
                    "count": 6
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/integration/kkm/callback": {
      "post": {
        "tags": [
          "Fiscalization"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Example of a request in case of successful fiscalization or in case of an error",
        "operationId": "handle_fiscalization_callback",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Conetnt-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/https://your-api.url": {
      "post": {
        "tags": [
          "Fiscalization"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Example of a request for fiscalization of a document",
        "operationId": "fiscalize_document",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/fiscalization_request_data_types"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "id": "d72fece5-6825-4895-9395-0133195612a4",
                  "status": "success",
                  "code": 0,
                  "message": "OK"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    },
    "/license/{location_id}": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Retrieve location subscription information",
        "operationId": "get_location_subscription_information",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "active",
                    "deactivation_date",
                    "id",
                    "is_paid_rights_model",
                    "name",
                    "options",
                    "salon_id",
                    "staff_limit",
                    "start_date"
                  ],
                  "type": "object",
                  "properties": {
                    "LicenseOption": {
                      "$ref": "#/components/schemas/license_option"
                    },
                    "active": {
                      "type": "number",
                      "description": "Is the subscription active"
                    },
                    "deactivation_date": {
                      "type": "string",
                      "description": "Subscription expiration date"
                    },
                    "id": {
                      "type": "number",
                      "description": "Subscription ID"
                    },
                    "name": {
                      "type": "string",
                      "description": "Subscription name"
                    },
                    "options": {
                      "type": "array",
                      "description": "Subscription options",
                      "items": {
                        "type": "object"
                      }
                    },
                    "salon_id": {
                      "type": "number",
                      "description": "location ID"
                    },
                    "staff_limit": {
                      "type": "number",
                      "description": "team member limit"
                    },
                    "is_paid_rights_model": {
                      "type": "boolean",
                      "description": "Whether the location uses paid rights licensing model"
                    },
                    "start_date": {
                      "type": "string",
                      "description": "Subscription start date"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": 1,
                    "salon_id": 4523464,
                    "staff_limit": 5,
                    "deactivation_date": "08.11.2019",
                    "start_date": "07.05.2025",
                    "name": "Start",
                    "active": 1,
                    "is_paid_rights_model": false,
                    "options": [
                      {
                        "id": 3,
                        "title": "Online payment"
                      }
                    ]
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/validation/validate_phone/{phone}": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Phone number format check",
        "description": "The transferred phone number is checked for compliance with Altegio rules.",
        "operationId": "phone_number_format_check",
        "parameters": [
          {
            "name": "phone",
            "in": "path",
            "description": "Checked phone number",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "data": {
                    "is_valid": true
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/images/{entity}": {
      "post": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Image upload",
        "description": "The response object has the following fields:\n\n| Field | Type | Description |\n| ------------- | ------------- | ------------- |\n| image_binded | boolean | Status of linking images to an entity |\n| image_group | object | Image group object |",
        "operationId": "upload_image",
        "parameters": [
          {
            "name": "entity",
            "in": "path",
            "description": "entity name (team_member for team members, service for services)",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "\"master\""
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "form-data",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "image"
                ],
                "properties": {
                  "company_id": {
                    "type": "number",
                    "description": "Location ID for image binding (for entity=service)"
                  },
                  "service_id": {
                    "type": "number",
                    "description": "Service ID for image binding (for entity=service)"
                  },
                  "master_id": {
                    "type": "number",
                    "description": "team member ID for image binding (for entity=team_member)"
                  },
                  "image": {
                    "type": "string",
                    "description": "transferred image (image/jpeg, image/png)"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "image_group"
                  ],
                  "type": "object",
                  "properties": {
                    "ImageGroup": {
                      "$ref": "#/components/schemas/image_group"
                    },
                    "image_group": {
                      "$ref": "#/components/schemas/image_group"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "image_binded": false,
                    "image_group ": {
                      "id": 72256,
                      "entity": "",
                      "entity_id": 0,
                      "images": {
                        "basic": {
                          "id": 186826,
                          "path": "https://app.alteg.io/uploads/setting_service_image/c/cf/cf01a5585348731_20170328195919.jpeg",
                          "width": "373",
                          "height": "280",
                          "type": "jpeg",
                          "image_group_id": 72256,
                          "version": "basic"
                        }
                      }
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Deleting images",
        "description": "The response object has the following fields:\n\n| Field | Type | Description |\n| ------------- | ------------- | ------------- |\n| success | boolean | Deletion result |",
        "operationId": "delete_image",
        "parameters": [
          {
            "name": "Accept",
            "in": "header",
            "description": "e.g. application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "application/vnd.api.v2+json"
          },
          {
            "name": "entity",
            "in": "path",
            "description": "entity name (team_member for team members, service for services)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "form-data",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "image_group_id"
                ],
                "properties": {
                  "image_group_id": {
                    "type": "number",
                    "description": "Image group ID to delete"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/tips/{location_id}/settings": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Get a list of location team members with their tip settings",
        "operationId": "get_team_member_tip_settings",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection of objects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tips_setting_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 3120,
                      "location_id": 4564,
                      "staff_id": 1071804,
                      "hash": "1a27116c-726d-4cec-a7dd-7bd6d669a8c1",
                      "status": 1,
                      "status_title": "new settings",
                      "is_enabled": false,
                      "landing_external": "https://app.alteg.io/tips/external/4564/1a27116c-726d-4cec-a7dd-7bd6d669a8c1/",
                      "staff": {
                        "id": 1071804,
                        "name": "Testimonials Location Business Example",
                        "specialization": "Reviews"
                      }
                    },
                    {
                      "id": 1,
                      "location_id": 4564,
                      "staff_id": 37695,
                      "hash": "abf52f53-e94c-41e8-9f76-93485fd76e5e",
                      "status": 1,
                      "status_title": "new settings",
                      "is_enabled": false,
                      "landing_external": "https://app.alteg.io/tips/external/4564/abf52f53-e94c-41e8-9f76-93485fd76e5e/",
                      "staff": {
                        "id": 37695,
                        "name": "Kim Kardashian",
                        "specialization": "Cosmetologist-makeup artist",
                        "user": {
                          "id": 746310,
                          "name": "James Smith",
                          "email": "j.smith@example.com",
                          "phone": "+13155550175"
                        },
                        "position": {
                          "id": 452,
                          "title": "Masseur"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/tips/{location_id}/settings/{master_tips_settings_id}/disable": {
      "post": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Disable Tips for the team member",
        "operationId": "disable_team_member_tips",
        "parameters": [
          {
            "name": "location_id",
            "in": "path",
            "description": "location id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "master_tips_settings_id",
            "in": "path",
            "description": "tip settings id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tip settings object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tips_setting_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "location_id": 253859,
                      "staff_id": 742418,
                      "hash": "ba816199-eecf-4bd2-9f1d-db470545bfaf",
                      "status": 3,
                      "status_title": "pending account",
                      "is_enabled": true,
                      "landing_external": "https://app.alteg.io/tips/external/253859/ba816199-eecf-4bd2-9f1d-db470545bfaf/",
                      "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/742418/tips/pay/",
                      "invite_sms_sent": false,
                      "staff": {
                        "id": 742418,
                        "name": "Fusa",
                        "specialization": "team member",
                        "avatar": "https://assets.alteg.io/masters/sm/c/c7/c77a4bf2b6b3896_20210304004333.png",
                        "employee": {
                          "id": 733043,
                          "phone": "+13155550175"
                        },
                        "user": {
                          "id": 1553930,
                          "name": "James Smith",
                          "email": "j.smith@example.com",
                          "phone": "+13155550186"
                        },
                        "position": {
                          "id": 103883,
                          "title": "Yogist"
                        }
                      }
                    },
                    {
                      "id": 152763,
                      "location_id": 253859,
                      "staff_id": 743018,
                      "hash": "b7c81cab-290a-4b0a-ad05-9c4b98ef3565",
                      "status": 4,
                      "status_title": "everything is set",
                      "is_enabled": true,
                      "landing_external": "https://app.alteg.io/tips/external/253859/b7c81cab-290a-4b0a-ad05-9c4b98ef3565/",
                      "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/743018/tips/pay/",
                      "invite_sms_sent": false,
                      "staff": {
                        "id": 743018,
                        "name": "Natasha M",
                        "specialization": "manicurist",
                        "avatar": "https://api.alteg.io/images/no-master-sm.png",
                        "employee": {
                          "id": 733547,
                          "phone": "+13155550175"
                        },
                        "user": {
                          "id": 6259059,
                          "name": "Alice Smith",
                          "email": "a.smith@example.com",
                          "phone": "+13155550175"
                        },
                        "position": {
                          "id": 103731,
                          "title": "Manicurist"
                        }
                      }
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    },
    "/tips/{location_id}/settings/{master_tips_settings_id}/enable": {
      "get": {
        "tags": [
          "Utilities"
        ],
        "security": [
          {
            "BearerPartner": []
          }
        ],
        "summary": "Enable Tips for the team member",
        "operationId": "enable_team_member_tips",
        "parameters": [
          {
            "name": "master_tips_settings_id",
            "in": "path",
            "description": "tip settings id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "location_id",
            "in": "path",
            "description": "location ID",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "application/vnd.api.v2+json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer partner_token, User user_token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tip settings object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tips_setting_response_data_types"
                },
                "example": {
                  "success": true,
                  "data": [
                    {
                      "id": 1,
                      "location_id": 253859,
                      "staff_id": 742418,
                      "hash": "ba816199-eecf-4bd2-9f1d-db470545bfaf",
                      "status": 3,
                      "status_title": "pending account",
                      "is_enabled": true,
                      "landing_external": "https://app.alteg.io/tips/external/253859/ba816199-eecf-4bd2-9f1d-db470545bfaf/",
                      "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/742418/tips/pay/",
                      "invite_sms_sent": false,
                      "staff": {
                        "id": 742418,
                        "name": "Fusa",
                        "specialization": "team member",
                        "avatar": "https://assets.alteg.io/masters/sm/c/c7/c77a4bf2b6b3896_20210304004333.png",
                        "employee": {
                          "id": 733043,
                          "phone": "+13155550175"
                        },
                        "user": {
                          "id": 1553930,
                          "name": "James Smith",
                          "email": "j.smith@example.com",
                          "phone": "+13155550175"
                        },
                        "position": {
                          "id": 103883,
                          "title": "Yogist"
                        }
                      }
                    },
                    {
                      "id": 152763,
                      "location_id": 253859,
                      "staff_id": 743018,
                      "hash": "b7c81cab-290a-4b0a-ad05-9c4b98ef3565",
                      "status": 4,
                      "status_title": "everything is set",
                      "is_enabled": true,
                      "landing_external": "https://app.alteg.io/tips/external/253859/b7c81cab-290a-4b0a-ad05-9c4b98ef3565/",
                      "master_tips_form_link": "https://app.alteg.io/companies/253859/staff/743018/tips/pay/",
                      "invite_sms_sent": false,
                      "staff": {
                        "id": 743018,
                        "name": "Natasha M",
                        "specialization": "manicurist",
                        "avatar": "https://api.alteg.io/images/no-master-sm.png",
                        "employee": {
                          "id": 733547,
                          "phone": "+13155550175"
                        },
                        "user": {
                          "id": 6259059,
                          "name": "Alice Smith",
                          "email": "a.smith@example.com",
                          "phone": "+13155550175"
                        },
                        "position": {
                          "id": 103731,
                          "title": "Manicurist"
                        }
                      }
                    }
                  ],
                  "meta": {
                    "count": 2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/401_unauthorized_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/403_forbidden_response"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/404_not_found_response"
                }
              }
            }
          }
        }
      }
    }
  }
}