curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"asset_id": "550e8400-e29b-41d4-a716-446655440002",
"auto_managed": false,
"available_from": "2024-01-01T00:00:00Z",
"available_until": "2024-12-31T23:59:59Z",
"category": "Gift Cards",
"committed_units": 42,
"created_at": "2024-01-15T10:30:00Z",
"delivered_units": 39,
"description": "Redeemable for a $10 gift card",
"display": {
"description_html": "<p>Use this gift card online or in store.</p>",
"disclosure_html": "<p>Valid in the United States.</p>",
"image_url": "https://images.example.com/gift-card.png",
"instructions_html": "<p>Present the gift card at checkout.</p>"
},
"face_currency": "USD",
"face_value_minor": 1000,
"fulfillment": {
"account_status": "ACTIVE",
"asset_scale": 2,
"countries": [
"US"
],
"currencies": [
"USD"
],
"delivery_method": "claim_link",
"denominations_minor": [
1000,
2500
],
"rate": "1.5",
"value_max_minor": 10000,
"value_min_minor": 500
},
"fulfillment_product_id": "550e8400-e29b-41d4-a716-446655440004",
"id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "CUSTOM",
"max_per_participant": 2,
"max_total": 100,
"metadata": {},
"name": "$10 Gift Card",
"pending_units": 3,
"program_id": "550e8400-e29b-41d4-a716-446655440001",
"redemption_type": "UNIT_BASED",
"reward_source_id": "550e8400-e29b-41d4-a716-446655440003",
"status": "ACTIVE",
"unit_cost": "1000.00",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}Get a reward
Retrieve a specific reward by ID.
curl --request GET \
--url https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/programs/{programId}/rewards/{rewardId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"asset_id": "550e8400-e29b-41d4-a716-446655440002",
"auto_managed": false,
"available_from": "2024-01-01T00:00:00Z",
"available_until": "2024-12-31T23:59:59Z",
"category": "Gift Cards",
"committed_units": 42,
"created_at": "2024-01-15T10:30:00Z",
"delivered_units": 39,
"description": "Redeemable for a $10 gift card",
"display": {
"description_html": "<p>Use this gift card online or in store.</p>",
"disclosure_html": "<p>Valid in the United States.</p>",
"image_url": "https://images.example.com/gift-card.png",
"instructions_html": "<p>Present the gift card at checkout.</p>"
},
"face_currency": "USD",
"face_value_minor": 1000,
"fulfillment": {
"account_status": "ACTIVE",
"asset_scale": 2,
"countries": [
"US"
],
"currencies": [
"USD"
],
"delivery_method": "claim_link",
"denominations_minor": [
1000,
2500
],
"rate": "1.5",
"value_max_minor": 10000,
"value_min_minor": 500
},
"fulfillment_product_id": "550e8400-e29b-41d4-a716-446655440004",
"id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "CUSTOM",
"max_per_participant": 2,
"max_total": 100,
"metadata": {},
"name": "$10 Gift Card",
"pending_units": 3,
"program_id": "550e8400-e29b-41d4-a716-446655440001",
"redemption_type": "UNIT_BASED",
"reward_source_id": "550e8400-e29b-41d4-a716-446655440003",
"status": "ACTIVE",
"unit_cost": "1000.00",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "bad_request",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "<string>",
"field": "<string>",
"fields": [
{
"expected": "<unknown>",
"field": "<string>",
"message": "This field is required",
"reason": "required",
"received": "<string>"
}
],
"reason": "invalid",
"received": "<string>"
},
"message": "Resource not found"
}{
"code": "internal_error",
"message": "An internal error occurred"
}UNIT_BASED rewards, committed_units is inventory in use, pending_units is awaiting fulfillment, and delivered_units is captured. On AMOUNT_BASED rewards, all three are null.
For gift cards, fulfillment contains the supported card values, currencies, and pricing details. Optional display content provides images and descriptions. Use the returned reward to show and redeem a gift card.
Authorizations
API key passed in the X-API-Key header.
Response
Reward details
A reward with its pricing, inventory, availability, and metadata
Asset used to price this reward
"550e8400-e29b-41d4-a716-446655440002"
Whether the catalog sync manages this item's lifecycle automatically
false
Start of the availability window (RFC 3339, null if always available)
"2024-01-01T00:00:00Z"
End of the availability window (RFC 3339, null if no end date)
"2024-12-31T23:59:59Z"
Grouping label for organizing rewards in the catalog
"Gift Cards"
UNIT_BASED units currently consuming inventory. Includes delivered and pending units. Null for AMOUNT_BASED rewards.
42
When this reward was created (RFC 3339)
"2024-01-15T10:30:00Z"
UNIT_BASED units whose redemption has been captured. Null for AMOUNT_BASED rewards.
39
Details about the reward
"Redeemable for a $10 gift card"
Product content for displaying a managed reward
Show child attributes
Show child attributes
ISO 4217 currency of the face value (PROVIDER items only)
"USD"
Pinned face value in minor units (fixed-denomination PROVIDER items only)
1000
Supported values, currencies, delivery, and pricing for managed rewards
Show child attributes
Show child attributes
Product ordered when this reward is redeemed. Present for managed rewards (kind PROVIDER).
"550e8400-e29b-41d4-a716-446655440004"
Unique identifier for this reward
"550e8400-e29b-41d4-a716-446655440000"
Whether you created the reward directly (CUSTOM) or Scrip manages it through a reward source (PROVIDER)
"CUSTOM"
Per-participant redemption limit (UNIT_BASED only, null = unlimited)
2
Global inventory limit (UNIT_BASED only, null = unlimited)
100
Custom key-value data attached to this reward
Display name for this reward
"$10 Gift Card"
UNIT_BASED units awaiting fulfillment. Null for AMOUNT_BASED rewards.
3
Program this reward belongs to
"550e8400-e29b-41d4-a716-446655440001"
How the reward is redeemed: UNIT_BASED (discrete quantities) or AMOUNT_BASED (variable amounts)
"UNIT_BASED"
Reward source that supplies this managed reward
"550e8400-e29b-41d4-a716-446655440003"
Lifecycle status: DRAFT, ACTIVE, OUT_OF_STOCK, or ARCHIVED
"ACTIVE"
Fixed price per unit. For variable-value managed rewards, use fulfillment.rate to calculate the charge.
"1000.00"
When this reward was last modified (RFC 3339)
"2024-01-15T10:30:00Z"