Update a reward
curl --request PATCH \
--url https://api.rigaly.com/api/v1/rewards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": true,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Free Coffee',
description: '<string>',
points_cost: 500,
active: true,
start_date: '2023-12-25',
end_date: '2023-12-25',
time_active: {
monday: {active: true, start: '09:00', end: '17:00'},
tuesday: {active: true, start: '09:00', end: '17:00'}
},
conditions: '<string>',
cooldown_mode: 'none',
cooldown_count: 123,
cooldown_amount: 123,
birthday: false
})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}"
payload = {
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": True,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": True,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Free Coffee',
'description' => '<string>',
'points_cost' => 500,
'active' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'time_active' => [
'monday' => [
'active' => true,
'start' => '09:00',
'end' => '17:00'
],
'tuesday' => [
'active' => true,
'start' => '09:00',
'end' => '17:00'
]
],
'conditions' => '<string>',
'cooldown_mode' => 'none',
'cooldown_count' => 123,
'cooldown_amount' => 123,
'birthday' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"message": "<string>",
"data": {
"reward": {
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": true,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "standard",
"image_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}Rewards
Update a reward
Partial update — include only the fields to change (e.g. { "active": false } to disable).
PATCH
/
api
/
v1
/
rewards
/
{id}
Update a reward
curl --request PATCH \
--url https://api.rigaly.com/api/v1/rewards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": true,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Free Coffee',
description: '<string>',
points_cost: 500,
active: true,
start_date: '2023-12-25',
end_date: '2023-12-25',
time_active: {
monday: {active: true, start: '09:00', end: '17:00'},
tuesday: {active: true, start: '09:00', end: '17:00'}
},
conditions: '<string>',
cooldown_mode: 'none',
cooldown_count: 123,
cooldown_amount: 123,
birthday: false
})
};
fetch('https://api.rigaly.com/api/v1/rewards/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/rewards/{id}"
payload = {
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": True,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": True,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": True,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Free Coffee',
'description' => '<string>',
'points_cost' => 500,
'active' => true,
'start_date' => '2023-12-25',
'end_date' => '2023-12-25',
'time_active' => [
'monday' => [
'active' => true,
'start' => '09:00',
'end' => '17:00'
],
'tuesday' => [
'active' => true,
'start' => '09:00',
'end' => '17:00'
]
],
'conditions' => '<string>',
'cooldown_mode' => 'none',
'cooldown_count' => 123,
'cooldown_amount' => 123,
'birthday' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"message": "<string>",
"data": {
"reward": {
"name": "Free Coffee",
"description": "<string>",
"points_cost": 500,
"active": true,
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"time_active": {
"monday": {
"active": true,
"start": "09:00",
"end": "17:00"
},
"tuesday": {
"active": true,
"start": "09:00",
"end": "17:00"
}
},
"conditions": "<string>",
"cooldown_mode": "none",
"cooldown_count": 123,
"cooldown_amount": 123,
"birthday": false,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "standard",
"image_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
Body
application/json
Example:
"Free Coffee"
Required range:
x >= 0Example:
500
Per-day time-of-day windows. Omit a day to leave it unrestricted; omit the whole field for always-active.
Show child attributes
Show child attributes
Example:
{ "monday": { "active": true, "start": "09:00", "end": "17:00" }, "tuesday": { "active": true, "start": "09:00", "end": "17:00" } }
Free-text conditions shown to customers and returned on validation — use it to encode product restrictions your system enforces.
Maximum string length:
1000Available options:
none, limit, once Available options:
minute, hour, day, month ⌘I