Export the code pool
curl --request GET \
--url https://api.rigaly.com/api/v1/rewards/{id}/pool/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/pool/export', 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}/pool/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/pool/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}"value,status,consumed_at,redemption_id\n\"NFLX-A1B2C3\",\"consumed\",\"2026-08-01T14:22:31.004Z\",\"9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67\"\n\"NFLX-D4E5F6\",\"available\",\"\",\"\"\n"{
"success": false,
"error": {
"message": "REWARD_NOT_POOL_SOURCED"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}Rewards
Export the code pool
Streams every value in the pool, consumed and unconsumed, oldest first β your reconciliation file for βwhich code went to which redemptionβ.
CSV columns are value,status,consumed_at,redemption_id, where status
is available or consumed and the last two columns are empty for
values nobody has claimed yet.
GET
/
api
/
v1
/
rewards
/
{id}
/
pool
/
export
Export the code pool
curl --request GET \
--url https://api.rigaly.com/api/v1/rewards/{id}/pool/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/rewards/{id}/pool/export', 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}/pool/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/rewards/{id}/pool/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}"value,status,consumed_at,redemption_id\n\"NFLX-A1B2C3\",\"consumed\",\"2026-08-01T14:22:31.004Z\",\"9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67\"\n\"NFLX-D4E5F6\",\"available\",\"\",\"\"\n"{
"success": false,
"error": {
"message": "REWARD_NOT_POOL_SOURCED"
}
}{
"success": false,
"error": {
"message": "Reward not found"
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
Query Parameters
Available options:
csv, json Response
Pool file (streamed download)
The response is of type string.
Example:
"value,status,consumed_at,redemption_id\n\"NFLX-A1B2C3\",\"consumed\",\"2026-08-01T14:22:31.004Z\",\"9f1c3a2e-5b7d-4e21-9a0c-1f2d3e4b5a67\"\n\"NFLX-D4E5F6\",\"available\",\"\",\"\"\n"