Register a PTS device
curl --request POST \
--url https://api.rigaly.com/api/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"device_name": "Front counter",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_points": 50000,
"max_points": 50000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
device_name: 'Front counter',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
min_points: 50000,
max_points: 50000
})
};
fetch('https://api.rigaly.com/api/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/devices"
payload = {
"device_name": "Front counter",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_points": 50000,
"max_points": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/devices",
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([
'device_name' => 'Front counter',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'min_points' => 50000,
'max_points' => 50000
]),
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;
}{
"success": true,
"message": "<string>",
"data": {}
}{
"success": false,
"error": {
"message": "<string>"
}
}Devices
Register a PTS device
Creates a new POS terminal. device_name must be unique within your business; min_points/max_points bound how many points a single sale can issue (defaults 1 / 100,000). Pair the physical device afterwards with the pairing-qr endpoint or its login code.
POST
/
api
/
v1
/
devices
Register a PTS device
curl --request POST \
--url https://api.rigaly.com/api/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"device_name": "Front counter",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_points": 50000,
"max_points": 50000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
device_name: 'Front counter',
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
min_points: 50000,
max_points: 50000
})
};
fetch('https://api.rigaly.com/api/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.rigaly.com/api/v1/devices"
payload = {
"device_name": "Front counter",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_points": 50000,
"max_points": 50000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rigaly.com/api/v1/devices",
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([
'device_name' => 'Front counter',
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'min_points' => 50000,
'max_points' => 50000
]),
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;
}{
"success": true,
"message": "<string>",
"data": {}
}{
"success": false,
"error": {
"message": "<string>"
}
}Authorizations
API key from the Rigaly dashboard: Authorization: Bearer rgly_sk_...
Body
application/json