Skip to main content
PATCH
/
cabinet
/
admin
/
promo-offers
/
templates
/
{template_id}
Update Template
curl --request PATCH \
  --url http://localhost:8080/cabinet/admin/promo-offers/templates/{template_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "message_text": "<string>",
  "button_text": "<string>",
  "valid_hours": 2,
  "discount_percent": 1,
  "bonus_amount_kopeks": 1,
  "active_discount_hours": 2,
  "test_duration_hours": 2,
  "test_squad_uuids": [
    "<string>"
  ],
  "is_active": true
}
'
{
  "id": 123,
  "name": "<string>",
  "offer_type": "<string>",
  "message_text": "<string>",
  "button_text": "<string>",
  "valid_hours": 123,
  "discount_percent": 123,
  "bonus_amount_kopeks": 123,
  "is_active": true,
  "active_discount_hours": 123,
  "test_duration_hours": 123,
  "test_squad_uuids": [
    "<string>"
  ],
  "created_by": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Path Parameters

template_id
integer
required

Body

application/json
name
string | null
message_text
string | null
button_text
string | null
valid_hours
integer | null
Required range: x >= 1
discount_percent
integer | null
Required range: x >= 0
bonus_amount_kopeks
integer | null
Required range: x >= 0
active_discount_hours
integer | null
Required range: x >= 1
test_duration_hours
integer | null
Required range: x >= 1
test_squad_uuids
string[] | null
is_active
boolean | null

Response

Successful Response

id
integer
required
name
string
required
offer_type
string
required
message_text
string
required
button_text
string
required
valid_hours
integer
required
discount_percent
integer
required
bonus_amount_kopeks
integer
required
is_active
boolean
required
active_discount_hours
integer | null
test_duration_hours
integer | null
test_squad_uuids
string[]
created_by
integer | null
created_at
string<date-time> | null
updated_at
string<date-time> | null