Patch Reward Template
curl --request PATCH \
--url https://api.synctera.com/v1/reward_templates/{reward_template_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1000,
"currency": "USD",
"description": "Referral Reward",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": true,
"metadata": {}
}
'import requests
url = "https://api.synctera.com/v1/reward_templates/{reward_template_id}"
payload = {
"amount": 1000,
"currency": "USD",
"description": "Referral Reward",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": True,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1000,
currency: 'USD',
description: 'Referral Reward',
internal_account_id: '42943c51-e4ff-4e57-9558-08cab6b963c8',
is_enabled: true,
metadata: {}
})
};
fetch('https://api.synctera.com/v1/reward_templates/{reward_template_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://api.synctera.com/v1/reward_templates/{reward_template_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' => 1000,
'currency' => 'USD',
'description' => 'Referral Reward',
'internal_account_id' => '42943c51-e4ff-4e57-9558-08cab6b963c8',
'is_enabled' => true,
'metadata' => [
]
]),
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.synctera.com/v1/reward_templates/{reward_template_id}"
payload := strings.NewReader("{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.synctera.com/v1/reward_templates/{reward_template_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.synctera.com/v1/reward_templates/{reward_template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"currency": "USD",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": true,
"creation_time": "2010-05-06T12:23:34.321Z",
"id": "85943c51-e4ff-4e57-9558-08cab6b96364",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"subtype": "ACCOUNT_OPENING_BONUS",
"tenant": "abcdef_ghijkl",
"amount": 1000,
"description": "Referral Reward",
"metadata": {}
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}Rewards
Patch Reward Template
Update a reward template by ID.
PATCH
/
reward_templates
/
{reward_template_id}
Patch Reward Template
curl --request PATCH \
--url https://api.synctera.com/v1/reward_templates/{reward_template_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1000,
"currency": "USD",
"description": "Referral Reward",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": true,
"metadata": {}
}
'import requests
url = "https://api.synctera.com/v1/reward_templates/{reward_template_id}"
payload = {
"amount": 1000,
"currency": "USD",
"description": "Referral Reward",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": True,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1000,
currency: 'USD',
description: 'Referral Reward',
internal_account_id: '42943c51-e4ff-4e57-9558-08cab6b963c8',
is_enabled: true,
metadata: {}
})
};
fetch('https://api.synctera.com/v1/reward_templates/{reward_template_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://api.synctera.com/v1/reward_templates/{reward_template_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' => 1000,
'currency' => 'USD',
'description' => 'Referral Reward',
'internal_account_id' => '42943c51-e4ff-4e57-9558-08cab6b963c8',
'is_enabled' => true,
'metadata' => [
]
]),
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.synctera.com/v1/reward_templates/{reward_template_id}"
payload := strings.NewReader("{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.synctera.com/v1/reward_templates/{reward_template_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.synctera.com/v1/reward_templates/{reward_template_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"description\": \"Referral Reward\",\n \"internal_account_id\": \"42943c51-e4ff-4e57-9558-08cab6b963c8\",\n \"is_enabled\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"currency": "USD",
"internal_account_id": "42943c51-e4ff-4e57-9558-08cab6b963c8",
"is_enabled": true,
"creation_time": "2010-05-06T12:23:34.321Z",
"id": "85943c51-e4ff-4e57-9558-08cab6b96364",
"last_updated_time": "2010-05-06T12:23:34.321Z",
"subtype": "ACCOUNT_OPENING_BONUS",
"tenant": "abcdef_ghijkl",
"amount": 1000,
"description": "Referral Reward",
"metadata": {}
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}Authorizations
Headers
An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.
Example:
"7d943c51-e4ff-4e57-9558-08cab6b963c7"
Path Parameters
Body
application/json
A short string representing the sub-type of the reward. This will be used as the subtype of the resulting transaction.
Available options:
ACCOUNT_OPENING_BONUS, CASHBACK, INTEREST_RATE_BONUS, LOAN_INTEREST_RATE_REDUCTION, MANUAL_ADJUSTMENT, MILES, MISCELLANEOUS, POINTS, REFERRAL_BONUS Response
Updated reward template
A short string representing the sub-type of the reward. This will be used as the subtype of the resulting transaction.
Available options:
ACCOUNT_OPENING_BONUS, ACCOUNT_OPENING_BONUS_REVERSAL, CASHBACK, CASHBACK_REVERSAL, INTEREST_RATE_BONUS, INTEREST_RATE_BONUS_REVERSAL, LOAN_INTEREST_RATE_REDUCTION, LOAN_INTEREST_RATE_REDUCTION_REVERSAL, MANUAL_ADJUSTMENT, MANUAL_ADJUSTMENT_REVERSAL, MILES, MILES_REVERSAL, MISCELLANEOUS, MISCELLANEOUS_REVERSAL, POINTS, POINTS_REVERSAL, REFERRAL_BONUS, REFERRAL_BONUS_REVERSAL Was this page helpful?

