v1

latestOpenAPI 3.0.02026-07-26868170.3 KB
Reward

Update a reward

Edit the data of an existing reward. All new granted rewards will inherit of the updated data.

patch/loyalty/v1/rewards/{id}

Path parameters

idstring required

Reward external identifier.

Request body

namestring
descriptionstring
rich_descriptionstring
image_urlstring
external_idstring
forced_validityboolean
forced_valitidy_endstring
forced_validity_startstring
holding_daysinteger
max_attribution_countinteger
monetaryboolean
monetary_typestring
monetary_valuenumber
nqp_valueinteger
valitidy_interval_countinteger
validity_interval_typestring

Example request

{
  "name": "Nom",
  "description": "Description",
  "rich_description": "Rich description",
  "image_url": "/path/to/picture",
  "external_id": "reward_ext_id_12",
  "forced_validity": true,
  "forced_valitidy_end": "2024-08-27 17:19:00",
  "forced_validity_start": "2024-08-27 17:19:00",
  "max_attribution_count": 1000,
  "monetary": true,
  "monetary_type": "percentage | value",
  "nqp_value": 12,
  "valitidy_interval_count": 1,
  "validity_interval_type": "days;weeks;months;years"
}

Response

Reward has successfully been updated.