User authentication and session management for B2B integrations
- Delete Chain Promotion
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.
The unit of measurement for the expiration date of bonuses or discounts
How many days before the bonus or discount expires, a notification must be sent to the client
Identifiers of types of cards for which the promotion is valid
Body of the request to bind the loyalty notification template
Body of the request to bind the loyalty notification template
Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions)
Identifiers of locations where the promotion is valid
Service and service category identifiers (if application type is set for some services)
Item IDs (if application type is set for some items)
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/programs/{loyalty_program_id}
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/programs/{loyalty_program_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/programs/{loyalty_program_id}?include=applicable_items' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"title": "Cumulative discount for some services and not for goods",
"allowed_service_ids": [
53,
92
],
"allowed_good_ids": [],
"allowed_good_category_ids": [],
"usage_limit": 0,
"expiration_timeout": 6,
"expiration_timeout_unit": "month",
"expiration_notification_timeout": 7,
"loyalty_card_type_ids": [
51,
29
],
"on_changed_notification_template": {
"type": "custom",
"body": "Your discount has changed"
},
"on_expiration_notification_template": {
"type": "big"
},
"rules": [
{
"parameter": 10,
"value": 2.5,
"service_id": 0
},
{
"parameter": 30,
"value": 7.5,
"service_id": 0
}
],
"company_ids": [
49
]
}'OK
Promotion type
Type of application to services
Type of application to products
Bonus or discount measurement unit (percentage, fixed amount)
How many services you need to pay to get a discount on promotional services (only for the type of promotion "Discount by condition")
The unit of measurement for the expiration date of bonuses or discounts
How many days before the bonus or discount expires, a notification must be sent to the client
Where to get the client's history to calculate the size of the bonus or discount (for accumulation promotions or conditional discounts)
From what date to take into account the client's history to calculate the size of the bonus or discount (for accumulative promotions or conditional discounts)
Notification template ID when changing bonus or discount
Identifier of the notification template when a bonus or discount burns
Type of cards for which the promotion is valid (on request)
Loyalty notification template
Loyalty notification template
Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions) (on request)
Locations where the promotion is valid (on request)
{ "id": 34, "title": "Cumulative discount for some services and not for goods", "type": "discount_accumulative_paid", "service_item_type": "custom_allowed", "good_item_type": "not_allowed", "value_unit": "percent", "usage_limit": 0, "visit_multiplicity": 0, "sold_items_multiplicity": 0, "expiration_timeout": 6, "expiration_timeout_unit": "month", "expiration_notification_timeout": 7, "params_source_type": "chain", "history_start_date": "2026-09-21", "on_changed_notification_template_id": 55, "on_expiration_notification_template_id": 84, "loyalty_card_types": [ { … }, { … } ], "on_changed_notification_template": { "id": 55, "type": "custom", "body": "Your discount has changed", "message_type": "loyalty_discount_changed" }, "on_expiration_notification_template": { "id": 84, "type": "big", "body": "Detailed text about discount burning", "message_type": "loyalty_discount_expiration" }, "rules": [ { … }, { … } ], "companies": [ { … } ], "applicable_items": [ { … }, { … } ] }
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/programs/{loyalty_program_id}
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/programs/{loyalty_program_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/programs/{loyalty_program_id}?include=applicable_items' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>'Types of loyalty transactions included in the selection: 1 - Promotion discount, 2 - Loyalty program accrual, 3 - Loyalty card withdrawal, 4 - Referral program accrual, 5 - Manual replenishment, 6 - Manual withdrawal, 7 - Overdue points withdrawal , 8 - Withdrawal from the gift card, 9 - Use of the membership, 10 - Recalculation of the cost of the membership, 11 - Withdrawal from the client account
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v1/openapi/chain/{chain_id}/loyalty/transactions
- Productionhttps://api.alteg.io/api/v1/chain/{chain_id}/loyalty/transactions
- 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/{chain_id}/loyalty/transactions?created_after=2019-08-24&created_before=2019-08-24&types=1&company_ids=0&visit_ids=0&page=0&count=0' \
-H 'Accept: string' \
-H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
-H 'Content-Type: string'{ "success": true, "data": [ { … } ], "meta": { "count": 0 } }