curl --request PATCH \
--url https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "shipped",
"tracking_reference": "1Z999AA10123456784"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'shipped', tracking_reference: '1Z999AA10123456784'})
};
fetch('https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment"
payload = {
"status": "shipped",
"tracking_reference": "1Z999AA10123456784"
}
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/redemptions/{id}/fulfillment",
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([
'status' => 'shipped',
'tracking_reference' => '1Z999AA10123456784'
]),
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;
}Update fulfillment status
Advances a shipping redemption through its lifecycle. id is the
redemption’s id from the list endpoint (not the 8-character code).
shipped— stampsshipped_at. Sendtracking_referencewith it so the customer can follow the parcel in the app.delivered— stampsdelivered_at, and backfillsshipped_atif you skipped the shipped step.cancelled— refunds the customer’s points by default, moves the redemption’sstatustocancelled, and releases the reward’s redemption slot (a reward that its cap had closed reopens). Sendrefund_points: falseto cancel without paying the points back.
The refund and the status transition happen in a single database function, so cancelling is atomic and idempotent: a retry of the same cancel pays out nothing a second time. Billing is deliberately not reversed — the per-transaction fee charged for the original claim stands.
tracking_reference: "" is stored as null.
curl --request PATCH \
--url https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "shipped",
"tracking_reference": "1Z999AA10123456784"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'shipped', tracking_reference: '1Z999AA10123456784'})
};
fetch('https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/redemptions/{id}/fulfillment"
payload = {
"status": "shipped",
"tracking_reference": "1Z999AA10123456784"
}
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/redemptions/{id}/fulfillment",
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([
'status' => 'shipped',
'tracking_reference' => '1Z999AA10123456784'
]),
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;
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Path Parameters
Body
shipped, delivered, cancelled 255"1Z999AA10123456784"
Only read when status is cancelled. Defaults to true:
the points the customer spent are credited straight back to
their balance. Send false to cancel without a refund — for
example when you have already settled with the customer some
other way, or the goods were delivered and later returned
under your own returns policy.