cURL
curl --request POST \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reward_id": 123,
"multiplier": 123,
"variant_id": "<string>",
"shopify_action_id": "<string>",
"attribution": "redemption_notification"
}
'import requests
url = "https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards"
payload = {
"reward_id": 123,
"multiplier": 123,
"variant_id": "<string>",
"shopify_action_id": "<string>",
"attribution": "redemption_notification"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reward_id: 123,
multiplier: 123,
variant_id: '<string>',
shopify_action_id: '<string>',
attribution: 'redemption_notification'
})
};
fetch('https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards', 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.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reward_id' => 123,
'multiplier' => 123,
'variant_id' => '<string>',
'shopify_action_id' => '<string>',
'attribution' => 'redemption_notification'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards"
payload := strings.NewReader("{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}"
response = http.request(request)
puts response.read_body{
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"point_cost": 123,
"redeemable": {
"redeemable_type": "<string>",
"fulfilled": true,
"fulfilled_at": "<string>",
"expires_on": null
},
"reward": {
"id": 123,
"title": "<string>",
"title_template": "<string>",
"description": "<string>",
"sort_key": 123,
"content": {},
"point_cost": 123,
"method": "<string>",
"discount_amount": 123,
"minimum_spend": 123,
"usage_limit": 123,
"min_redemption_amount": 123,
"max_redemption_amount": 123,
"max_free_shipping": null,
"site_id": 123,
"target_site": {
"id": 123,
"name": "<string>",
"url": "<string>"
},
"order_type": "<string>",
"target_type": "<string>",
"target_collections": [
{
"id": 123,
"url": "<string>",
"restriction_text": "<string>"
}
],
"target_products": [
{
"inventory_count": 123,
"sort_key": 123,
"id": 123,
"variant_id": 123,
"sku": "<string>",
"url": "<string>",
"image_url": "<string>",
"title": "<string>",
"handle": "<string>"
}
],
"session_options": null,
"auto_refund_seconds": null,
"expiry_options": {
"kind": "<string>",
"seconds": null
},
"redeemable_expiry_options": null,
"supported_channels": [],
"available_countries": [
"<string>"
],
"kind": "<string>",
"recurring_cycle_limit": 123
},
"session": {
"token": "<string>"
},
"auto_refund_at": "<string>",
"expires_at": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": "<string>"
}Customers
Redeem Reward
POST
/
v2
/
customers
/
{merchant_id}
/
claimed_rewards
cURL
curl --request POST \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reward_id": 123,
"multiplier": 123,
"variant_id": "<string>",
"shopify_action_id": "<string>",
"attribution": "redemption_notification"
}
'import requests
url = "https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards"
payload = {
"reward_id": 123,
"multiplier": 123,
"variant_id": "<string>",
"shopify_action_id": "<string>",
"attribution": "redemption_notification"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reward_id: 123,
multiplier: 123,
variant_id: '<string>',
shopify_action_id: '<string>',
attribution: 'redemption_notification'
})
};
fetch('https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards', 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.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reward_id' => 123,
'multiplier' => 123,
'variant_id' => '<string>',
'shopify_action_id' => '<string>',
'attribution' => 'redemption_notification'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards"
payload := strings.NewReader("{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers/{merchant_id}/claimed_rewards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reward_id\": 123,\n \"multiplier\": 123,\n \"variant_id\": \"<string>\",\n \"shopify_action_id\": \"<string>\",\n \"attribution\": \"redemption_notification\"\n}"
response = http.request(request)
puts response.read_body{
"claimed_reward": {
"id": 123,
"claimed_at": "<string>",
"point_cost": 123,
"redeemable": {
"redeemable_type": "<string>",
"fulfilled": true,
"fulfilled_at": "<string>",
"expires_on": null
},
"reward": {
"id": 123,
"title": "<string>",
"title_template": "<string>",
"description": "<string>",
"sort_key": 123,
"content": {},
"point_cost": 123,
"method": "<string>",
"discount_amount": 123,
"minimum_spend": 123,
"usage_limit": 123,
"min_redemption_amount": 123,
"max_redemption_amount": 123,
"max_free_shipping": null,
"site_id": 123,
"target_site": {
"id": 123,
"name": "<string>",
"url": "<string>"
},
"order_type": "<string>",
"target_type": "<string>",
"target_collections": [
{
"id": 123,
"url": "<string>",
"restriction_text": "<string>"
}
],
"target_products": [
{
"inventory_count": 123,
"sort_key": 123,
"id": 123,
"variant_id": 123,
"sku": "<string>",
"url": "<string>",
"image_url": "<string>",
"title": "<string>",
"handle": "<string>"
}
],
"session_options": null,
"auto_refund_seconds": null,
"expiry_options": {
"kind": "<string>",
"seconds": null
},
"redeemable_expiry_options": null,
"supported_channels": [],
"available_countries": [
"<string>"
],
"kind": "<string>",
"recurring_cycle_limit": 123
},
"session": {
"token": "<string>"
},
"auto_refund_at": "<string>",
"expires_at": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": "<string>"
}Authorizations
ProgramApiKeySiteTokenSecret
An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header
Path Parameters
The ID of the customer in your platform or ecommerce store. The reward will be redeemed for this customer
Body
application/json
Body
The ID of the reward to claim
The number of times to claim this reward in a single request. Only supported for store_fulfilment custom rewards; voucher-method rewards reject a multiplier greater than 1, as each claim requires a unique code.
The Shopify variant being claimed. Required when the reward is a seamless product reward
Available options:
redemption_notification Show child attributes
Show child attributes
Response
201
Show child attributes
Show child attributes
⌘I