{
  "openapi": "3.1.1",
  "info": {
    "title": "Business Management",
    "version": "2.0.0",
    "termsOfService": "https://alteg.io/en/info/terms/",
    "license": {
      "name": "Altegio API Agreement",
      "url": "/en/api-license-agreement"
    },
    "description": "Next-generation B2B API with improved design and consistency.\n\n**Base URL:** `https://api.alteg.io/api/v2`\n\n## Status\n\nThis API is in active development. New features and improvements are released here first.\nWe recommend using this API for all new integrations.\n\n## Authentication\n\nRequires both partner and Business User authorization:\n```\nAuthorization: Bearer <partner_token>, User <user_token>\n```\n\n## Required Media Type\n\nEvery request must include:\n```\nAccept: application/vnd.api.v2+json\n```\n\nRequests without the v2 media type return `400`. A charset parameter is accepted.\n\n## URL Patterns\n\nLocation-scoped resources use `/locations/{location_id}/...`.\n\nPositions and Tags preserve the literal `company_id` path parameter name for\nSDK compatibility, but its value is the Location identifier. The legacy\n`/companies/{company_id}/positions` and `/companies/{company_id}/tags` paths\nremain accepted as compatibility aliases.\n"
  },
  "servers": [
    {
      "url": "https://api.alteg.io/api/v2",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerPartnerUser": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Bearer {PartnerToken}, User {UserToken}"
      }
    },
    "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"
      }
    },
    "schemas": {
      "resourceIdentifier": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "toManyRelationship": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/resourceIdentifier"
            }
          }
        }
      },
      "toOneRelationship": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/resourceIdentifier"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "service_resource": {
        "title": "Service Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "service",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Service ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "category_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Service name"
              },
              "category_id": {
                "type": "integer",
                "description": "Service Category ID"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "resources": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "service_composite": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "resource_links": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "company_links": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "trial_settings": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        },
        "$defs": {
          "resourceIdentifier": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "type",
              "id"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            }
          },
          "toManyRelationship": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/resourceIdentifier"
                }
              }
            }
          },
          "toOneRelationship": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "data"
            ],
            "properties": {
              "data": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/resourceIdentifier"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "includedResource": {
            "type": "object",
            "required": [
              "type",
              "id",
              "attributes"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "attributes": {
                "type": "object"
              },
              "relationships": {
                "type": "object"
              }
            }
          }
        }
      },
      "includedResource": {
        "type": "object",
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "attributes": {
            "type": "object"
          },
          "relationships": {
            "type": "object"
          }
        }
      },
      "error_response": {
        "title": "B2B v2 Error Response",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "success",
          "data",
          "meta"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "data": {
            "type": "null"
          },
          "meta": {
            "type": "object",
            "required": [
              "message"
            ],
            "additionalProperties": true,
            "properties": {
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "object",
                "description": "Field-level validation errors, when applicable",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "service_category_resource": {
        "title": "Service Category Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "service_category",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Service Category ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "salon_service_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Service Category name"
              },
              "salon_service_id": {
                "type": "integer",
                "description": "Location-specific Service Category link ID"
              }
            }
          }
        }
      },
      "attendance_service_resource": {
        "title": "Attendance Service Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "attendance_service",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Compound Attendance Service identifier"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "company_id",
              "service_id",
              "category_id",
              "is_composite",
              "composite_service_id",
              "salon_service_id",
              "composite_position",
              "staff_id",
              "title",
              "length",
              "duration",
              "price_min",
              "price_max",
              "technical_break_duration"
            ],
            "properties": {
              "company_id": {
                "type": "integer",
                "description": "Location ID"
              },
              "service_id": {
                "type": "integer",
                "description": "Service ID"
              },
              "category_id": {
                "type": "integer",
                "description": "Service Category ID"
              },
              "is_composite": {
                "type": "boolean",
                "description": "Whether the Service is composite"
              },
              "composite_service_id": {
                "type": "integer",
                "description": "Parent composite Service ID, or `0`"
              },
              "salon_service_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Location-specific Service link ID"
              },
              "composite_position": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Position within a composite Service"
              },
              "staff_id": {
                "type": "integer",
                "description": "Team Member ID, or `0` when not Team Member-specific"
              },
              "title": {
                "type": "string",
                "description": "Service name"
              },
              "length": {
                "type": "integer",
                "minimum": 0,
                "deprecated": true,
                "description": "Deprecated duration in seconds; use `duration`"
              },
              "duration": {
                "type": "integer",
                "minimum": 0,
                "description": "Service duration in seconds"
              },
              "price_min": {
                "type": "number",
                "description": "Minimum Service price"
              },
              "price_max": {
                "type": "number",
                "description": "Maximum Service price"
              },
              "technical_break_duration": {
                "type": "integer",
                "minimum": 0,
                "description": "Technical break duration in seconds"
              }
            }
          }
        }
      },
      "pagination": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "page",
          "offset",
          "limit"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250
          }
        }
      },
      "attendance_service_suggestion_resource": {
        "title": "Attendance Service Suggestion Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "attendance_service_suggestion",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Suggested Service ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "service_id",
              "suggestion_type",
              "record_id"
            ],
            "properties": {
              "service_id": {
                "type": "integer",
                "description": "Suggested Service ID"
              },
              "suggestion_type": {
                "type": "string",
                "enum": [
                  "last_client_visit_attendance_service",
                  "client_popular_service",
                  "master_popular_service"
                ],
                "description": "Suggestion reason. Enum values are literal wire values; `client`\nidentifies a Booking User and `master` identifies a Team Member.\n"
              },
              "record_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Source Appointment ID when the suggestion is based on a prior visit"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "attendance_service": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "record": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "unit_resource": {
        "title": "Product Unit Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "unit",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Product Unit ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "company_id",
              "title",
              "short_title"
            ],
            "properties": {
              "company_id": {
                "type": "integer",
                "minimum": 0,
                "description": "Location ID for a custom Unit; `0` for a shared system Unit"
              },
              "title": {
                "type": "string",
                "description": "Full Unit name"
              },
              "short_title": {
                "type": "string",
                "description": "Abbreviated Unit name"
              }
            }
          }
        }
      },
      "product_resource": {
        "title": "Product Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "good",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Product ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "category_id",
              "title",
              "sale_unit_id",
              "consumable_unit_id",
              "sale_unit_to_consumable_unit_ratio",
              "loyalty_abonement_type_id",
              "loyalty_certificate_type_id",
              "cost",
              "actual_cost",
              "is_chain"
            ],
            "properties": {
              "category_id": {
                "type": "integer",
                "description": "Product Category ID"
              },
              "title": {
                "type": "string",
                "description": "Product name"
              },
              "sale_unit_id": {
                "type": "integer",
                "description": "Sale Unit ID"
              },
              "consumable_unit_id": {
                "type": "integer",
                "description": "Consumable Unit ID"
              },
              "sale_unit_to_consumable_unit_ratio": {
                "type": "number",
                "description": "Number of Consumable Units in one Sale Unit"
              },
              "loyalty_abonement_type_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Membership type ID, when the Product represents a membership"
              },
              "loyalty_certificate_type_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Certificate type ID, when the Product represents a certificate"
              },
              "cost": {
                "type": "number",
                "description": "Product sale price"
              },
              "actual_cost": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Current Product cost when `actual_cost` is requested and the Business\nUser has permission to view it; otherwise `null`.\n"
              },
              "is_chain": {
                "type": "boolean",
                "description": "Whether the Product belongs to the Chain catalog"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "loyalty_abonement_type": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "loyalty_certificate_type": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "mark_settings": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "storage_amounts": {
                "$ref": "#/components/schemas/toManyRelationship"
              }
            }
          }
        }
      },
      "storage_amount_resource": {
        "title": "Product Storage Amount Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "good_storage_amount",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Composite Product and Storage ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "good_id",
              "storage_id",
              "sale_amount",
              "consumable_amount"
            ],
            "properties": {
              "good_id": {
                "type": "integer",
                "description": "Product ID"
              },
              "storage_id": {
                "type": "integer",
                "description": "Storage ID"
              },
              "sale_amount": {
                "type": "number",
                "description": "Available amount measured in Sale Units"
              },
              "consumable_amount": {
                "type": "number",
                "description": "Available amount measured in Consumable Units"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "storage": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "product_category_resource": {
        "title": "Product Category Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "good_category",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Product Category ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "is_chain",
              "parent_category_id"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Product Category name"
              },
              "is_chain": {
                "type": "boolean",
                "description": "Whether the Product Category belongs to the Chain catalog"
              },
              "parent_category_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Parent Product Category ID; `null` for a root category"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "child_categories": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "goods": {
                "$ref": "#/components/schemas/toManyRelationship"
              }
            }
          }
        }
      },
      "attendance_product_item_resource": {
        "title": "Appointment Product Item Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "attendance_good_item",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Appointment Product Item ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "record_id",
              "quantity",
              "unit_id",
              "sale_unit_id",
              "consumable_unit_id",
              "operation_unit_type",
              "operation_type_slug",
              "first_cost",
              "manual_cost",
              "cost_per_unit",
              "discount_percent",
              "cost",
              "master_id",
              "staff_id",
              "good_id",
              "storage_id"
            ],
            "properties": {
              "record_id": {
                "type": "integer",
                "description": "Appointment ID; `record_id` is the literal wire field"
              },
              "quantity": {
                "type": "number",
                "description": "Product quantity"
              },
              "unit_id": {
                "type": "integer",
                "description": "Operation Unit ID"
              },
              "sale_unit_id": {
                "type": "integer",
                "description": "Sale Unit ID"
              },
              "consumable_unit_id": {
                "type": "integer",
                "description": "Consumable Unit ID"
              },
              "operation_unit_type": {
                "type": [
                  "string",
                  "null"
                ],
                "deprecated": true,
                "description": "Deprecated wire field; use `operation_type_slug`"
              },
              "operation_type_slug": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Unit operation type"
              },
              "first_cost": {
                "type": "number",
                "description": "Product cost before Appointment item adjustments"
              },
              "manual_cost": {
                "type": "number",
                "description": "Manually specified Product cost"
              },
              "cost_per_unit": {
                "type": "number",
                "description": "Product cost per unit"
              },
              "discount_percent": {
                "type": "number",
                "description": "Applied discount percentage"
              },
              "cost": {
                "type": "number",
                "description": "Final Product cost"
              },
              "master_id": {
                "type": "integer",
                "deprecated": true,
                "description": "Deprecated Team Member ID wire alias; use `staff_id`"
              },
              "staff_id": {
                "type": "integer",
                "description": "Team Member ID"
              },
              "good_id": {
                "type": "integer",
                "description": "Product ID"
              },
              "storage_id": {
                "type": "integer",
                "description": "Storage ID"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "good": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "staff": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "storage_amount": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "loyalty_abonement": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "loyalty_certificate": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "marks": {
                "$ref": "#/components/schemas/toManyRelationship"
              }
            }
          }
        }
      },
      "team_member_resource": {
        "title": "Team Member Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "staff",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Team Member ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "tt_markup",
              "specialization",
              "image",
              "position_id",
              "is_available_as_assistant"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Team Member name"
              },
              "tt_markup": {
                "type": "integer",
                "description": "Schedule grid interval value"
              },
              "specialization": {
                "type": "string",
                "description": "Team Member specialization"
              },
              "image": {
                "type": "string",
                "description": "Team Member image URL"
              },
              "position_id": {
                "type": "integer",
                "description": "Position ID"
              },
              "is_available_as_assistant": {
                "type": "boolean",
                "description": "Whether the Team Member is available as an assistant"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "position": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "employee": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "position_resource": {
        "title": "Position Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "staff_position",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Position ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Position title"
              }
            }
          }
        }
      },
      "employment_profile_resource": {
        "title": "Employment Profile Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "employee",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Employment profile ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "phone",
              "name",
              "firstname",
              "surname",
              "patronymic",
              "date_admission",
              "date_registration_end",
              "citizenship",
              "gender",
              "passport_data",
              "personal_tax_reference_number",
              "number_insurance_certificates"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number"
              },
              "name": {
                "type": "string",
                "description": "Display name"
              },
              "firstname": {
                "type": "string",
                "description": "First name"
              },
              "surname": {
                "type": "string",
                "description": "Last name"
              },
              "patronymic": {
                "type": "string",
                "description": "Patronymic"
              },
              "date_admission": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
                "description": "Employment start date and time without a timezone"
              },
              "date_registration_end": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
                "description": "Registration end date and time without a timezone"
              },
              "citizenship": {
                "type": "string",
                "description": "Citizenship"
              },
              "gender": {
                "type": "integer",
                "enum": [
                  0,
                  1,
                  2
                ],
                "description": "Gender wire value: `0` unspecified, `1` male, `2` female"
              },
              "passport_data": {
                "type": "string",
                "description": "Passport data"
              },
              "personal_tax_reference_number": {
                "type": "string",
                "description": "Personal tax reference number"
              },
              "number_insurance_certificates": {
                "type": "string",
                "description": "Insurance certificate number"
              }
            }
          }
        }
      },
      "team_member_position_resource": {
        "title": "Position Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "position",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Position ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "chain_id",
              "title",
              "description",
              "services_binding_type",
              "rules_required_fields",
              "only_chain_appointment",
              "salon_ids"
            ],
            "properties": {
              "chain_id": {
                "type": "integer",
                "description": "Chain ID"
              },
              "title": {
                "type": "string",
                "description": "Position title"
              },
              "description": {
                "type": "string",
                "description": "Position description"
              },
              "services_binding_type": {
                "type": "integer",
                "enum": [
                  0,
                  1,
                  2
                ],
                "description": "Service binding mode:\n- `0` - disabled\n- `1` - soft\n- `2` - strict\n"
              },
              "rules_required_fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Required rule fields"
              },
              "only_chain_appointment": {
                "type": "boolean",
                "description": "Whether the Position is available only for Chain Appointments"
              },
              "salon_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Location IDs linked to the Position"
              }
            }
          }
        }
      },
      "include": {
        "title": "Appointment Includes",
        "type": "array",
        "uniqueItems": true,
        "items": {
          "type": "string",
          "enum": [
            "client",
            "client.custom_field_values",
            "staff",
            "services",
            "goods",
            "resource_instances",
            "labels",
            "attendance_service_items",
            "attendance_good_items",
            "attendance_document",
            "transactions",
            "fast_payment_settings",
            "acceptance_free",
            "custom_field_values",
            "comer",
            "client_notification_settings",
            "client_schedule",
            "duration_details"
          ]
        }
      },
      "appointment_resource": {
        "title": "Appointment Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "record",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Appointment ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "company_id",
              "external_id",
              "visit_id",
              "booking_user_id",
              "bookform_id",
              "master_id",
              "staff_id",
              "client_id",
              "comer_id",
              "source",
              "attendance",
              "attendance_status",
              "attendance_status_slug",
              "client_fictive_name",
              "client_fictive_phone",
              "client_fictive_email",
              "clients_count",
              "activity_id",
              "custom_color",
              "custom_font_color",
              "length",
              "duration",
              "paid_full",
              "is_paid",
              "is_overpaid",
              "timestamp",
              "date",
              "created_datetime",
              "from_url",
              "is_mobile",
              "comment",
              "prepaid_status",
              "record_from",
              "payment_status",
              "is_sale_bill_printed",
              "is_client_notification_sent"
            ],
            "properties": {
              "company_id": {
                "type": "integer",
                "description": "Location ID"
              },
              "external_id": {
                "type": "string",
                "description": "External Appointment ID"
              },
              "visit_id": {
                "type": "integer",
                "description": "Linked visit ID, or `0` when not linked"
              },
              "booking_user_id": {
                "type": "integer",
                "description": "Booking User account ID, or `0`"
              },
              "bookform_id": {
                "type": "integer",
                "description": "Booking form ID, or `0`"
              },
              "master_id": {
                "type": "integer",
                "description": "Deprecated wire field for Team Member ID; use `staff_id`"
              },
              "staff_id": {
                "type": "integer",
                "description": "Team Member ID"
              },
              "client_id": {
                "type": "integer",
                "description": "Booking User profile ID, or `0` when absent"
              },
              "comer_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Walk-in visitor ID"
              },
              "source": {
                "type": "integer",
                "description": "Appointment source wire value"
              },
              "attendance": {
                "type": "integer",
                "enum": [
                  -1,
                  0,
                  1,
                  2
                ],
                "description": "Deprecated attendance wire value; use `attendance_status_slug`"
              },
              "attendance_status": {
                "type": "integer",
                "enum": [
                  -1,
                  0,
                  1,
                  2
                ],
                "description": "Deprecated attendance status; use `attendance_status_slug`"
              },
              "attendance_status_slug": {
                "type": "string",
                "enum": [
                  "absent",
                  "waiting",
                  "attended",
                  "confirmed"
                ],
                "description": "Appointment attendance status"
              },
              "client_fictive_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fallback Booking User name stored on the Appointment"
              },
              "client_fictive_phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fallback Booking User phone stored on the Appointment"
              },
              "client_fictive_email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Fallback Booking User email stored on the Appointment"
              },
              "clients_count": {
                "type": "integer",
                "minimum": 1,
                "description": "Number of Booking Users in the Appointment"
              },
              "activity_id": {
                "type": "integer",
                "description": "Event ID, or `0` when the Appointment is not part of an Event"
              },
              "custom_color": {
                "type": "string",
                "description": "Appointment background color without `#`, or an empty string"
              },
              "custom_font_color": {
                "type": "string",
                "description": "Appointment text color without `#`, or an empty string"
              },
              "length": {
                "type": "integer",
                "minimum": 0,
                "description": "Deprecated duration in seconds; use `duration`"
              },
              "duration": {
                "type": "integer",
                "minimum": 0,
                "description": "Appointment duration in seconds"
              },
              "paid_full": {
                "type": "integer",
                "enum": [
                  0,
                  1,
                  2
                ],
                "description": "Deprecated payment wire value; use `is_paid` and `is_overpaid`"
              },
              "is_paid": {
                "type": "boolean",
                "description": "Whether the Appointment is fully paid"
              },
              "is_overpaid": {
                "type": "boolean",
                "description": "Whether the Appointment is overpaid"
              },
              "timestamp": {
                "type": "integer",
                "format": "int64",
                "description": "Appointment start as a Unix timestamp"
              },
              "date": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
                "description": "Appointment start in the Location timezone, without an offset"
              },
              "created_datetime": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
                "description": "Creation date and time in the Location timezone, without an offset"
              },
              "from_url": {
                "type": "string",
                "description": "Source URL, or an empty string"
              },
              "is_mobile": {
                "type": "integer",
                "description": "Mobile-origin wire status"
              },
              "comment": {
                "type": "string",
                "description": "Appointment comment"
              },
              "prepaid_status": {
                "type": "integer",
                "description": "Prepayment status wire value"
              },
              "record_from": {
                "type": "string",
                "description": "Human-readable Appointment source, or an empty string"
              },
              "payment_status": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Membership auto-payment status, when available"
              },
              "is_sale_bill_printed": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether the sale bill is printed, when available"
              },
              "is_client_notification_sent": {
                "type": "boolean",
                "description": "Whether a Booking User notification was sent"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "client": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "staff": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "services": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "goods": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "resource_instances": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "labels": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "attendance_service_items": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "attendance_good_items": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "attendance_document": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "transactions": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "fast_payment_settings": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "acceptance_free": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "custom_field_values": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "comer": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "client_notification_settings": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "client_schedule": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "duration_details": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "resource_occupation_resource": {
        "title": "Resource Occupation Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "resource_occupation",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Resource occupation ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "source_type",
              "source_type_slug",
              "source_id",
              "resource_id",
              "resource_instance_id",
              "from",
              "to"
            ],
            "properties": {
              "source_type": {
                "type": "string",
                "enum": [
                  "record",
                  "activity"
                ],
                "deprecated": true,
                "description": "Deprecated source type; use `source_type_slug`"
              },
              "source_type_slug": {
                "type": "string",
                "enum": [
                  "record",
                  "activity"
                ],
                "description": "Occupation source. Literal `record` and `activity` wire values mean\nAppointment and Event respectively.\n"
              },
              "source_id": {
                "type": "integer",
                "description": "Appointment or Event ID, depending on `source_type_slug`"
              },
              "resource_id": {
                "type": "integer",
                "description": "Resource ID"
              },
              "resource_instance_id": {
                "type": "integer",
                "description": "Resource instance ID"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
                "description": "Occupation start in the Location timezone"
              },
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
                "description": "Occupation end in the Location timezone"
              }
            }
          }
        }
      },
      "event_include": {
        "title": "Event Includes",
        "type": "array",
        "uniqueItems": true,
        "items": {
          "type": "string",
          "enum": [
            "staff",
            "service",
            "resource_instances",
            "labels",
            "duration_details",
            "master"
          ]
        }
      },
      "event_resource": {
        "title": "Event Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "activity",
            "description": "Literal JSON:API resource type returned for Events"
          },
          "id": {
            "type": "string",
            "description": "Event ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "master_id",
              "staff_id",
              "service_id",
              "timestamp",
              "length",
              "capacity",
              "clients_count",
              "color",
              "instructions",
              "stream_link",
              "font_color",
              "notified",
              "comment",
              "schedule_id",
              "schedule_till",
              "schedule_event_modified",
              "date"
            ],
            "properties": {
              "master_id": {
                "type": "integer",
                "description": "Deprecated wire field for Team Member ID; use `staff_id`"
              },
              "staff_id": {
                "type": "integer",
                "description": "Team Member ID"
              },
              "service_id": {
                "type": "integer",
                "description": "Service ID"
              },
              "timestamp": {
                "type": "integer",
                "format": "int64",
                "description": "Event start as a Unix timestamp"
              },
              "length": {
                "type": "integer",
                "minimum": 1,
                "maximum": 86400,
                "description": "Event duration in seconds"
              },
              "capacity": {
                "type": "integer",
                "minimum": 1,
                "description": "Total number of available places"
              },
              "clients_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of Booking Users currently booked"
              },
              "color": {
                "type": "string",
                "description": "Event background color including `#`"
              },
              "instructions": {
                "type": "string",
                "description": "Instructions for Booking Users"
              },
              "stream_link": {
                "type": "string",
                "description": "Online Event stream link, or an empty string"
              },
              "font_color": {
                "type": "string",
                "description": "Event text color including `#`"
              },
              "notified": {
                "type": "boolean",
                "description": "Whether an Event notification was sent"
              },
              "comment": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Event comment"
              },
              "schedule_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Event Schedule ID"
              },
              "schedule_till": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "date",
                      "timezone_type",
                      "timezone"
                    ],
                    "properties": {
                      "date": {
                        "type": "string",
                        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}$"
                      },
                      "timezone_type": {
                        "type": "integer"
                      },
                      "timezone": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Event Schedule end represented by the production DateTime wire object"
              },
              "schedule_event_modified": {
                "type": [
                  "boolean",
                  "null"
                ],
                "description": "Whether this scheduled Event differs from its Event Schedule"
              },
              "date": {
                "type": "string",
                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{4}$",
                "description": "Event start in the Location timezone with a numeric offset"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "staff": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "master": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "service": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "resource_instances": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "labels": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "duration_details": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "event_collection_response": {
        "title": "Event Collection Response",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/event_resource"
            }
          },
          "included": {
            "type": "array",
            "description": "Resources requested through `include`, when available",
            "items": {
              "$ref": "#/components/schemas/includedResource"
            }
          }
        }
      },
      "event_create_request": {
        "title": "Create Event Request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "staff_id",
          "service_id",
          "resource_instance_ids",
          "label_ids",
          "date",
          "length",
          "capacity"
        ],
        "properties": {
          "staff_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Team Member ID"
          },
          "service_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Service ID"
          },
          "resource_instance_ids": {
            "type": "array",
            "description": "Resource Instance IDs; an empty array is allowed",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "label_ids": {
            "type": "array",
            "description": "Tag IDs; an empty array is allowed",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "date": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$",
            "description": "Event start in the Location timezone as `YYYY-MM-DD HH:MM:SS`"
          },
          "length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 86400,
            "multipleOf": 300,
            "description": "Total Event duration in seconds, including any technical break"
          },
          "technical_break_duration": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 3600,
            "multipleOf": 300,
            "description": "Technical break in seconds; `null` uses the Location setting"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "description": "Total number of available places"
          },
          "comment": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Event comment"
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-f]{6}$",
            "description": "Event color including `#`"
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Instructions for Booking Users"
          },
          "stream_link": {
            "type": "string",
            "minLength": 1,
            "description": "Online Event stream link"
          },
          "force": {
            "type": "boolean",
            "default": false,
            "description": "Skip Team Member and Resource Instance availability conflicts"
          }
        }
      },
      "event_item_response": {
        "title": "Event Item Response",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/event_resource"
          },
          "included": {
            "type": "array",
            "description": "Resources requested through `include`, when available",
            "items": {
              "$ref": "#/components/schemas/includedResource"
            }
          },
          "meta": {
            "type": "array",
            "maxItems": 0,
            "description": "Empty JSON array returned for an Event item"
          }
        }
      },
      "event_update_request": {
        "title": "Update Event Request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "staff_id",
          "service_id",
          "resource_instance_ids",
          "label_ids",
          "date",
          "length",
          "capacity"
        ],
        "properties": {
          "staff_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Team Member ID"
          },
          "service_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Service ID"
          },
          "resource_instance_ids": {
            "type": "array",
            "description": "Resource Instance IDs; an empty array is allowed",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "label_ids": {
            "type": "array",
            "description": "Tag IDs; an empty array is allowed",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "date": {
            "type": "string",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$",
            "description": "Event start in the Location timezone as `YYYY-MM-DD HH:MM:SS`"
          },
          "length": {
            "type": "integer",
            "minimum": 1,
            "maximum": 86400,
            "multipleOf": 300,
            "description": "Total Event duration in seconds, including any technical break"
          },
          "technical_break_duration": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 3600,
            "multipleOf": 300,
            "description": "Technical break in seconds; `null` keeps or derives the current value"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "description": "Total number of available places"
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 255,
            "description": "Event comment"
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^#[0-9a-f]{6}$",
            "description": "Event color including `#`"
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 500,
            "description": "Instructions for Booking Users"
          },
          "stream_link": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "description": "Online Event stream link"
          },
          "force": {
            "type": "boolean",
            "default": false,
            "description": "Skip Team Member and Resource Instance availability conflicts"
          }
        }
      },
      "event_appointment_create_request": {
        "title": "Create Event Appointment Request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "client",
          "clients_count"
        ],
        "properties": {
          "client_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Deprecated wire field for an existing Booking User ID; use `client.id`"
          },
          "comer_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Walk-in visitor ID"
          },
          "client": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "phone",
              "email",
              "surname",
              "patronymic",
              "gender",
              "birthday",
              "custom_field_values",
              "agreements"
            ],
            "properties": {
              "id": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 1,
                "description": "Existing Booking User ID, or `null` for a new Booking User"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Booking User first name"
              },
              "phone": {
                "oneOf": [
                  {
                    "type": "string",
                    "const": ""
                  },
                  {
                    "type": "string",
                    "pattern": "^[0-9]{9,15}$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Booking User phone number as 9 to 15 digits; an empty string is also accepted"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email",
                "description": "Booking User email address"
              },
              "surname": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "description": "Booking User last name"
              },
              "patronymic": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "description": "Literal wire field for a Booking User middle name"
              },
              "gender": {
                "type": [
                  "integer",
                  "null"
                ],
                "enum": [
                  0,
                  1,
                  2,
                  null
                ],
                "description": "Booking User gender wire value"
              },
              "birthday": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "description": "Booking User birth date"
              },
              "custom_field_values": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "code",
                        "value"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Booking User custom fields"
              },
              "agreements": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "is_newsletter_allowed",
                      "is_personal_data_processing_allowed"
                    ],
                    "properties": {
                      "is_newsletter_allowed": {
                        "type": "boolean"
                      },
                      "is_personal_data_processing_allowed": {
                        "type": "boolean"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Booking User consent flags"
              },
              "comment": {
                "type": "string",
                "minLength": 1,
                "description": "Booking User comment"
              },
              "national_id": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "description": "Booking User national identifier"
              }
            }
          },
          "comer": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Walk-in visitor name"
              }
            }
          },
          "clients_count": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of places reserved by the Appointment"
          },
          "is_trial_service": {
            "type": "boolean",
            "description": "Whether this is a trial Service Appointment"
          }
        }
      },
      "event_appointment_item_response": {
        "title": "Event Appointment Item Response",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "$ref": "#/components/schemas/appointment_resource"
          },
          "included": {
            "type": "array",
            "description": "Resources requested through `include`, when available",
            "items": {
              "$ref": "#/components/schemas/includedResource"
            }
          },
          "meta": {
            "type": "array",
            "maxItems": 0,
            "description": "Empty JSON array returned for an Event Appointment item"
          }
        }
      },
      "event_appointment_update_request": {
        "title": "Update Event Appointment Request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "attendance_service_item"
        ],
        "properties": {
          "attendance_service_item": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "cost_per_unit",
              "discount_percent",
              "manual_cost"
            ],
            "properties": {
              "cost_per_unit": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000
              },
              "discount_percent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "manual_cost": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000000
              },
              "is_trial": {
                "type": "boolean",
                "description": "Whether this is a trial Service Appointment"
              }
            }
          },
          "attendance_good_items": {
            "type": "array",
            "description": "Literal wire field for Appointment Product Items",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "good_id",
                "unit_id",
                "storage_id",
                "staff_id",
                "operation_unit_type",
                "number",
                "quantity",
                "cost_per_unit",
                "manual_cost",
                "discount_percent",
                "marks",
                "planned_activation_date"
              ],
              "properties": {
                "id": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "minimum": 1,
                  "description": "Appointment Product Item ID; `null` creates an item"
                },
                "good_id": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Literal wire field for Product ID"
                },
                "unit_id": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Unit ID"
                },
                "storage_id": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Inventory Location ID"
                },
                "staff_id": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "Team Member ID"
                },
                "operation_unit_type": {
                  "type": "string",
                  "enum": [
                    "sale",
                    "consumable"
                  ],
                  "description": "Product operation type"
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "minLength": 1,
                  "maxLength": 32
                },
                "quantity": {
                  "type": "number",
                  "minimum": 0.001,
                  "maximum": 1000000000
                },
                "cost_per_unit": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "manual_cost": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "discount_percent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "marks": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "planned_activation_date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Appointment comment"
          },
          "label_ids": {
            "type": [
              "array",
              "null"
            ],
            "description": "Tag IDs",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9a-f]{6}$",
            "description": "Appointment color without `#`"
          },
          "clients_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Number of places reserved by the Appointment"
          }
        }
      },
      "event_appointment_reschedule_request": {
        "title": "Reschedule Event Appointment Request",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reschedule_activity_id"
        ],
        "properties": {
          "reschedule_activity_id": {
            "type": "integer",
            "minimum": 1,
            "description": "Literal wire field for the destination Event ID"
          },
          "with_comer": {
            "type": "boolean",
            "description": "Whether to retain the linked walk-in visitor"
          },
          "comment": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "description": "Appointment comment"
          },
          "clients_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Number of places reserved by the Appointment"
          }
        }
      },
      "booking_user_include": {
        "title": "Booking User Includes",
        "type": "array",
        "uniqueItems": true,
        "items": {
          "type": "string",
          "enum": [
            "labels",
            "first_successful_visit",
            "loyalty_cards",
            "loyalty_certificates",
            "loyalty_abonements",
            "custom_field_values",
            "agreements"
          ]
        }
      },
      "booking_user_resource": {
        "title": "Booking User Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "client",
            "description": "Literal legacy JSON:API resource type for a Booking User"
          },
          "id": {
            "type": "string",
            "description": "Booking User profile ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "surname",
              "patronymic",
              "phone",
              "additional_phone",
              "email",
              "comment",
              "client_tips",
              "birthday",
              "card_number",
              "gender",
              "discount",
              "discount_percent"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Booking User first name"
              },
              "surname": {
                "type": "string",
                "description": "Booking User surname, subject to Business User permissions"
              },
              "patronymic": {
                "type": "string",
                "description": "Booking User patronymic, subject to Business User permissions"
              },
              "phone": {
                "type": "string",
                "description": "Booking User phone number, subject to Business User permissions"
              },
              "additional_phone": {
                "type": "string",
                "description": "Additional phone number, or an empty string"
              },
              "email": {
                "type": "string",
                "description": "Email address, or an empty string"
              },
              "comment": {
                "type": "string",
                "description": "Booking User card comment, subject to Business User permissions"
              },
              "client_tips": {
                "type": "boolean",
                "description": "Whether the Booking User can leave tips"
              },
              "birthday": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
                "description": "Birthday without a timezone, or `null`"
              },
              "card_number": {
                "type": "string",
                "description": "Booking User card number, or an empty string"
              },
              "gender": {
                "type": "integer",
                "description": "Literal gender wire value"
              },
              "discount": {
                "type": "number",
                "description": "Deprecated discount percentage; use `discount_percent`"
              },
              "discount_percent": {
                "type": "number",
                "description": "Booking User discount percentage"
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "labels": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "first_successful_visit": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "loyalty_cards": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "loyalty_certificates": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "loyalty_abonements": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "custom_field_values": {
                "$ref": "#/components/schemas/toManyRelationship"
              },
              "agreements": {
                "$ref": "#/components/schemas/toOneRelationship"
              }
            }
          }
        }
      },
      "statistics_attributes": {
        "title": "Booking User Attendance Statistics Attributes",
        "type": "object",
        "required": [
          "successful_attendances_count",
          "failed_attendances_count",
          "balance_amount",
          "spent_amount",
          "paid_amount",
          "last_successful_attendance_datetime"
        ],
        "properties": {
          "company_id": {
            "type": "integer",
            "description": "Location ID; present only in Location statistics"
          },
          "successful_attendances_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of successful attendances"
          },
          "failed_attendances_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of failed attendances"
          },
          "balance_amount": {
            "type": "number",
            "description": "Current balance"
          },
          "spent_amount": {
            "type": "number",
            "description": "Total spent amount"
          },
          "paid_amount": {
            "type": "number",
            "description": "Total paid amount"
          },
          "last_successful_attendance_datetime": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$",
            "description": "Last successful attendance in the Location timezone"
          }
        }
      },
      "statistics_relationships": {
        "title": "Booking User Attendance Statistics Relationships",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deposits"
        ],
        "properties": {
          "deposits": {
            "$ref": "#/components/schemas/toManyRelationship"
          }
        }
      },
      "location_attendance_statistics_resource": {
        "title": "Booking User Location Attendance Statistics Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes",
          "relationships"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "client_attendances_statistic",
            "description": "Literal legacy JSON:API resource type for Location statistics"
          },
          "id": {
            "type": "string",
            "description": "Compound Booking User and Location identifier"
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/statistics_attributes"
              },
              {
                "type": "object",
                "required": [
                  "company_id"
                ]
              }
            ]
          },
          "relationships": {
            "$ref": "#/components/schemas/statistics_relationships"
          }
        }
      },
      "deposit_resource": {
        "title": "Booking User Deposit Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "timetable_deposit"
          },
          "id": {
            "type": "string",
            "description": "Deposit ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "title",
              "balance",
              "reserved_balance",
              "available_balance"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Deposit name"
              },
              "balance": {
                "type": "number",
                "description": "Total balance"
              },
              "reserved_balance": {
                "type": "number",
                "description": "Reserved balance"
              },
              "available_balance": {
                "type": "number",
                "description": "Available balance after reservations"
              }
            }
          }
        }
      },
      "chain_attendance_statistics_resource": {
        "title": "Booking User Chain Attendance Statistics Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes",
          "relationships"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "client_chain_attendances_statistic",
            "description": "Literal legacy JSON:API resource type for Chain statistics"
          },
          "id": {
            "type": "string",
            "description": "Compound Booking User and Chain identifier"
          },
          "attributes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/statistics_attributes"
              },
              {
                "type": "object",
                "required": [
                  "chain_id"
                ],
                "properties": {
                  "chain_id": {
                    "type": "integer",
                    "description": "Chain ID"
                  }
                }
              }
            ]
          },
          "relationships": {
            "$ref": "#/components/schemas/statistics_relationships"
          }
        }
      },
      "custom_field_resource": {
        "title": "Custom Field Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_field",
            "description": "Literal JSON:API resource type"
          },
          "id": {
            "type": "string",
            "description": "Location Custom Field ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "slug",
              "parent_entity_type",
              "entity_slug",
              "relation_entity_type",
              "show_in_ui",
              "is_visible",
              "title",
              "user_can_edit",
              "is_editable",
              "is_required",
              "weight",
              "values"
            ],
            "properties": {
              "code": {
                "type": "string",
                "deprecated": true,
                "description": "Deprecated Custom Field key; use `slug`"
              },
              "slug": {
                "type": "string",
                "description": "Custom Field key used in API payloads"
              },
              "parent_entity_type": {
                "type": "string",
                "enum": [
                  "record",
                  "client"
                ],
                "deprecated": true,
                "description": "Deprecated entity wire value; use `entity_slug`"
              },
              "entity_slug": {
                "type": "string",
                "enum": [
                  "record",
                  "client"
                ],
                "description": "Entity wire value. `record` means Appointment and `client` means\nBooking User.\n"
              },
              "relation_entity_type": {
                "type": "null",
                "description": "Reserved wire field; currently always `null`"
              },
              "show_in_ui": {
                "type": "boolean",
                "deprecated": true,
                "description": "Deprecated visibility flag; use `is_visible`"
              },
              "is_visible": {
                "type": "boolean",
                "description": "Whether the Custom Field is visible in Altegio interfaces"
              },
              "title": {
                "type": "string",
                "description": "Custom Field name"
              },
              "user_can_edit": {
                "type": "boolean",
                "deprecated": true,
                "description": "Deprecated editability flag; use `is_editable`"
              },
              "is_editable": {
                "type": "boolean",
                "description": "Whether Business Users can edit the Custom Field value"
              },
              "is_required": {
                "type": "boolean",
                "description": "Whether a value is required"
              },
              "weight": {
                "type": "integer",
                "description": "Display order"
              },
              "values": {
                "type": "array",
                "description": "Configured values for list-like Custom Fields",
                "items": {}
              }
            }
          },
          "relationships": {
            "type": "object",
            "additionalProperties": false,
            "description": "Present when related data is requested through `include`",
            "properties": {
              "custom_field_type": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "type": {
                "$ref": "#/components/schemas/toOneRelationship"
              },
              "ui_options": {
                "$ref": "#/components/schemas/toManyRelationship"
              }
            }
          }
        }
      },
      "custom_field_type_resource": {
        "title": "Custom Field Type Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_field_type"
          },
          "id": {
            "type": "string",
            "description": "Custom Field Type ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "slug",
              "title"
            ],
            "properties": {
              "code": {
                "type": "string",
                "deprecated": true,
                "description": "Deprecated type key; use `slug`"
              },
              "slug": {
                "type": "string",
                "description": "Custom Field Type key"
              },
              "title": {
                "type": "string",
                "description": "Custom Field Type name"
              }
            }
          }
        }
      },
      "custom_field_ui_option_resource": {
        "title": "Custom Field UI Option Resource",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "id",
          "attributes"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "custom_field_ui_option"
          },
          "id": {
            "type": "string",
            "description": "Custom Field UI Option ID"
          },
          "attributes": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "slug",
              "value"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "description": "UI Option key"
              },
              "value": {
                "type": "boolean",
                "description": "Whether the UI Option is enabled"
              }
            }
          }
        }
      },
      "tag_attributes": {
        "type": "object",
        "description": "Tag attributes (v2 API JSON:API format)",
        "additionalProperties": false,
        "properties": {
          "company_id": {
            "type": "integer",
            "description": "Location ID",
            "example": 68570
          },
          "title": {
            "type": "string",
            "description": "Tag name",
            "example": "VIP Booking User"
          },
          "color": {
            "type": "string",
            "description": "Tag background color in",
            "example": "#ff2828"
          },
          "font_color": {
            "type": "string",
            "description": "Tag font color in",
            "example": "#ffffff"
          },
          "icon": {
            "type": "string",
            "description": "Icon name",
            "example": "star"
          },
          "entity_type": {
            "type": "string",
            "description": "Literal entity alias. `client` identifies Booking Users and `record`\nidentifies Appointments.\n",
            "enum": [
              "common",
              "client",
              "record",
              "activity"
            ],
            "example": "client"
          },
          "is_deleted": {
            "type": "boolean",
            "description": "Whether the Tag is deleted",
            "example": false
          },
          "is_editable": {
            "type": "boolean",
            "description": "Whether the Tag can be updated or deleted",
            "example": true
          },
          "salon_id": {
            "type": "integer",
            "description": "Deprecated wire field for Location ID; use `company_id`",
            "deprecated": true,
            "example": 68570
          },
          "entity": {
            "type": "integer",
            "description": "Deprecated numeric entity type: 0 general, 1 Booking User, 2 Appointment, 3 Event",
            "deprecated": true,
            "example": 1
          },
          "entity_slug": {
            "type": "string",
            "description": "Deprecated literal entity alias; use `entity_type`",
            "deprecated": true,
            "example": "client"
          },
          "deleted": {
            "type": "integer",
            "description": "Deprecated deletion wire value; use `is_deleted`",
            "deprecated": true,
            "example": 0
          },
          "not_editable": {
            "type": "integer",
            "description": "Deprecated editability wire value; use `is_editable`",
            "deprecated": true,
            "example": 0
          }
        },
        "required": [
          "company_id",
          "title",
          "color",
          "entity_type",
          "is_deleted",
          "is_editable"
        ]
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "POS & Scheduling",
      "tags": [
        "Services",
        "Products",
        "Team Members",
        "Appointments",
        "Events",
        "Booking Users"
      ]
    },
    {
      "name": "Administrative",
      "tags": [
        "Custom Fields",
        "Tags"
      ]
    }
  ],
  "tags": [
    {
      "name": "Services",
      "description": "Service catalog management.\n\nRetrieve services and service categories for a location.\n"
    },
    {
      "name": "Products",
      "description": "Product inventory management.\n\nRetrieve Products, Product Categories, measurement Units, stock levels,\nand Appointment Product Items.\n"
    },
    {
      "name": "Team Members",
      "description": "Team Member and position management.\n\nManage Team Member positions and retrieve Team Member information.\n"
    },
    {
      "name": "Appointments",
      "description": "Appointment management.\n\nList and manage appointments for a location.\n"
    },
    {
      "name": "Events",
      "description": "Group Event management."
    },
    {
      "name": "Booking Users",
      "description": "Booking User attendance and financial statistics.\n"
    },
    {
      "name": "Custom Fields",
      "description": "Location-specific Custom Fields for Appointments and Booking Users.\n"
    },
    {
      "name": "Tags",
      "description": "Booking User tagging system."
    }
  ],
  "paths": {
    "/locations/{location_id}/services": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Services",
        "description": "Retrieve Services for a Location, optionally filtered by Service IDs.\n\nThe response uses JSON:API resource objects. Pagination uses `page` and\n`limit`; pagination metadata is not returned.\n\nRelated data can be requested by repeating the `include` parameter, for\nexample `?include=resources&include=company_links`.\n",
        "operationId": "list_services",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[service_ids][]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Filter by Service IDs"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Services to return"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "resources",
                  "service_composite",
                  "resource_links",
                  "company_links",
                  "trial_settings"
                ]
              }
            },
            "description": "Related resources to include. The wire values are literal API keys:\n`company_links` contains Location-specific Service links.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Services retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "service",
                      "id": "100",
                      "attributes": {
                        "title": "Haircut",
                        "category_id": 5
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Services for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/services/{service_id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Service",
        "description": "Retrieve a Service for a Location as a JSON:API resource object.\n\nRelated data can be requested by repeating the `include` parameter, for\nexample `?include=resources&include=company_links`.\n",
        "operationId": "get_service",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Service ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "resources",
                  "service_composite",
                  "resource_links",
                  "company_links",
                  "trial_settings"
                ]
              }
            },
            "description": "Related resources to include. The wire values are literal API keys:\n`company_links` contains Location-specific Service links.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Service retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/service_resource"
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "service",
                    "id": "100",
                    "attributes": {
                      "title": "Haircut",
                      "category_id": 5
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read this Service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Service or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/service_categories": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Service Categories",
        "description": "Retrieve Service Categories for a Location as JSON:API resource objects.\n\nUse `filter[staff_id]` to return categories containing Services assigned to\na specific Team Member.\n",
        "operationId": "list_service_categories",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[staff_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by Team Member ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Service Categories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/service_category_resource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "service_category",
                      "id": "5",
                      "attributes": {
                        "title": "Hair Services",
                        "salon_service_id": 353
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Service Categories for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/attendance_services": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Attendance Services",
        "description": "Retrieve Service delivery options for the Location timetable. Each result\ncombines a Service with its applicable Team Member, duration, price, and\ncomposite Service context.\n\nThe response is paginated and includes pagination metadata.\n",
        "operationId": "list_attendance_services",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "staff_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by Team Member ID"
          },
          {
            "name": "filter[category_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by Service Category ID"
          },
          {
            "name": "filter[service_ids][]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Filter by Service IDs"
          },
          {
            "name": "filter[term]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 3
            },
            "description": "Search Service names; surrounding whitespace is ignored"
          },
          {
            "name": "filter[is_available_for_timetable]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "Filter by timetable availability"
          },
          {
            "name": "filter[is_multi]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "Filter by multi-Service availability"
          },
          {
            "name": "filter[is_composite]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "Filter by composite Service status"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Attendance Services to return"
          }
        ],
        "responses": {
          "200": {
            "description": "Attendance Services retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/attendance_service_resource"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "pagination"
                      ],
                      "properties": {
                        "pagination": {
                          "$ref": "#/components/schemas/pagination"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "attendance_service",
                      "id": "720441_13245586_0_0",
                      "attributes": {
                        "company_id": 720441,
                        "service_id": 13245586,
                        "category_id": 5,
                        "is_composite": false,
                        "composite_service_id": 0,
                        "salon_service_id": 8842,
                        "composite_position": null,
                        "staff_id": 0,
                        "title": "Haircut",
                        "length": 3600,
                        "duration": 3600,
                        "price_min": 50,
                        "price_max": 75,
                        "technical_break_duration": 0
                      }
                    }
                  ],
                  "meta": {
                    "pagination": {
                      "page": 1,
                      "offset": 0,
                      "limit": 250
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No access to this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter or pagination value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/composite_services/{service_id}/attendance_services": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Composite Service Attendance Services",
        "description": "Retrieve the Service delivery options that make up a composite Service in\na Location, including Team Member, duration, price, and position data.\n",
        "operationId": "list_composite_service_attendance_services",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Composite Service ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Composite Service Attendance Services retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/attendance_service_resource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "attendance_service",
                      "id": "720441_13245587_2969872_13160812_1",
                      "attributes": {
                        "company_id": 720441,
                        "service_id": 13245587,
                        "category_id": 5,
                        "is_composite": false,
                        "composite_service_id": 13160812,
                        "salon_service_id": 8843,
                        "composite_position": 1,
                        "staff_id": 2969872,
                        "title": "Wash and Cut",
                        "length": 3600,
                        "duration": 3600,
                        "price_min": 50,
                        "price_max": 50,
                        "technical_break_duration": 0
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No access to this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Composite Service or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/attendance_service_suggestions": {
      "get": {
        "tags": [
          "Services"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Attendance Service Suggestions",
        "description": "Retrieve Service suggestions for a Team Member. Supplying a Booking User\nID adds suggestions based on that Booking User's prior Appointments and\npopular Services.\n\nUse `include=attendance_service` or `include=record` to include the\nsuggested Service delivery option or source Appointment. The literal\n`record` include value is retained by the wire contract.\n",
        "operationId": "list_attendance_service_suggestions",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "staff_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Team Member ID"
          },
          {
            "name": "client_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Booking User profile ID; `client_id` is the literal wire name"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "attendance_service",
                  "record"
                ]
              }
            },
            "description": "Related Attendance Service or source Appointment to include"
          }
        ],
        "responses": {
          "200": {
            "description": "Attendance Service suggestions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/attendance_service_suggestion_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/attendance_service_resource"
                          },
                          {
                            "$ref": "#/components/schemas/includedResource"
                          }
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "attendance_service_suggestion",
                      "id": "13245586",
                      "attributes": {
                        "service_id": 13245586,
                        "suggestion_type": "master_popular_service",
                        "record_id": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No access to the Location or Booking User",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location, Team Member, or Booking User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/units": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Product Units",
        "description": "Retrieve the measurement Units available to Products in a Location as\nJSON:API resource objects. The collection contains shared system Units and\nany Units configured specifically for the Location.\n\nUse Unit IDs as `sale_unit_id` and `consumable_unit_id` in Product data.\n",
        "operationId": "list_product_units",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Product Units retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/unit_resource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "unit",
                      "id": "1",
                      "attributes": {
                        "company_id": 0,
                        "title": "Piece",
                        "short_title": "pc"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Product Units for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Products",
        "description": "Retrieve Products for a Location as JSON:API resource objects.\n\nPagination uses `page` and `limit`. The response includes the effective\n`page`, calculated `offset`, and `limit` in `meta.pagination`.\n\nRelated data can be requested by repeating the `include` parameter. The\n`actual_cost` value is returned only when requested and when the Business\nUser has permission to view it.\n",
        "operationId": "list_products",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[ids][]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Filter by Product IDs"
          },
          {
            "name": "filter[related_loyalty_entity_slug]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "common",
                "loyalty_abonement",
                "loyalty_certificate"
              ],
              "default": "common"
            },
            "description": "Filter by Product purpose. Wire values are literal API values:\n- `common` - regular Products\n- `loyalty_abonement` - membership Products\n- `loyalty_certificate` - certificate Products\n"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Products to return"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "loyalty_abonement_type",
                  "loyalty_certificate_type",
                  "mark_settings",
                  "actual_cost"
                ]
              }
            },
            "description": "Related resources or conditional attributes to include. Wire values are\nliteral API keys. Use the Product detail operation for `storage_amounts`.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Products retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "pagination"
                      ],
                      "properties": {
                        "pagination": {
                          "$ref": "#/components/schemas/pagination"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "good",
                      "id": "100",
                      "attributes": {
                        "category_id": 5,
                        "title": "Professional Shampoo",
                        "sale_unit_id": 1,
                        "consumable_unit_id": 1,
                        "sale_unit_to_consumable_unit_ratio": 1,
                        "loyalty_abonement_type_id": null,
                        "loyalty_certificate_type_id": null,
                        "cost": 25.99,
                        "actual_cost": null,
                        "is_chain": false
                      }
                    }
                  ],
                  "meta": {
                    "pagination": {
                      "page": 1,
                      "offset": 0,
                      "limit": 250
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Products for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter, pagination, or include value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/products/autocomplete": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Autocomplete Products",
        "description": "Search Products by name, article number, or barcode.\n\nThe search term must contain at least two characters and cannot contain\nemoji. Pagination uses `page` and `limit` and is returned in\n`meta.pagination`.\n",
        "operationId": "autocomplete_products",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[term]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2
            },
            "description": "Product name, article number, or barcode search term"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Products to return"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "loyalty_abonement_type",
                  "loyalty_certificate_type",
                  "mark_settings"
                ]
              }
            },
            "description": "Related resources to include; wire values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Products retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "pagination"
                      ],
                      "properties": {
                        "pagination": {
                          "$ref": "#/components/schemas/pagination"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Search term contains emoji",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to search Products for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid search term, pagination, or include value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/products/{product_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Product",
        "description": "Retrieve a Product for a Location as a JSON:API resource object.\n\nRelated data can be requested by repeating the `include` parameter. The\n`actual_cost` value is returned only when requested and when the Business\nUser has permission to view it.\n",
        "operationId": "get_product",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Product ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "loyalty_abonement_type",
                  "loyalty_certificate_type",
                  "mark_settings",
                  "storage_amounts",
                  "actual_cost"
                ]
              }
            },
            "description": "Related resources or conditional attributes to include"
          }
        ],
        "responses": {
          "200": {
            "description": "Product retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_resource"
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "good",
                    "id": "100",
                    "attributes": {
                      "category_id": 5,
                      "title": "Professional Shampoo",
                      "sale_unit_id": 1,
                      "consumable_unit_id": 1,
                      "sale_unit_to_consumable_unit_ratio": 1,
                      "loyalty_abonement_type_id": null,
                      "loyalty_certificate_type_id": null,
                      "cost": 25.99,
                      "actual_cost": null,
                      "is_chain": false
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read this Product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Product or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/products/{product_id}/storage_amounts": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Product Storage Amounts",
        "description": "Retrieve Product amounts across the Location's Storages as JSON:API\nresource objects. Amounts are returned in both Sale Units and Consumable\nUnits.\n",
        "operationId": "list_product_storage_amounts",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Product ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "storage"
                ]
              }
            },
            "description": "Include Storage details; `storage` is the literal wire value"
          }
        ],
        "responses": {
          "200": {
            "description": "Product Storage amounts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/storage_amount_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Storage resources requested through `include`",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "good_storage_amount",
                      "id": "100_10",
                      "attributes": {
                        "good_id": 100,
                        "storage_id": 10,
                        "sale_amount": 50,
                        "consumable_amount": 50
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Product amounts for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Product or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/product_categories": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Product Categories",
        "description": "Retrieve Product Categories for a Location as JSON:API resource objects.\n\nOmit `filter[parent_category_id]` or set it to `0` to return root Product\nCategories. Set it to a Product Category ID to return direct children.\n",
        "operationId": "list_product_categories",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[parent_category_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Parent Product Category ID; use `0` for root categories"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "child_categories",
                  "goods"
                ]
              }
            },
            "description": "Related resources to include. `child_categories` and `goods` are\nliteral wire values for Product Categories and Products.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Product Categories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/product_category_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "good_category",
                      "id": "5",
                      "attributes": {
                        "title": "Hair Care",
                        "is_chain": false,
                        "parent_category_id": null
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Product Categories for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid parent Product Category filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/product_categories/{product_category_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Product Category",
        "description": "Retrieve a Product Category for a Location as a JSON:API resource object.",
        "operationId": "get_product_category",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "product_category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Product Category ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "child_categories",
                  "goods"
                ]
              }
            },
            "description": "Related resources to include. `child_categories` and `goods` are\nliteral wire values for Product Categories and Products.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Product Category retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/product_category_resource"
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "good_category",
                    "id": "5",
                    "attributes": {
                      "title": "Hair Care",
                      "is_chain": false,
                      "parent_category_id": null
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read this Product Category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Product Category or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/attendance_product_items/{attendance_product_item_id}": {
      "get": {
        "tags": [
          "Products"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Appointment Product Item",
        "description": "Retrieve a Product item associated with an Appointment as a JSON:API\nresource object.\n\nThe positive response shape is verified against the current PHP transformer\nbut has not been live-verified because the test Location has no safe fixture.\n",
        "operationId": "get_attendance_product_item",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "attendance_product_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Appointment Product Item ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "good",
                  "staff",
                  "storage_amount",
                  "loyalty_abonement",
                  "loyalty_certificate",
                  "marks"
                ]
              }
            },
            "description": "Related resources to include. Wire values are literal API keys;\n`staff` represents the Team Member and `good` represents the Product.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Appointment Product Item retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/attendance_product_item_resource"
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read this Appointment Product Item",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Appointment Product Item or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/team_members": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Team Members",
        "description": "Retrieve Team Members for a Location as JSON:API resource objects.\n\nUse the filters to select Team Members by name, Position, account link,\nschedule, payment, dismissal, deletion, or assistant availability. Status\nfilters use `0`, `1`, and `2`, where `2` disables that filter.\n\nRelated data can be requested by repeating the `include` parameter. The\n`employee` wire value returns an employment profile that can contain\nsensitive employment and identity data. Request and store it only when it\nis necessary for the integration.\n",
        "operationId": "list_team_members",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[name]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Filter by a partial Team Member name match"
          },
          {
            "name": "filter[position_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Filter by Position ID"
          },
          {
            "name": "filter[position_title]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Filter by a partial Position title match"
          },
          {
            "name": "filter[fired]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 2
            },
            "description": "Filter by dismissal status: `0` not dismissed, `1` dismissed, `2` all"
          },
          {
            "name": "filter[deleted]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 0
            },
            "description": "Filter by deletion status: `0` active, `1` deleted, `2` all"
          },
          {
            "name": "filter[user_linked]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 2
            },
            "description": "Filter by Business User link: `0` not linked, `1` linked, `2` all"
          },
          {
            "name": "filter[is_paid]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 2
            },
            "description": "Filter by payment status: `0` unpaid, `1` paid, `2` all"
          },
          {
            "name": "filter[has_schedule]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 2
            },
            "description": "Filter by schedule: `0` without a schedule, `1` with a schedule, `2` all"
          },
          {
            "name": "filter[is_assistant]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1,
                2
              ],
              "default": 2
            },
            "description": "Filter by assistant availability: `0` unavailable, `1` available, `2` all"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "position",
                  "employee"
                ]
              }
            },
            "description": "Related resources to include. Wire values are literal API keys:\n- `position` - Position\n- `employee` - employment profile\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Team Members retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/team_member_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/position_resource"
                          },
                          {
                            "$ref": "#/components/schemas/employment_profile_resource"
                          }
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "staff",
                      "id": "42",
                      "attributes": {
                        "name": "John Smith",
                        "tt_markup": 15,
                        "specialization": "Senior Stylist",
                        "image": "https://cdn.altegio.com/team-members/42.jpg",
                        "position_id": 5,
                        "is_available_as_assistant": false
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Team Members for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{company_id}/positions": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Positions",
        "description": "Retrieve all Positions available to Team Members at a Location.\n\nThe response is a JSON:API collection and does not contain pagination\nmetadata. The literal `company_id` wire path parameter identifies a\nLocation.\n",
        "operationId": "list_positions",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Positions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/team_member_position_resource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "position",
                      "id": "42",
                      "attributes": {
                        "chain_id": 5,
                        "title": "Senior Stylist",
                        "description": "Senior hair stylist with color specialization",
                        "services_binding_type": 0,
                        "rules_required_fields": [],
                        "only_chain_appointment": false,
                        "salon_ids": [
                          1,
                          2,
                          3
                        ]
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Positions for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Position",
        "description": "Create a Position for Team Members at the specified Location.",
        "operationId": "create_position",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Position title"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Position description"
                  }
                }
              },
              "example": {
                "title": "Senior Stylist",
                "description": "Senior hair stylist with color specialization"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Position created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/team_member_position_resource"
                    },
                    "meta": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "position",
                    "id": "42",
                    "attributes": {
                      "chain_id": 5,
                      "title": "Senior Stylist",
                      "description": "Senior hair stylist with color specialization",
                      "services_binding_type": 0,
                      "rules_required_fields": [],
                      "only_chain_appointment": false,
                      "salon_ids": [
                        1
                      ]
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Malformed request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to create Positions for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unexpected request field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{company_id}/positions/{position_id}": {
      "get": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Position",
        "description": "Retrieve a Position by ID as a JSON:API resource object.",
        "operationId": "get_position",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "position_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Position ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Position retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/team_member_position_resource"
                    },
                    "meta": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "position",
                    "id": "42",
                    "attributes": {
                      "chain_id": 5,
                      "title": "Senior Stylist",
                      "description": "Senior hair stylist with color specialization",
                      "services_binding_type": 0,
                      "rules_required_fields": [],
                      "only_chain_appointment": false,
                      "salon_ids": [
                        1,
                        2,
                        3
                      ]
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read the Position",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Position not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Position",
        "description": "Update a Position. The request must contain `title`.",
        "operationId": "update_position",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "position_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Position ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Position title"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Position description"
                  }
                }
              },
              "example": {
                "title": "Senior Stylist Updated",
                "description": "Updated description"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Position updated successfully; no response body"
          },
          "400": {
            "description": "Malformed request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to update the Position",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Position not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid or unexpected request field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Team Members"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Position",
        "description": "Delete a Position.",
        "operationId": "delete_position",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "position_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Position ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Position deleted successfully; no response body"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to delete the Position",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Position not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/attendances/{attendance_id}/appointments": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Attendance Appointments",
        "description": "Retrieve Appointments grouped under one attendance identifier as JSON:API\nresource objects.\n\nUse `record_{appointment_id}` to retrieve the group containing one\nAppointment, or `visit_{visit_id}` to retrieve all Appointments linked to\none visit. The `attendance_id` path parameter and both prefixes are literal\nwire values.\n\nRelated data can be requested by repeating the `include` parameter. Wire\nvalues remain literal API keys: `client` identifies Booking User data,\n`staff` identifies Team Member data, and `goods` identifies Products.\nCustom Field Value includes require the corresponding Business User\npermissions.\n",
        "operationId": "list_attendance_appointments",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "attendance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(record|visit)_[0-9]+$",
              "example": "record_12345"
            },
            "description": "Attendance group identifier. Use the literal `record_` prefix with an\nAppointment ID or the literal `visit_` prefix with a visit ID.\n"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include; values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Attendance Appointments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointment_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Appointments for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Attendance group or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid attendance identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/appointments": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Appointments",
        "description": "Retrieve Appointments for a Location as JSON:API resource objects.\n\nPagination uses `page` and `limit`. The response includes the effective\n`page`, calculated `offset`, and `limit` in `meta.pagination`.\n\nDate range values use `YYYY-MM-DDTHH:MM:SS` without a timezone. Provide\n`filter[date_intersect_from]` and `filter[date_intersect_to]` together; the\nend must be later than the start.\n\nRelated data can be requested by repeating the `include` parameter. Wire\nvalues remain literal API keys: `client` identifies Booking User data,\n`staff` identifies Team Member data, and `goods` identifies Products.\nCustom Field Value includes require the corresponding Business User\npermissions.\n",
        "operationId": "list_appointments",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[client_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by Booking User profile ID"
          },
          {
            "name": "filter[activity_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by Event ID"
          },
          {
            "name": "filter[date_intersect_from]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
              "example": "2026-01-01T00:00:00"
            },
            "description": "Start of the Appointment intersection range, without a timezone"
          },
          {
            "name": "filter[date_intersect_to]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$",
              "example": "2026-01-31T23:59:59"
            },
            "description": "End of the Appointment intersection range, without a timezone"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Appointments to return"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include; values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Appointments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointment_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "pagination"
                      ],
                      "properties": {
                        "pagination": {
                          "$ref": "#/components/schemas/pagination"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "record",
                      "id": "12345",
                      "attributes": {
                        "company_id": 1,
                        "external_id": "",
                        "visit_id": 0,
                        "booking_user_id": 100,
                        "bookform_id": 3,
                        "master_id": 42,
                        "staff_id": 42,
                        "client_id": 500,
                        "comer_id": null,
                        "source": 12,
                        "attendance": 0,
                        "attendance_status": 0,
                        "attendance_status_slug": "waiting",
                        "client_fictive_name": null,
                        "client_fictive_phone": null,
                        "client_fictive_email": null,
                        "clients_count": 1,
                        "activity_id": 0,
                        "custom_color": "",
                        "custom_font_color": "",
                        "length": 3600,
                        "duration": 3600,
                        "paid_full": 0,
                        "is_paid": false,
                        "is_overpaid": false,
                        "timestamp": 1768467600,
                        "date": "2026-01-15T10:00:00",
                        "created_datetime": "2026-01-10T15:30:00",
                        "from_url": "",
                        "is_mobile": 0,
                        "comment": "",
                        "prepaid_status": 0,
                        "record_from": "API",
                        "payment_status": null,
                        "is_sale_bill_printed": null,
                        "is_client_notification_sent": false
                      }
                    }
                  ],
                  "meta": {
                    "pagination": {
                      "page": 1,
                      "offset": 0,
                      "limit": 250
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read Appointments for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter or pagination value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/appointments/{appointment_id}": {
      "delete": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Appointment",
        "description": "Delete an Appointment. The Business User must have permission to delete\nAppointments for the Location and permission to delete this Appointment.\n",
        "operationId": "delete_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "appointment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Appointment ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Appointment deleted successfully; no response body"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to delete the Appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Appointment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/timetable/appointments/delete": {
      "post": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Timetable Appointment",
        "description": "Delete one Appointment from the timetable by its `recordId` wire field.\n\nIf the deleted Appointment belongs to a linked visit, the response returns\nthe remaining related Appointments as a JSON:API collection. Deleting an\nAppointment without related Appointments returns an empty `data` array.\n",
        "operationId": "delete_timetable_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include in returned Appointments"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "recordId"
                ],
                "properties": {
                  "recordId": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Appointment ID"
                  }
                }
              },
              "example": {
                "recordId": 12345
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Appointment deleted; remaining related Appointments returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/appointment_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    }
                  }
                },
                "example": {
                  "data": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to delete the Appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Appointment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/resource_occupations": {
      "get": {
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Resource Occupations",
        "description": "Retrieve resource occupations that intersect a required time interval in a\nLocation. Results can be narrowed to one or more Services.\n\nEach JSON:API resource identifies the occupied resource instance, its time\ninterval, and the source Appointment or Event.\n",
        "operationId": "list_resource_occupations",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[service_id]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Filter by one Service ID"
          },
          {
            "name": "filter[service_ids][]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Filter by multiple Service IDs"
          },
          {
            "name": "filter[date_intersect_from_strict]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
            },
            "description": "Interval start in the Location timezone, without an offset"
          },
          {
            "name": "filter[date_intersect_to_strict]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
            },
            "description": "Interval end in the Location timezone, without an offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Resource occupations retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/resource_occupation_resource"
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "resource_occupation",
                      "id": "501",
                      "attributes": {
                        "source_type": "record",
                        "source_type_slug": "record",
                        "source_id": 7001,
                        "resource_id": 90,
                        "resource_instance_id": 901,
                        "from": "2026-07-16 13:00:00",
                        "to": "2026-07-16 13:30:00"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No timetable access for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter value or date format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Events",
        "description": "Retrieve Events for a Location within a future date range. The response is\na JSON:API collection with the literal resource type `activity`.\n\n`filter[from]` must not be earlier than the current time, and `filter[to]`\nmust be later than `filter[from]`.\n",
        "operationId": "list_events",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "filter[from]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$",
              "example": "2026-08-01 09:00:00"
            },
            "description": "Range start in the Location timezone as `YYYY-MM-DD HH:MM:SS`"
          },
          {
            "name": "filter[to]",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$",
              "example": "2026-08-07 21:00:00"
            },
            "description": "Range end in the Location timezone as `YYYY-MM-DD HH:MM:SS`"
          },
          {
            "name": "filter[master_ids][]",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Team Member IDs; the literal wire query key is `filter[master_ids][]`"
          },
          {
            "name": "filter[service_ids][]",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Service IDs"
          },
          {
            "name": "filter[capacity]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Minimum number of unoccupied places"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Result page"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 250,
              "default": 250
            },
            "description": "Maximum number of Events to return"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/event_include"
            },
            "description": "Related resources to include; values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Events retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_collection_response"
                }
              }
            }
          },
          "400": {
            "description": "Required date range is missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No timetable permission for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid date range, filter, or pagination value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Event",
        "description": "Create a group Event for a Location.",
        "operationId": "create_event",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/event_include"
            },
            "description": "Related resources to include in the created Event"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_create_request"
              },
              "example": {
                "staff_id": 42,
                "service_id": 500,
                "resource_instance_ids": [],
                "label_ids": [],
                "date": "2026-08-01 14:00:00",
                "length": 3600,
                "technical_break_duration": 300,
                "capacity": 8,
                "comment": "Beginner group session",
                "color": "#9c27b0",
                "instructions": "Arrive ten minutes early",
                "stream_link": "https://example.com/event-stream",
                "force": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Event created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_item_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to create Events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location, Team Member, or Service not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "409": {
            "description": "Team Member or Resource Instance is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/events/{event_id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Event",
        "description": "Return one Event in JSON:API format. Event deletion is soft: a deleted Event\nis excluded from list results, while direct retrieval remains available.\n",
        "operationId": "get_event",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Event ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/event_include"
            },
            "description": "Related resources to include; values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Event retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_item_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No access to this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Event",
        "description": "Replace the mutable properties of an Event.",
        "operationId": "update_event",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Event ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/event_include"
            },
            "description": "Related resources to include in the updated Event"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_update_request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_item_response"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to update the Event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location, Event, Team Member, or Service not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "409": {
            "description": "Team Member or Resource Instance is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Event",
        "description": "Soft-delete an Event. The Event is removed from list results, and no\nresponse body is returned.\n",
        "operationId": "delete_event",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Event ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Event deleted successfully; no response body"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to delete the Event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/events/{event_id}/appointments": {
      "post": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Event Appointment",
        "description": "Create an Appointment in an Event. The literal `client` wire object is\nrequired for both an existing and a new Booking User.\n",
        "operationId": "create_event_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Event ID"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include in the created Appointment"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_appointment_create_request"
              },
              "example": {
                "client_id": 123456,
                "client": {
                  "id": 123456,
                  "name": "John",
                  "phone": "13155550175",
                  "email": "john@example.com",
                  "surname": "Smith",
                  "patronymic": null,
                  "gender": 1,
                  "birthday": "1990-01-01",
                  "custom_field_values": null,
                  "agreements": null
                },
                "comer_id": null,
                "clients_count": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Event Appointment created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_appointment_item_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to create Appointments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location or Event not found, including a deleted Event",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/events/{event_id}/appointments/{record_id}": {
      "put": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Event Appointment",
        "description": "Update pricing, Product Items, Tags, color, comment, or capacity for an Event Appointment.",
        "operationId": "update_event_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Event ID"
          },
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Appointment ID; `record_id` is the literal wire path parameter"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include in the updated Appointment"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_appointment_update_request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event Appointment updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_appointment_item_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to update the Appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location, Event, or Appointment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Events"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Reschedule Event Appointment",
        "description": "Move an Appointment from this Event to another Event in the same Location.",
        "operationId": "reschedule_event_appointment",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "application/json"
            },
            "description": "Request media type"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Location ID"
          },
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Source Event ID"
          },
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Appointment ID; `record_id` is the literal wire path parameter"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/include"
            },
            "description": "Related resources to include in the rescheduled Appointment"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/event_appointment_reschedule_request"
              },
              "example": {
                "reschedule_activity_id": 12346,
                "with_comer": true,
                "clients_count": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event Appointment rescheduled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/event_appointment_item_response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to move the Appointment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location, source Event, destination Event, or Appointment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid destination Event or request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/attendance/clients/{client_id}": {
      "get": {
        "tags": [
          "Booking Users"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Booking User for Attendance",
        "description": "Retrieve one Booking User profile used by the attendance workflow as a\nJSON:API resource object.\n\nThe `client_id` path parameter and `client` resource type are literal\nlegacy wire names. Optional related data is returned only when requested\nthrough `include` and may require additional Business User permissions or\nenabled Location features.\n",
        "operationId": "get_attendance_booking_user",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Booking User profile ID; `client_id` is the literal wire name"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/booking_user_include"
            },
            "description": "Related resources to include; values are literal API keys"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking User retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/booking_user_resource"
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "$ref": "#/components/schemas/includedResource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to read this Booking User",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Booking User or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path parameter or unavailable include",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/clients/{client_id}/attendances_statistic": {
      "get": {
        "tags": [
          "Booking Users"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Booking User Location Attendance Statistics",
        "description": "Retrieve attendance counts, financial totals, last successful attendance,\nand deposits for one Booking User in a Location. Statistics remain\navailable for a deleted Booking User profile.\n\nThe `client_id` path parameter and `client_attendances_statistic` resource\ntype are literal legacy wire names.\n",
        "operationId": "get_booking_user_location_attendance_statistics",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Booking User profile ID; `client_id` is the literal wire name"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking User Location attendance statistics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/location_attendance_statistics_resource"
                    },
                    "included": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/deposit_resource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "client_attendances_statistic",
                    "id": "146915197_720441",
                    "attributes": {
                      "company_id": 720441,
                      "successful_attendances_count": 12,
                      "failed_attendances_count": 1,
                      "balance_amount": 40,
                      "spent_amount": 520,
                      "paid_amount": 560,
                      "last_successful_attendance_datetime": "2026-07-15 16:30:00"
                    },
                    "relationships": {
                      "deposits": {
                        "data": []
                      }
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No Booking User access for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Booking User or Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/clients/{client_id}/chain_attendances_statistic/{chain_id}": {
      "get": {
        "tags": [
          "Booking Users"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Booking User Chain Attendance Statistics",
        "description": "Retrieve attendance counts, financial totals, last successful attendance,\nand deposits for one Booking User across a Chain. The Business User must\nhave Appointment form access configured for the requested Chain.\n\nThe `client_id` path parameter and\n`client_chain_attendances_statistic` resource type are literal legacy wire\nnames.\n",
        "operationId": "get_booking_user_chain_attendance_statistics",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID used to authorize the request"
          },
          {
            "name": "client_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Booking User profile ID; `client_id` is the literal wire name"
          },
          {
            "name": "chain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Chain ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking User Chain attendance statistics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/chain_attendance_statistics_resource"
                    },
                    "included": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/deposit_resource"
                      }
                    },
                    "meta": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "client_chain_attendances_statistic",
                    "id": "146915197_706028",
                    "attributes": {
                      "chain_id": 706028,
                      "successful_attendances_count": 20,
                      "failed_attendances_count": 2,
                      "balance_amount": 40,
                      "spent_amount": 880,
                      "paid_amount": 920,
                      "last_successful_attendance_datetime": "2026-07-15 16:30:00"
                    },
                    "relationships": {
                      "deposits": {
                        "data": []
                      }
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No Appointment form access for this Chain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Booking User, Location, or Chain not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid path parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{location_id}/custom_fields": {
      "get": {
        "tags": [
          "Custom Fields"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Custom Fields",
        "description": "Retrieve Custom Fields configured for Appointments and Booking Users in a\nLocation. Access depends on the Business User's Custom Field permissions.\n\nThe literal `record` and `client` filter values mean Appointment and\nBooking User respectively. `filter[entity_slug]` is a compatibility alias\nfor `filter[parent_entity_type]`.\n",
        "operationId": "list_custom_fields",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "location_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "filter[parent_entity_type]",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "record",
                "client"
              ]
            },
            "description": "Filter by Appointment or Booking User wire entity value"
          },
          {
            "name": "filter[entity_slug]",
            "in": "query",
            "required": false,
            "deprecated": true,
            "schema": {
              "type": "string",
              "enum": [
                "record",
                "client"
              ]
            },
            "description": "Compatibility alias for `filter[parent_entity_type]`"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "uniqueItems": true,
              "items": {
                "type": "string",
                "enum": [
                  "custom_field_type",
                  "ui_options"
                ]
              }
            },
            "description": "Include Custom Field type or interface options"
          }
        ],
        "responses": {
          "200": {
            "description": "Custom Fields retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/custom_field_resource"
                      }
                    },
                    "included": {
                      "type": "array",
                      "description": "Resources requested through `include`, when available",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/custom_field_type_resource"
                          },
                          {
                            "$ref": "#/components/schemas/custom_field_ui_option_resource"
                          }
                        ]
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "custom_field",
                      "id": "81",
                      "attributes": {
                        "code": "preferred_color",
                        "slug": "preferred_color",
                        "parent_entity_type": "client",
                        "entity_slug": "client",
                        "relation_entity_type": null,
                        "show_in_ui": true,
                        "is_visible": true,
                        "title": "Preferred color",
                        "user_can_edit": true,
                        "is_editable": true,
                        "is_required": false,
                        "weight": 10,
                        "values": []
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No Custom Field access for this Location",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          },
          "422": {
            "description": "Invalid filter or include value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error_response"
                }
              }
            }
          }
        }
      }
    },
    "/locations/{company_id}/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "List Tags",
        "description": "Returns all Tags for the specified Location, optionally filtered by entity type.\n\nResponse uses [JSON:API](https://jsonapi.org/) format where `type: \"tag\"` is the resource type name (not to be confused with `entity_type` attribute).\n\n**Entity types:**\n- `common` (0) - General tags\n- `client` (1) - Booking User Tags\n- `record` (2) - Appointment Tags\n- `activity` (3) - Event Tags\n\nUse the `entity` query parameter to filter by type. Accepts both string aliases and numeric values.\n",
        "operationId": "list_tags",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "entity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "common",
                "client",
                "record",
                "activity",
                "0",
                "1",
                "2",
                "3"
              ]
            },
            "description": "Filter by entity type (alias or numeric code)",
            "example": "client"
          }
        ],
        "responses": {
          "200": {
            "description": "Tags retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "type",
                          "id",
                          "attributes"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "tag"
                          },
                          "id": {
                            "type": "string",
                            "example": "241625"
                          },
                          "attributes": {
                            "$ref": "#/components/schemas/tag_attributes"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "type": "tag",
                      "id": "241625",
                      "attributes": {
                        "company_id": 68570,
                        "title": "VIP Booking User",
                        "color": "#ff2828",
                        "font_color": "#ffffff",
                        "icon": "star",
                        "entity_type": "client",
                        "is_deleted": false,
                        "is_editable": true
                      }
                    },
                    {
                      "type": "tag",
                      "id": "241626",
                      "attributes": {
                        "company_id": 68570,
                        "title": "Regular Booking User",
                        "color": "#009800",
                        "font_color": "#ffffff",
                        "icon": "user",
                        "entity_type": "client",
                        "is_deleted": false,
                        "is_editable": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - No permission to manage this Location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "description": "Error metadata is open by design. Production may add diagnostic\nfields over time, and local development builds may include\nadditional exception details. API consumers should ignore unknown fields.\n",
                      "additionalProperties": true,
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Create Tag",
        "description": "Creates a new Tag for the specified Location.\n",
        "operationId": "create_tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "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": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "title",
                  "color"
                ],
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Tag name",
                    "example": "VIP Booking User"
                  },
                  "color": {
                    "type": "string",
                    "description": "Tag color in",
                    "example": "#ff2828"
                  },
                  "entity": {
                    "type": "integer",
                    "description": "Entity type (0 - general, 1 - Booking User, 2 - Appointment, 3 - Event)",
                    "enum": [
                      0,
                      1,
                      2,
                      3
                    ],
                    "default": 0
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name",
                    "example": "star"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Tag created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "tag"
                        },
                        "id": {
                          "type": "string",
                          "example": "241627"
                        },
                        "attributes": {
                          "$ref": "#/components/schemas/tag_attributes"
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "tag",
                    "id": "241627",
                    "attributes": {
                      "company_id": 68570,
                      "title": "VIP Booking User",
                      "color": "#ff2828",
                      "font_color": "#ffffff",
                      "icon": "star",
                      "entity_type": "client",
                      "is_deleted": false,
                      "is_editable": true
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid entity type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error - Missing required fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Required parameter title was not passed. Enter a category name"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/locations/{company_id}/tags/{tag_id}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Get Tag",
        "description": "Returns detailed information about a specific Tag.\n\nResponse uses [JSON:API](https://jsonapi.org/) format where `type: \"tag\"` is the resource type name.\n",
        "operationId": "get_tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Tag ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag details retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "example": "tag"
                        },
                        "id": {
                          "type": "string",
                          "example": "241625"
                        },
                        "attributes": {
                          "$ref": "#/components/schemas/tag_attributes"
                        }
                      }
                    },
                    "meta": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "type": "tag",
                    "id": "241625",
                    "attributes": {
                      "company_id": 68570,
                      "title": "VIP Booking User",
                      "color": "#ff2828",
                      "font_color": "#ffffff",
                      "icon": "star",
                      "entity_type": "client",
                      "is_deleted": false,
                      "is_editable": true
                    }
                  },
                  "meta": []
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Tag 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": "Not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Update Tag",
        "description": "Updates an existing Tag.\n",
        "operationId": "update_tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "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": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Tag ID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Tag name",
                    "example": "VIP Booking User"
                  },
                  "color": {
                    "type": "string",
                    "description": "Tag color in",
                    "example": "#ff2828"
                  },
                  "entity": {
                    "type": "integer",
                    "description": "Entity type (0 - general, 1 - Booking User, 2 - Appointment, 3 - Event)",
                    "enum": [
                      0,
                      1,
                      2,
                      3
                    ]
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name",
                    "example": "star"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Tag updated successfully"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Tag is not editable or belongs to another Location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "Category cannot be changed"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Tag 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": "Not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "security": [
          {
            "BearerPartnerUser": []
          }
        ],
        "summary": "Delete Tag",
        "description": "Deletes a Tag by marking it as deleted.\n",
        "operationId": "delete_tag",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Bearer {partner_token}, User {user_token}"
          },
          {
            "name": "company_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Location ID"
          },
          {
            "name": "tag_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Tag ID"
          }
        ],
        "responses": {
          "204": {
            "description": "Tag deleted successfully"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - Tag is not editable or belongs to another Location",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false
                    },
                    "data": {
                      "type": "null"
                    },
                    "meta": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Tag 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": "Not found"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}