Get loyalty programs
curl --request GET \
--url https://spaportal.cz/api/v1/loyalty-programs \
--header 'Authorization: Bearer <token>'import requests
url = "https://spaportal.cz/api/v1/loyalty-programs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://spaportal.cz/api/v1/loyalty-programs', 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://spaportal.cz/api/v1/loyalty-programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spaportal.cz/api/v1/loyalty-programs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spaportal.cz/api/v1/loyalty-programs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v1/loyalty-programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"_id": "66f16191f739705faa020007",
"id": 1,
"name": {
"cs_CZ": "VIP Club Gold",
"de": "VIP Club Gold",
"en": "VIP Club Gold"
}
}
]{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Catalog
Get loyalty programs
Returns loyalty programs available to the authenticated API key.
For shared API keys spanning multiple companies, duplicate programs with the same id and localized name are deduplicated.
GET
/
loyalty-programs
Get loyalty programs
curl --request GET \
--url https://spaportal.cz/api/v1/loyalty-programs \
--header 'Authorization: Bearer <token>'import requests
url = "https://spaportal.cz/api/v1/loyalty-programs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://spaportal.cz/api/v1/loyalty-programs', 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://spaportal.cz/api/v1/loyalty-programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://spaportal.cz/api/v1/loyalty-programs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://spaportal.cz/api/v1/loyalty-programs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://spaportal.cz/api/v1/loyalty-programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"_id": "66f16191f739705faa020007",
"id": 1,
"name": {
"cs_CZ": "VIP Club Gold",
"de": "VIP Club Gold",
"en": "VIP Club Gold"
}
}
]{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}Authorizations
bearerAuthaccessTokenQuery
See Authentication for how to obtain and send your API key.
Headers
Comma-separated list of languages to include. See Localization for details.
Example:
"cs_CZ,de"
Query Parameters
Number of records to return.
Required range:
1 <= x <= 100Number of records to skip.
Required range:
x >= 0