Skip to content

Edit Chain Promotion

Request

Security
BearerPartnerUser
Path
chain_idintegerrequired

Chain ID

loyalty_program_idintegerrequired

Promotion ID

Query
includestring

Include additional resources in the answer

Enum:"applicable_items""rules""companies""loyalty_card_types""on_changed_notification_template""on_expiration_notification_template"
Bodyapplication/jsonrequired
titlestring

Share name

Example:"Cumulative discount for some services and not for goods"
usage_limitinteger, (int32)

Limit on the number of applications (only for cashback)

Example:0
expiration_timeoutinteger, (int32)

Expiration date of bonuses or discounts

Example:6
expiration_timeout_unitstring

The unit of measurement for the expiration date of bonuses or discounts

Enum:"day""week""month""year"
Example:"month"
expiration_notification_timeoutinteger, (int32)

How many days before the bonus or discount expires, a notification must be sent to the client

Example:7
loyalty_card_type_idsArray of integers, (int32)

Identifiers of types of cards for which the promotion is valid

Example:
[ 51, 29 ]
on_changed_notification_templateobject(Root Type for LoyaltyNotificationMessageTemplateRequest)

Body of the request to bind the loyalty notification template

Example:
{ "type": "custom", "body": "Message text" }
on_expiration_notification_templateobject(Root Type for LoyaltyNotificationMessageTemplateRequest)

Body of the request to bind the loyalty notification template

Example:
{ "type": "custom", "body": "Message text" }
rulesArray of objects(Root Type for LoyaltyProgramRuleRequest)

Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions)

Example:
[ { "parameter": 10, "value": 2.5, "service_id": 0 }, { "parameter": 30, "value": 7.5, "service_id": 0 } ]
location_idsArray of integers, (int32)

Identifiers of locations where the promotion is valid

Example:
[ 49 ]
allowed_service_idsArray of integers, (int32)

Service and service category identifiers (if application type is set for some services)

Example:
[ 53, 92 ]
allowed_good_idsArray of integers, (int32)

Item IDs (if application type is set for some items)

Example:
[]
allowed_good_category_idsArray of integers, (int32)

Product category identifiers (if application type is set for some products)

Example:
[]
curl -i -X PUT \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/chains/{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
      }
    ],
    "location_ids": [
      49
    ]
  }'

Responses

OK

Bodyapplication/json
idinteger, (int32)

Stock ID

Example:34
titlestring

Share name

Example:"Cumulative discount for some services and not for goods"
typestring

Promotion type

Enum:"discount_static""discount_accumulative_visits""discount_accumulative_sold""discount_accumulative_paid""cashback_static_sold""cashback_static_paid""cashback_accumulative_paid""cashback_accumulative_sold""cashback_accumulative_paid_visits""cashback_accumulative_sold_visits"
Example:"discount_accumulative_paid"
service_item_typestring

Type of application to services

Enum:"any_allowed""not_allowed""custom_allowed"
Example:"custom_allowed"
good_item_typestring

Type of application to products

Enum:"any_allowed""not_allowed""custom_allowed"
Example:"not_allowed"
value_unitstring

Bonus or discount measurement unit (percentage, fixed amount)

Enum:"percent""amount"
Example:"percent"
usage_limitinteger, (int32)

Limit on the number of applications (only for cashback)

Example:0
visit_multiplicityinteger, (int32)

Multiplicity of application by visits (only for cashback)

Example:0
sold_items_multiplicityinteger, (int32)

How many services you need to pay to get a discount on promotional services (only for the type of promotion "Discount by condition")

Example:0
expiration_timeoutinteger, (int32)

Expiration date of bonuses or discounts

Example:6
expiration_timeout_unitstring

The unit of measurement for the expiration date of bonuses or discounts

Enum:"day""week""month""year"
Example:"month"
expiration_notification_timeoutinteger, (int32)

How many days before the bonus or discount expires, a notification must be sent to the client

Example:7
params_source_typestring

Where to get the client's history to calculate the size of the bonus or discount (for accumulation promotions or conditional discounts)

Enum:"loyalty_card""active_companies""chain"
Example:"chain"
history_start_datestring, (date)

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)

Example:"2026-09-21"
on_changed_notification_template_idinteger, (int32)

Notification template ID when changing bonus or discount

Example:55
on_expiration_notification_template_idinteger, (int32)

Identifier of the notification template when a bonus or discount burns

Example:84
loyalty_card_typesArray of objects(Root Type for LoyaltyCardType)

Type of cards for which the promotion is valid (on request)

Example:
[ { "id": 51, "title": "Card type 1" }, { "id": 29, "title": "Card type 2" } ]
on_changed_notification_templateobject(Root Type for LoyaltyNotificationMessageTemplate)

Loyalty notification template

Example:
{ "id": 12, "type": "small", "message_type": "loyalty_discount_expiration", "body": "Your discount expires tomorrow" }
on_expiration_notification_templateobject(Root Type for LoyaltyNotificationMessageTemplate)

Loyalty notification template

Example:
{ "id": 12, "type": "small", "message_type": "loyalty_discount_expiration", "body": "Your discount expires tomorrow" }
rulesArray of objects(Root Type for LoyaltyProgramRule)

Rules for determining the value of the bonus or discount (only one rule is allowed for fixed promotions) (on request)

Example:
[ { "id": 94, "parameter": 10, "value": 2.5, "loyalty_program_id": 34, "loyalty_type_id": 3, "service_id": 0 }, { "id": 74, "parameter": 30, "value": 7.5, "loyalty_program_id": 34, "loyalty_type_id": 3, "service_id": 0 } ]
companiesArray of objects(company)

Locations where the promotion is valid (on request)

Example:
[ { "id": 49, "title": "Location", "country": "United States", "country_id": 5, "city": "New York", "city_id": 83, "phone": "+13155550175", "timezone": "America/New_York", "address": "Location address", "coordinate_lat": 40.73061, "coordinate_lng": 18.63 } ]
applicable_itemsArray of objects(Root Type for LoyaltyEntityAttendanceItem)

Related entities for selective application of the promotion (on request)

Example:
[ { "id": 53, "title": "Service category 1", "is_service": true, "is_category": true }, { "id": 92, "title": "Service category 2", "is_service": true, "is_category": true } ]
Response
{ "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": [ { … }, { … } ] }