Export all codes
curl --request GET \
--url https://api.rigaly.com/api/v1/code-batches/{id}/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/code-batches/{id}/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/code-batches/{id}/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/code-batches/{id}/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;
}"code,serial,deep_link\nSUMMER-595Y-000-JT5-A5Q,0,HTTPS://LINK.RIGALY.COM/CODE/595Y000JT5A5Q\n"{
"success": false,
"error": {
"message": "Reward not found"
}
}Code batches
Export all codes
Streams every code in the batch (regenerated deterministically). CSV columns are code,serial,deep_link. Hand the file to your manufacturer/printer and have each deep_link printed as a QR code — scanning it opens the Rigaly app with the code ready to claim.
GET
/
api
/
v1
/
code-batches
/
{id}
/
export
Export all codes
curl --request GET \
--url https://api.rigaly.com/api/v1/code-batches/{id}/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rigaly.com/api/v1/code-batches/{id}/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/code-batches/{id}/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/code-batches/{id}/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;
}"code,serial,deep_link\nSUMMER-595Y-000-JT5-A5Q,0,HTTPS://LINK.RIGALY.COM/CODE/595Y000JT5A5Q\n"{
"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
Code file (streamed download)
The response is of type string.
Example:
"code,serial,deep_link\nSUMMER-595Y-000-JT5-A5Q,0,HTTPS://LINK.RIGALY.COM/CODE/595Y000JT5A5Q\n"