curl --request POST \
--url http://localhost:8080/promo-groups \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"period_discounts": {
"1": 10,
"6": 20
},
"server_discount_percent": 0,
"traffic_discount_percent": 0,
"device_discount_percent": 0,
"auto_assign_total_spent_kopeks": 123,
"apply_discounts_to_addons": true,
"is_default": false
}
'{
"id": 123,
"name": "<string>",
"server_discount_percent": 123,
"traffic_discount_percent": 123,
"device_discount_percent": 123,
"apply_discounts_to_addons": true,
"is_default": true,
"period_discounts": {},
"auto_assign_total_spent_kopeks": 123,
"members_count": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}curl --request POST \
--url http://localhost:8080/promo-groups \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"period_discounts": {
"1": 10,
"6": 20
},
"server_discount_percent": 0,
"traffic_discount_percent": 0,
"device_discount_percent": 0,
"auto_assign_total_spent_kopeks": 123,
"apply_discounts_to_addons": true,
"is_default": false
}
'{
"id": 123,
"name": "<string>",
"server_discount_percent": 123,
"traffic_discount_percent": 123,
"device_discount_percent": 123,
"apply_discounts_to_addons": true,
"is_default": true,
"period_discounts": {},
"auto_assign_total_spent_kopeks": 123,
"members_count": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Словарь скидок по длительности подписки. Ключ — количество месяцев, значение — скидка в процентах. Например: {1: 10, 6: 20}.
Show child attributes
{ "1": 10, "6": 20 }Successful Response
Show child attributes