curl --request PATCH \
--url https://api.synctera.com/v2/cash/barcodes/{barcode_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "BLOCKED"
}
'import requests
url = "https://api.synctera.com/v2/cash/barcodes/{barcode_id}"
payload = { "status": "BLOCKED" }
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({status: 'BLOCKED'})
};
fetch('https://api.synctera.com/v2/cash/barcodes/{barcode_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/v2/cash/barcodes/{barcode_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([
'status' => 'BLOCKED'
]),
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/v2/cash/barcodes/{barcode_id}"
payload := strings.NewReader("{\n \"status\": \"BLOCKED\"\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/v2/cash/barcodes/{barcode_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"BLOCKED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.synctera.com/v2/cash/barcodes/{barcode_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 \"status\": \"BLOCKED\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "123e4567-e89b-12d3-a456-426614174001",
"barcode_number": "839650172948537162049873516238",
"creation_time": "2023-10-01T12:00:00Z",
"currency": "USD",
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"customer_latitude": 40.73061,
"customer_longitude": -73.935242,
"id": "123e4567-e89b-12d3-a456-426614174002",
"last_updated_time": "2023-10-01T12:00:00Z",
"max_amount": 1000,
"min_amount": 10,
"status": "AVAILABLE",
"tenant": "abcdef_ghijkl",
"timestamp_valid_to": "2023-10-01T12:00:00Z",
"type": "CASH_DEPOSIT",
"external_device_id": "device123",
"memo": "Cash deposit - Downtown 5th Ave store",
"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
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}Update a barcode
Update a barcode
curl --request PATCH \
--url https://api.synctera.com/v2/cash/barcodes/{barcode_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "BLOCKED"
}
'import requests
url = "https://api.synctera.com/v2/cash/barcodes/{barcode_id}"
payload = { "status": "BLOCKED" }
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({status: 'BLOCKED'})
};
fetch('https://api.synctera.com/v2/cash/barcodes/{barcode_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/v2/cash/barcodes/{barcode_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([
'status' => 'BLOCKED'
]),
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/v2/cash/barcodes/{barcode_id}"
payload := strings.NewReader("{\n \"status\": \"BLOCKED\"\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/v2/cash/barcodes/{barcode_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"BLOCKED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.synctera.com/v2/cash/barcodes/{barcode_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 \"status\": \"BLOCKED\"\n}"
response = http.request(request)
puts response.read_body{
"account_id": "123e4567-e89b-12d3-a456-426614174001",
"barcode_number": "839650172948537162049873516238",
"creation_time": "2023-10-01T12:00:00Z",
"currency": "USD",
"customer_id": "123e4567-e89b-12d3-a456-426614174000",
"customer_latitude": 40.73061,
"customer_longitude": -73.935242,
"id": "123e4567-e89b-12d3-a456-426614174002",
"last_updated_time": "2023-10-01T12:00:00Z",
"max_amount": 1000,
"min_amount": 10,
"status": "AVAILABLE",
"tenant": "abcdef_ghijkl",
"timestamp_valid_to": "2023-10-01T12:00:00Z",
"type": "CASH_DEPOSIT",
"external_device_id": "device123",
"memo": "Cash deposit - Downtown 5th Ave store",
"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
}{
"code": "BAD_REQUEST_BODY",
"detail": "Missing required fields: first_name, dob",
"status": 400
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the generated barcode.
"123e4567-e89b-12d3-a456-426614174002"
Body
Status of the barcode.
BLOCKED Response
Successful update of barcode
ID of the account for which the barcode was generated.
"123e4567-e89b-12d3-a456-426614174001"
The generated barcode number.
"839650172948537162049873516238"
Timestamp of when the barcode was created.
"2023-10-01T12:00:00Z"
ISO 4217 Alpha-3 currency code for the cash transaction.
USD ID of the customer for whom the barcode was generated.
"123e4567-e89b-12d3-a456-426614174000"
Latitude of the customer location.
-90 <= x <= 9040.73061
Longitude of the customer location.
-180 <= x <= 180-73.935242
ID of the generated barcode.
"123e4567-e89b-12d3-a456-426614174002"
Timestamp of the last update to the barcode.
"2023-10-01T12:00:00Z"
Maximum amount for the cash transaction.
1000
Minimum amount for the cash transaction.
10
Status of the barcode.
AVAILABLE, BLOCKED, REDEEMED The id of the tenant containing the resource.
"abcdef_ghijkl"
Timestamp indicating the expiration time of the barcode. Always set to 15 minutes after the creation time.
"2023-10-01T12:00:00Z"
Type of the barcode.
CASH_DEPOSIT ID of the external device used for the barcode generation.
64"device123"
A short memo that will be inherited by all transactions created with this barcode.
255"Cash deposit - Downtown 5th Ave store"
Any additional custom metadata related to the barcode. * Can contain up to 10 key-value pairs with up to 200 characters each.
Show child attributes
Show child attributes
Was this page helpful?

