Create a claim link
curl --request POST \
--url https://api.scrip.dev/v1/redemptions/{id}/claim-link \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/redemptions/{id}/claim-link"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/redemptions/{id}/claim-link', 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/redemptions/{id}/claim-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/redemptions/{id}/claim-link"
req, _ := http.NewRequest("POST", 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.post("https://api.scrip.dev/v1/redemptions/{id}/claim-link")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/redemptions/{id}/claim-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"claim_url": "https://claim.example.com/abc123",
"expires_at": "2024-01-15T11:30:00Z",
"provider": "TREMENDOUS",
"status": "SUCCEEDED"
}{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "conflict",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource already exists or state conflict"
}{
"code": "unprocessable",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Business rule violation"
}{
"code": "internal_error",
"message": "An internal error occurred"
}{
"code": "claim_link_provider_error",
"message": "The fulfillment provider failed to mint a claim link"
}{
"code": "provider_unavailable",
"message": "The fulfillment provider is currently unavailable; retry the request"
}Running your program
Create a claim link
Create a claim link for a successfully fulfilled redemption.
POST
/
v1
/
redemptions
/
{id}
/
claim-link
Create a claim link
curl --request POST \
--url https://api.scrip.dev/v1/redemptions/{id}/claim-link \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.scrip.dev/v1/redemptions/{id}/claim-link"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.scrip.dev/v1/redemptions/{id}/claim-link', 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/redemptions/{id}/claim-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/redemptions/{id}/claim-link"
req, _ := http.NewRequest("POST", 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.post("https://api.scrip.dev/v1/redemptions/{id}/claim-link")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrip.dev/v1/redemptions/{id}/claim-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"claim_url": "https://claim.example.com/abc123",
"expires_at": "2024-01-15T11:30:00Z",
"provider": "TREMENDOUS",
"status": "SUCCEEDED"
}{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}{
"code": "conflict",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource already exists or state conflict"
}{
"code": "unprocessable",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Business rule violation"
}{
"code": "internal_error",
"message": "An internal error occurred"
}{
"code": "claim_link_provider_error",
"message": "The fulfillment provider failed to mint a claim link"
}{
"code": "provider_unavailable",
"message": "The fulfillment provider is currently unavailable; retry the request"
}Retrieve a claim link for a successfully fulfilled redemption. Send no request body. Use this endpoint when the initial redemption response has no link, when an order completes later, or when a participant returns to access their card.
Redemption GET/list responses and webhooks do not include links. The returned URL can be the same as an earlier link, and creating a link does not guarantee that earlier links become invalid.
expires_at appears only when the fulfillment account reports a link expiry.
See Deliver the claim link for the participant’s flow. Always retrieve a missing link for the existing redemption to avoid ordering a second card.
Errors
| Error | What to do |
|---|---|
409 claim_link_not_ready | Wait for fulfillment to finish, then request the link. |
422 claim_link_not_applicable | Use a redemption that has managed fulfillment. |
422 claim_link_fulfillment_failed | The order failed, so there is no card to claim. |
422 claim_link_unsupported | The fulfillment account does not support claim-link delivery. |
503 provider_unavailable | Retry this endpoint for the same redemption with backoff. |
503 provider_connections_not_configured | Link creation is unavailable. Contact support. |
502 claim_link_provider_error | The link could not be created. Investigate the error before retrying. |
Authorizations
ApiKeyAuthBearerAuth
API key passed in the X-API-Key header.
Path Parameters
Redemption ID
Response
Usable claim link
URL the participant can use to access the fulfilled reward
Example:
"https://claim.example.com/abc123"
Link expiry, present only when the provider reports one
Example:
"2024-01-15T11:30:00Z"
Fulfillment provider name
Example:
"TREMENDOUS"
Fulfillment lifecycle status (always SUCCEEDED on a 200 response)
Available options:
SUCCEEDED Example:
"SUCCEEDED"