Updates a reward
curl --request PATCH \
--url https://dev.sbx.imprint.co/v2/rewards/{reward_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 120000,
"status": "PENDING"
}
'import requests
url = "https://dev.sbx.imprint.co/v2/rewards/{reward_id}"
payload = {
"amount": 120000,
"status": "PENDING"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 120000, status: 'PENDING'})
};
fetch('https://dev.sbx.imprint.co/v2/rewards/{reward_id}', 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://dev.sbx.imprint.co/v2/rewards/{reward_id}",
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([
'amount' => 120000,
'status' => 'PENDING'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://dev.sbx.imprint.co/v2/rewards/{reward_id}"
payload := strings.NewReader("{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://dev.sbx.imprint.co/v2/rewards/{reward_id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/rewards/{reward_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}"
response = http.request(request)
puts response.read_body{
"id": "2EE24580-B97B-4949-A65C-929CCB9B9B8D",
"customer_id": "9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4",
"amount": 123,
"type": "TRANSACTION",
"status": "PENDING",
"created_at": "2025-02-13T19:08:07.000Z",
"transaction_event_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"currency": "POINTS",
"updated_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}Rewards
Updates a reward
Updates the status or amount of pending rewards
PATCH
/
v2
/
rewards
/
{reward_id}
Updates a reward
curl --request PATCH \
--url https://dev.sbx.imprint.co/v2/rewards/{reward_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 120000,
"status": "PENDING"
}
'import requests
url = "https://dev.sbx.imprint.co/v2/rewards/{reward_id}"
payload = {
"amount": 120000,
"status": "PENDING"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 120000, status: 'PENDING'})
};
fetch('https://dev.sbx.imprint.co/v2/rewards/{reward_id}', 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://dev.sbx.imprint.co/v2/rewards/{reward_id}",
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([
'amount' => 120000,
'status' => 'PENDING'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://dev.sbx.imprint.co/v2/rewards/{reward_id}"
payload := strings.NewReader("{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://dev.sbx.imprint.co/v2/rewards/{reward_id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.sbx.imprint.co/v2/rewards/{reward_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 120000,\n \"status\": \"PENDING\"\n}"
response = http.request(request)
puts response.read_body{
"id": "2EE24580-B97B-4949-A65C-929CCB9B9B8D",
"customer_id": "9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4",
"amount": 123,
"type": "TRANSACTION",
"status": "PENDING",
"created_at": "2025-02-13T19:08:07.000Z",
"transaction_event_id": "E777214A-2D11-4CAD-9E8F-E1BD71D9FE67",
"currency": "POINTS",
"updated_at": "2025-02-13T19:08:07.000Z",
"metadata": {
"platform_version": "2.1.0"
}
}Authorizations
basicAuthbearerAuth
Basic HTTP authentication. Allowed headers-- Authorization: Basic <base64(api_key_id:api_key_secret)>
Path Parameters
Unique identifier for the reward
Example:
"2EE24580-B97B-4949-A65C-929CCB9B9B8D"
Body
application/json
Response
200 - application/json
Reward updated successfully
Example:
"2EE24580-B97B-4949-A65C-929CCB9B9B8D"
Example:
"9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4"
reward amount in min units.
Available options:
OFFER, TRANSACTION, ONE_TIME, STATEMENT, REFERRAL Example:
"TRANSACTION"
Available options:
PENDING, AVAILABLE, PENDING_DEDUCTION, DEDUCTED Example:
"PENDING"
the RFC-3339 timestamp when the reward was created
Example:
"2025-02-13T19:08:07.000Z"
transaction that generated this reward, if applicable.
Example:
"E777214A-2D11-4CAD-9E8F-E1BD71D9FE67"
The 3-character currency code of the amount in ISO 4217 format (e.g., "USD") or a reward unit (e.g., "POINTS")
Example:
"POINTS"
the RFC-3339 timestamp when the reward was last updated
Example:
"2025-02-13T19:08:07.000Z"
Example:
{ "platform_version": "2.1.0" }