### GET /companies/{location_id}/activities Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Retrieve activities for a company within a date range, optionally filtered by search, staff, or services. **Required Parameters:** - `filter[from]` - start date/time (format: YYYY-MM-DD HH:MM:SS) - `filter[to]` - end date/time (format: YYYY-MM-DD HH:MM:SS) **Optional Filters:** - `filter[master_ids][]` - filter by staff IDs (array) - `filter[service_ids][]` - filter by service IDs (array) - `filter[capacity]` - filter by capacity (number) - `search` - search by activity name or description (string) - `limit` - results per page (default: 100) - `offset` - pagination offset (default: 0) ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **location_id** (integer, path, required): Location (business) ID - **filter[from]** (string (date-time), query, required): Start date/time (example: "2026-01-02 10:00:00") - **filter[to]** (string (date-time), query, required): End date/time (example: "2026-01-05 18:00:00") - **filter[master_ids][]** (array (integer), query, optional): Filter by staff IDs - **filter[service_ids][]** (array (integer), query, optional): Filter by service IDs - **filter[capacity]** (integer, query, optional): Filter by capacity - **search** (string, query, optional): Search by activity name or description - **limit** (integer, query, optional): Maximum number of results to return - **offset** (integer, query, optional): Number of results to skip ### Responses #### 200 - List of activities - **success** (boolean) (example: true) - **data** (array (object)) Array items: - **id** (integer) (example: 1) - **company_id** (integer) - **name** (string) (example: "Yoga Class") - **description** (string) - **datetime** (string (date-time)) - **staff_id** (integer) - **service_id** (integer) - **comment** (string) - **created_at** (string (date-time)) - **updated_at** (string (date-time)) - **meta** (object) - **pagination** (object) - **total** (integer) - **limit** (integer) - **offset** (integer) #### 400 - Bad Request - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - **success** (boolean) (example: false) - **data** (null) - **meta** (object) ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{location_id}/activities?filter[from]=2026-01-02 10:00:00&filter[to]=2026-01-05 18:00:00&filter[master_ids][]=item1,item2&filter[service_ids][]=item1,item2&filter[capacity]=0&search=string&limit=100&offset=0" ``` ``` -------------------------------- ### GET /companies/{company_id}/positions Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Returns all staff positions for the specified company. Response uses [JSON:API](https://jsonapi.org/) format where `type: "position"` is the resource type. **Positions** define organizational roles and can be assigned to staff members. Positions are stored at the salon group level but accessed via company. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **limit** (integer, query, optional): Maximum number of results to return - **offset** (integer, query, optional): Number of results to skip for pagination ### Responses #### 200 - Positions retrieved successfully - **data** (array (object)) Array items: - **type** (string) (example: "position") - **id** (string) (example: "42") - **attributes** (object) - **chain_id** (integer): Salon group (chain) ID (example: 5) - **title** (string): Position name (example: "Senior Stylist") - **description** (string): Position description (example: "Senior hair stylist with color specialization") - **services_binding_type** (string (none|optional|required)) (example: "none") ("none"|"optional"|"required") - **rules_required_fields** (array (string)) (example: ["phone","email"]) - **only_chain_appointment** (boolean) (example: false) - **salon_ids** (array (integer)) (example: [1,2,3]) - **meta** (object) - **pagination** (object) - **total** (integer) - **limit** (integer) - **offset** (integer) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 403 - Forbidden - No permission to read positions - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 404 - Company not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{company_id}/positions?limit=100&offset=0" ``` ``` -------------------------------- ### GET /companies/{location_id}/activities/{event_id} Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Returns detailed information about a specific Event using v2 API. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **location_id** (integer, path, required): Location (business) ID - **event_id** (integer, path, required): Event ID ### Responses #### 200 - Event details retrieved successfully - **data** (object): Event details (JSON:API format) - **type** (string) (example: "activity") - **id** (string) (example: "10126531") - **attributes** (object) - **master_id** (integer) - **staff_id** (integer) - **service_id** (integer) - **timestamp** (integer) - **length** (integer) - **capacity** (integer) - **clients_count** (integer) - **color** (string) - **instructions** (string) - **stream_link** (string) - **font_color** (string) - **notified** (boolean) - **comment** (string,null) - **schedule_id** (integer,null) - **schedule_till** (string,null) - **schedule_event_modified** (string,null) - **date** (string (date-time)) - **meta** (array (object)) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 403 - Forbidden - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 404 - Event not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Not found") ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{location_id}/activities/{event_id}" ``` ``` -------------------------------- ### GET /companies/{company_id}/tags/{tag_id} Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Returns detailed information about a specific tag. Response uses [JSON:API](https://jsonapi.org/) format where `type: "tag"` is the resource type name. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **tag_id** (integer, path, required): Tag ID ### Responses #### 200 - Tag details retrieved successfully - **data** (object) - **type** (string) (example: "tag") - **id** (string) (example: "241625") - **attributes** (object): Tag attributes (v2 API JSON:API format) - **company_id** (integer) (required): Company (location) ID (example: 68570) - **title** (string) (required): Tag name (example: "VIP client") - **color** (string) (required): Tag background color in (example: "#ff2828") - **font_color** (string): Tag font color in (example: "#ffffff") - **icon** (string): Icon name (example: "star") - **entity_type** (string (common|client|record|activity)) (required): Entity type slug (example: "client") ("common"|"client"|"record"|"activity") - **is_deleted** (boolean) (required): Whether the tag is deleted (example: false) - **is_editable** (boolean) (required): Whether the tag can be edited/deleted (example: true) - **salon_id** (integer): Deprecated: Use company_id instead (example: 68570) - **entity** (integer): Deprecated: Use entity_type instead. Numeric entity type (0-common, 1-client, 2-record, 3-activity) (example: 1) - **entity_slug** (string): Deprecated: Use entity_type instead (example: "client") - **deleted** (integer): Deprecated: Use is_deleted instead. (0 - not deleted, 1 - deleted) (example: 0) - **not_editable** (integer): Deprecated: Use is_editable instead. (0 - editable, 1 - not editable) (example: 0) - **meta** (array (object)) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 403 - Forbidden - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 404 - Tag not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Not found") ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{company_id}/tags/{tag_id}" ``` ``` -------------------------------- ### GET /companies/{company_id}/positions/{position_id} Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Retrieve details of a specific position by ID. Response uses [JSON:API](https://jsonapi.org/) format where `type: "position"` is the resource type. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **position_id** (integer, path, required): Position ID ### Responses #### 200 - Position retrieved successfully - **data** (object) - **type** (string) (example: "position") - **id** (string) (example: "42") - **attributes** (object) - **chain_id** (integer) - **title** (string) - **description** (string) - **services_binding_type** (string) - **rules_required_fields** (array (string)) - **only_chain_appointment** (boolean) - **salon_ids** (array (integer)) - **meta** (object) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - No permission to read this position - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 404 - Position not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{company_id}/positions/{position_id}" ``` ``` -------------------------------- ### GET /companies/{company_id}/tags Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Returns all tags for the specified company, optionally filtered by entity type. Response uses [JSON:API](https://jsonapi.org/) format where `type: "tag"` is the resource type name (not to be confused with `entity_type` attribute). **Entity types:** - `common` (0) - General tags - `client` (1) - Client tags - `record` (2) - Appointment/record tags - `activity` (3) - Activity/event tags Use the `entity` query parameter to filter by type. Accepts both string aliases and numeric values. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **entity** (string (common|client|record|activity|0|1|2|3), query, optional): Filter by entity type (alias or numeric code) ### Responses #### 200 - Tags retrieved successfully - **data** (array (object)) Array items: - **type** (string) (example: "tag") - **id** (string) (example: "241625") - **attributes** (object): Tag attributes (v2 API JSON:API format) - **company_id** (integer) (required): Company (location) ID (example: 68570) - **title** (string) (required): Tag name (example: "VIP client") - **color** (string) (required): Tag background color in (example: "#ff2828") - **font_color** (string): Tag font color in (example: "#ffffff") - **icon** (string): Icon name (example: "star") - **entity_type** (string (common|client|record|activity)) (required): Entity type slug (example: "client") ("common"|"client"|"record"|"activity") - **is_deleted** (boolean) (required): Whether the tag is deleted (example: false) - **is_editable** (boolean) (required): Whether the tag can be edited/deleted (example: true) - **salon_id** (integer): Deprecated: Use company_id instead (example: 68570) - **entity** (integer): Deprecated: Use entity_type instead. Numeric entity type (0-common, 1-client, 2-record, 3-activity) (example: 1) - **entity_slug** (string): Deprecated: Use entity_type instead (example: "client") - **deleted** (integer): Deprecated: Use is_deleted instead. (0 - not deleted, 1 - deleted) (example: 0) - **not_editable** (integer): Deprecated: Use is_editable instead. (0 - editable, 1 - not editable) (example: 0) - **meta** (array (object)) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 403 - Forbidden - No permission to manage this company - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 404 - Company not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Not found") ### Example Usage ```bash curl -X GET "https://api.alteg.io/api/v2/companies/{company_id}/tags?entity=common" ``` ``` -------------------------------- ### API Overview: Business Management Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Next-generation B2B API with improved design and consistency. **Base URL:** `https://api.alteg.io/api` ## 🚀 Version Status **V2 is in active development.** This API version is being actively developed and expanded. New features and improvements are released here first. We recommend using V2 for all new integrations. ## Authentication Requires both partner and user authorization: ``` Authorization: Bearer , User ``` ## About v2 V2 endpoints offer improved request/response structures and consistent naming. This collection is actively growing as we modernize the API. ```yaml # Business Management # Version: 2.0.0 Next-generation B2B API with improved design and consistency. **Base URL:** `https://api.alteg.io/api` ## 🚀 Version Status **V2 is in active development.** This API version is being actively developed and expanded. New features and improvements are released here first. We recommend using V2 for all new integrations. ## Authentication Requires both partner and user authorization: ``` Authorization: Bearer , User ``` ## About v2 V2 endpoints offer improved request/response structures and consistent naming. This collection is actively growing as we modernize the API. # Base URL: https://api.alteg.io/api/v2 ``` -------------------------------- ### POST /companies/{company_id}/positions Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Creates a new staff position for the specified company. At least one salon ID must be provided. ```markdown ### Parameters - **Accept** (string, header, required) - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID ### Request Body **Content-Type:** application/json - **title** (string) (required): Position name (example: "Senior Stylist") - **description** (string): Position description (optional) (example: "Senior hair stylist with color specialization") - **salon_ids** (array (integer)) (required): IDs of salons where this position is available (example: [1,2,3]) ### Responses #### 201 - Position created successfully - **data** (object) - **type** (string) (example: "position") - **id** (string) (example: "42") - **attributes** (object) - **chain_id** (integer) - **title** (string) - **description** (string) - **services_binding_type** (string) - **rules_required_fields** (array (string)) - **only_chain_appointment** (boolean) - **salon_ids** (array (integer)) - **meta** (object) #### 400 - Bad Request - Invalid request parameters - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - No permission to create positions - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 404 - Company not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 422 - Validation Error - Missing or invalid required fields - **success** (boolean) (example: false) - **data** (null) - **errors** (object) (example: {"title":["Title is required"],"salon_ids":["At least one salon must be selected"]}) ### Example Usage ```bash curl -X POST "https://api.alteg.io/api/v2/companies/{company_id}/positions" \ -H "Content-Type: application/json" \ -d '{ "title": "Senior Stylist", "description": "Senior hair stylist with color specialization", "salon_ids": [ 1, 2, 3 ] }' ``` ``` -------------------------------- ### POST /companies/{location_id}/activities/{event_id}/records Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Creates an Appointment for a Client in an Event using v2 API. **Note:** All client fields are required even when using existing client ID. ```markdown ### Parameters - **Accept** (string, header, required) - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **location_id** (integer, path, required): Location (business) ID - **event_id** (integer, path, required): Event ID ### Request Body **Content-Type:** application/json - **client_id** (integer): Existing client ID (deprecated, use client.id instead) (example: 123456) - **client** (object) (required): Client information - **id** (integer): Client ID for existing client (example: 123456) - **name** (string) (required): First name (example: "John") - **phone** (string) (required): Phone number (example: "+13155550175") - **email** (string) (required): Email address (example: "john@example.com") - **surname** (string) (required): Last name (example: "Smith") - **patronymic** (string) - **gender** (integer) (required): Gender: 0 - unknown, 1 - male, 2 - female (example: 0) ("0"|"1"|"2") - **birthday** (string (date)) - **custom_field_values** (array (object)) Array items: - **code** (string): Custom field name - **value** (string): Custom field value - **agreements** (array (object)) Array items: - **is_newsletter_allowed** (boolean): Newsletter consent - **is_personal_data_processing_allowed** (boolean): Personal data processing consent - **comer_id** (integer): Visitor ID (alternative to client) (example: 500) - **comer** (object): Visitor information (alternative to client) - **name** (string): Visitor name (example: "Guest User") - **labels** (array (integer)): Tag IDs for this appointment (example: [1,2]) - **clients_count** (integer) (required): Number of participants/slots to reserve (example: 1) ### Responses #### 201 - Appointment created successfully - **data** (object): Created appointment details (JSON:API format) - **type** (string) (example: "record") - **id** (string) (example: "624798251") - **attributes** (object) - **company_id** (integer) - **external_id** (string) - **visit_id** (integer) - **booking_user_id** (integer) - **bookform_id** (integer) - **master_id** (integer) - **staff_id** (integer) - **client_id** (integer) - **comer_id** (integer,null) - **source** (integer) - **attendance** (integer) - **attendance_status** (integer) - **attendance_status_slug** (string) - **client_fictive_name** (string,null) - **client_fictive_phone** (string,null) - **client_fictive_email** (string,null) - **clients_count** (integer) - **activity_id** (integer) - **custom_color** (string) - **custom_font_color** (string) - **length** (integer) - **duration** (integer) - **paid_full** (integer) - **is_paid** (boolean) - **is_overpaid** (boolean) - **timestamp** (integer) - **date** (string (date-time)) - **created_datetime** (string (date-time)) - **from_url** (string) - **is_mobile** (integer) - **comment** (string) - **prepaid_status** (integer) - **record_from** (string) - **payment_status** (integer) - **is_sale_bill_printed** (boolean) - **is_client_notification_sent** (boolean) - **meta** (array (object)) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 404 - Event not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Not found") #### 422 - Validation errors - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "An error has occurred") - **errors** (object): Field-level validation errors ### Example Usage ```bash curl -X POST "https://api.alteg.io/api/v2/companies/{location_id}/activities/{event_id}/records" \ -H "Content-Type: application/json" \ -d '{ "client_id": 123456, "client": { "id": 123456, "name": "John", "phone": "+13155550175", "email": "john@example.com", "surname": "Smith", "patronymic": null, "gender": 0, "birthday": "1990-01-01", "custom_field_values": "value", "agreements": "value" }, "comer_id": 500, "comer": { "name": "Guest User" }, "labels": [ 1, 2 ], "clients_count": 1 }' ``` ``` -------------------------------- ### POST /companies/{company_id}/tags Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Creates a new tag for the specified company. ```markdown ### Parameters - **Accept** (string, header, required) - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID ### Request Body **Content-Type:** application/json - **title** (string) (required): Tag name (example: "VIP Client") - **color** (string) (required): Tag color in (example: "#ff2828") - **entity** (integer): Entity type (0 - general, 1 - client, 2 - appointment, 3 - activity) ("0"|"1"|"2"|"3") - **icon** (string): Icon name (example: "star") ### Responses #### 200 - Tag created successfully - **data** (object) - **type** (string) (example: "tag") - **id** (string) (example: "241627") - **attributes** (object): Tag attributes (v2 API JSON:API format) - **company_id** (integer) (required): Company (location) ID (example: 68570) - **title** (string) (required): Tag name (example: "VIP client") - **color** (string) (required): Tag background color in (example: "#ff2828") - **font_color** (string): Tag font color in (example: "#ffffff") - **icon** (string): Icon name (example: "star") - **entity_type** (string (common|client|record|activity)) (required): Entity type slug (example: "client") ("common"|"client"|"record"|"activity") - **is_deleted** (boolean) (required): Whether the tag is deleted (example: false) - **is_editable** (boolean) (required): Whether the tag can be edited/deleted (example: true) - **salon_id** (integer): Deprecated: Use company_id instead (example: 68570) - **entity** (integer): Deprecated: Use entity_type instead. Numeric entity type (0-common, 1-client, 2-record, 3-activity) (example: 1) - **entity_slug** (string): Deprecated: Use entity_type instead (example: "client") - **deleted** (integer): Deprecated: Use is_deleted instead. (0 - not deleted, 1 - deleted) (example: 0) - **not_editable** (integer): Deprecated: Use is_editable instead. (0 - editable, 1 - not editable) (example: 0) - **meta** (array (object)) #### 400 - Bad Request - Invalid entity type - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 404 - Endpoint not found (not yet deployed) - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 422 - Validation Error - Missing required fields - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Required parameter title was not passed. Enter a category name") ### Example Usage ```bash curl -X POST "https://api.alteg.io/api/v2/companies/{company_id}/tags" \ -H "Content-Type: application/json" \ -d '{ "title": "VIP Client", "color": "#ff2828", "entity": "0", "icon": "star" }' ``` ``` -------------------------------- ### Security: Authorization Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Security scheme: user ```markdown ## Security: Authorization **Description:** Security scheme: user **Type:** apiKey ``` -------------------------------- ### PUT /companies/{company_id}/positions/{position_id} Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Update an existing staff position. Title and salon_ids are required in the request body. ```markdown ### Parameters - **Accept** (string, header, required) - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **position_id** (integer, path, required): Position ID ### Request Body **Content-Type:** application/json - **position_id** (integer) (required): Position ID (must match path parameter) (example: 42) - **title** (string) (required): Position name (example: "Senior Stylist Updated") - **description** (string): Position description (optional) (example: "Updated description") - **salon_ids** (array (integer)) (required): IDs of salons where this position is available (example: [1,2,3,4]) ### Responses #### 204 - Position updated successfully (no content) Empty response body #### 400 - Bad Request - Invalid request parameters - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - No permission to update positions - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 404 - Position not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 422 - Validation Error - Missing or invalid required fields - **success** (boolean) (example: false) - **data** (null) - **errors** (object) (example: {"title":["Title is required"],"salon_ids":["At least one salon must be selected"]}) ### Example Usage ```bash curl -X PUT "https://api.alteg.io/api/v2/companies/{company_id}/positions/{position_id}" \ -H "Content-Type: application/json" \ -d '{ "position_id": 42, "title": "Senior Stylist Updated", "description": "Updated description", "salon_ids": [ 1, 2, 3, 4 ] }' ``` ``` -------------------------------- ### POST /companies/{location_id}/activities Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Creates an Event using the v2 API. **Note:** This is the v2 version of the Events API with enhanced features. ```markdown ### Parameters - **Accept** (string, header, required): API version header - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **location_id** (integer, path, required): Location (business) ID ### Request Body **Content-Type:** application/json - **staff_id** (integer) (required): Team member ID who will conduct the event. (example: 1) - **service_id** (integer) (required): Service ID for this event. (example: 500) - **resource_instance_ids** (array (integer)) (required): List of resource instance IDs (required, can be empty array). (example: [123,432]) - **label_ids** (array (integer)) (required): List of category/tag IDs (required, can be empty array). (example: [123,432]) - **date** (string (date-time)) (required): Event date and time. (example: "2026-11-22 14:00:00") - **length** (integer) (required): Event duration in seconds. (example: 3600) - **technical_break_duration** (integer) - **capacity** (integer) (required): Number of available slots for this event. (example: 4) - **comment** (string): Event comment or description. (example: "Beginner group session") - **color** (string): Event color (hex format). (example: "#9c27b0") - **instructions** (string): Instructions for the event. (example: "Bring two balls") - **stream_link** (string): Stream link for online events. (example: "https://stream.com/some_link") - **force** (boolean): Skip resource availability check (true - skip check, false - validate). (example: false) ### Responses #### 201 - Event created successfully - **data** (object): Created event details (JSON:API format) - **type** (string) (example: "activity") - **id** (string) (example: "10126531") - **attributes** (object) - **master_id** (integer) - **staff_id** (integer) - **service_id** (integer) - **timestamp** (integer) - **length** (integer) - **capacity** (integer) - **clients_count** (integer) - **color** (string) - **instructions** (string) - **stream_link** (string) - **font_color** (string) - **notified** (boolean) - **comment** (string,null) - **schedule_id** (integer,null) - **schedule_till** (string,null) - **schedule_event_modified** (string,null) - **date** (string (date-time)) - **meta** (array (object)) #### 400 - Bad Request - invalid parameters or service not available for group event booking - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "The service is not available for group event booking") #### 401 - Unauthorized - invalid or missing authentication - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 403 - Forbidden - insufficient permissions - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 404 - Not Found - location, service, or team member not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) #### 422 - Unprocessable Entity - validation errors - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "An error has occurred") - **errors** (object): Validation errors by field (example: {"[resource_instance_ids]":["This field is missing."],"[label_ids]":["This field is missing."]}) ### Example Usage ```bash curl -X POST "https://api.alteg.io/api/v2/companies/{location_id}/activities" \ -H "Content-Type: application/json" \ -d '{ "staff_id": 1, "service_id": 500, "resource_instance_ids": [ 123, 432 ], "label_ids": [ 123, 432 ], "date": "2026-11-22 14:00:00", "length": 3600, "technical_break_duration": 300, "capacity": 4, "comment": "Beginner group session", "color": "#9c27b0", "instructions": "Bring two balls", "stream_link": "https://stream.com/some_link", "force": false }' ``` ``` -------------------------------- ### PUT /companies/{company_id}/tags/{tag_id} Source: https://developer.alteg.io/_bundle/en/b2b-v2/openapi.json Updates an existing tag. ```markdown ### Parameters - **Accept** (string, header, required) - **Content-Type** (string, header, required) - **Authorization** (string, header, required): Bearer {partner_token}, User {user_token} - **company_id** (integer, path, required): Company (location) ID - **tag_id** (integer, path, required): Tag ID ### Request Body **Content-Type:** application/json - **title** (string): Tag name (example: "VIP Client") - **color** (string): Tag color in (example: "#ff2828") - **entity** (integer): Entity type (0 - general, 1 - client, 2 - appointment, 3 - activity) ("0"|"1"|"2"|"3") - **icon** (string): Icon name (example: "star") ### Responses #### 204 - Tag updated successfully Empty response body #### 401 - Unauthorized - **success** (boolean) (example: false) - **data** (null) - **meta** (object) #### 403 - Forbidden - Tag is not editable or belongs to another company - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Category cannot be changed") #### 404 - Tag not found - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) (example: "Not found") #### 422 - Validation Error - **success** (boolean) (example: false) - **data** (null) - **meta** (object) - **message** (string) ### Example Usage ```bash curl -X PUT "https://api.alteg.io/api/v2/companies/{company_id}/tags/{tag_id}" \ -H "Content-Type: application/json" \ -d '{ "title": "VIP Client", "color": "#ff2828", "entity": "0", "icon": "star" }' ``` ```