curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/subscriptions/{subscription}/renewal-date \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 30
}'{
"data": {
"id": 123,
"number": "<string>",
"offer_id": 123,
"offer_name": "<string>",
"price": 123,
"currency": "<string>",
"status": "<string>",
"is_trial": true,
"cancel_reason": "<string>",
"payment_system_type": "<string>",
"payment_system_name": "<string>",
"coupon_id": 123,
"trial_ended_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"subscriber": {
"id": 123,
"user_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>",
"phone": "<string>",
"email": "<string>",
"notes": "<string>",
"tags": "<string>",
"is_active": true,
"is_blocked": true,
"last_active_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"utm_tags": {},
"custom_fields": {}
}
}
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}Подписки
Изменить дату платежа
Переносит дату следующего платежа активной подписки на дату или вперёд на количество дней.
PATCH
/
api
/
v1
/
bot
/
{bot}
/
subscriptions
/
{subscription}
/
renewal-date
curl --request PATCH \
--url https://app.zenedu.io/api/v1/bot/{bot}/subscriptions/{subscription}/renewal-date \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 30
}'{
"data": {
"id": 123,
"number": "<string>",
"offer_id": 123,
"offer_name": "<string>",
"price": 123,
"currency": "<string>",
"status": "<string>",
"is_trial": true,
"cancel_reason": "<string>",
"payment_system_type": "<string>",
"payment_system_name": "<string>",
"coupon_id": 123,
"trial_ended_at": "2023-11-07T05:31:56Z",
"expired_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"subscriber": {
"id": 123,
"user_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"username": "<string>",
"phone": "<string>",
"email": "<string>",
"notes": "<string>",
"tags": "<string>",
"is_active": true,
"is_blocked": true,
"last_active_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"utm_tags": {},
"custom_fields": {}
}
}
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"code": "<string>",
"current_plan": "<string>",
"upgrade_url": "<string>"
}Тело
application/json
Pass exactly one of renewal_date or days.