User authentication and session management for B2B integrations
- List membership types
Business Management (1.0.0)
Full-featured B2B API for business operations.
Base URL: https://api.alteg.io/api
V1 will be gradually deprecated. We recommend using V2 API for new integrations. V1 endpoints are maintained for backward compatibility, but new features will be released in V2 only.
Request
Modifies the validity period (duration) of a subscription (membership).
This changes how long the subscription remains active before expiring.
Period units:
- 1 = day
- 2 = week
- 3 = month
- 4 = year
Use cases:
- Extend expiration as customer service gesture
- Adjust period after policy changes
- Correct administrative errors
Note: Requires chain-level permissions.
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/abonements/{membership_id}/set_period
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/abonements/{membership_id}/set_period
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/706028/loyalty/abonements/123/set_period \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"period": 90,
"period_unit_id": 1
}'{ "success": true, "data": { "id": 123, "period": 90, "period_unit_id": 1, "expiration_date": "2026-03-31T23:59:59+00:00" }, "meta": [] }
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/abonement_types
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/abonement_types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/706028/loyalty/abonement_types \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>'{ "success": true, "data": [ { … } ], "meta": { "total_count": 5 } }
Request
Creates a new membership type at the chain level. Membership types define reusable packages (e.g., "10 visits", "Monthly unlimited") that can be sold across multiple locations in the chain.
Important API Differences:
servicesandservice_categoriesmust be objects (key-value pairs), not arrays- Example:
{"service_id": count}not[service_id] - Some legacy documentation shows arrays, but the real API requires objects
Note: Requires chain-level permissions.
Object with service category IDs as keys and usage count as values. For separate balance: count = number of visits per category. For unified balance: count value is ignored (set to any number or 0).
Important: This is an object (key-value pairs), NOT an array.
Balance type: true = unified balance, false = separate balance
List of location IDs where this membership type is available
Freeze period unit: 1 = day, 2 = week, 3 = month, 4 = year
Whether service price can be adjusted when using membership
Activation type: 1 = on sale, 2 = on first use, 3 = from specific date
Personal vs shared subscription.
- true = personal (only purchaser can use)
- false = shared (multiple people can use with code)
Balance adjustment permission: 0 = prohibited, 1 = only at sale location, 2 = at all locations
Whether online sale is enabled. If true, online_sale_price becomes required.
Subscription description for online sale
Price for online sale (required if is_online_sale_enabled = true)
Autoactivation time unit: 1 = days, 2 = weeks, 3 = months, 4 = years
List of location IDs where this membership type is available
Object with service IDs as keys and usage count as values. For separate balance: count = number of visits per service. For unified balance: use empty object {}.
Important: This is an object (key-value pairs), NOT an array.
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/abonement_types
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/abonement_types
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/1/loyalty/abonement_types \
-H 'Accept: application/vnd.api.v2+json' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"title": "Fitness 10-pack",
"salon_group_id": 1,
"cost": 500,
"location_ids": [
123,
456
],
"period": 30,
"period_unit_id": 3,
"allow_freeze": true,
"freeze_limit": 14,
"freeze_limit_unit_id": 1,
"service_price_correction": true,
"expiration_type_id": 1,
"is_allow_empty_code": true,
"is_united_balance": false,
"united_balance_services_count": 10,
"balance_edit_type_id": 2,
"is_online_sale_enabled": false,
"online_sale_title": "Fitness Pack - 10 sessions",
"online_sale_description": "Perfect for beginners. Valid for 3 months.",
"online_sale_price": 450,
"online_image": "https://example.com/images/fitness-pack.jpg",
"autoactivation_period": 3,
"autoactivation_time_in_days": 10,
"autoactivation_time_unit_id": 1,
"is_archived": false,
"category": "standard",
"salon_ids": [
720441,
703092
],
"services": {
"13160808": 5,
"13160809": 3
},
"service_categories": {
"13160806": 10
},
"delete_online_image": false,
"availability": [
{
"week_days": [
1,
2,
3
],
"intervals": [
{
"from": 28800,
"to": 64800
}
]
}
]
}'{ "success": true, "data": { "id": 777, "salon_group_id": 333, "category_id": null, "title": "10-visit subscription", "period": 10, "period_unit_id": 3, "allow_freeze": true, "freeze_limit": 30, "freeze_limit_unit_id": 1, "is_booking_when_frozen_allowed": false, "is_allow_empty_code": false, "is_united_balance": true, "is_united_balance_unlimited": false, "is_code_required": false, "balance_edit_type_id": 1, "cost": 1000, "chain_price_min": 1000, "chain_price_max": 1500, "is_chain": true, "expiration_type_id": 1, "expiration_type_title": "On sale", "category": null, "weight": 0, "abonements_count": 0, "is_online_sale_enabled": false, "online_sale_title": "10-visit subscription", "online_sale_description": "Sold online with discount", "online_sale_price": 550, "service_price_correction": true, "united_balance_services_count": 10, "autoactivation_time": 10, "autoactivation_time_unit_id": 1, "attached_location_ids": [ … ], "attached_salon_ids": [ … ], "online_sale_image": "https://example.com/images/subscription_type.png", "is_archived": false, "date_archived": null, "availability": [ … ], "balance_container": { … } }, "meta": [] }