SDK
import { createVoyantConnectClient } from "@voyant-travel/connect-sdk";
const connect = createVoyantConnectClient({ apiKey: process.env.VOYANT_API_KEY });
const result = await connect.operators.get("<operatorId>");curl --request GET \
--url https://api.voyant.travel/connect/v1/operators/<operatorId> \
--header 'Authorization: Bearer <token>'const response = await fetch("https://api.voyant.travel/connect/v1/operators/<operatorId>", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.voyant.travel/connect/v1/operators/<operatorId>",
headers={
"Authorization": "Bearer <token>"
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/connect/v1/operators/{operatorId}",
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://api.voyant.travel/connect/v1/operators/{operatorId}"
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://api.voyant.travel/connect/v1/operators/{operatorId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/connect/v1/operators/{operatorId}")
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": "<string>",
"slug": "<string>",
"name": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"voyantPlatformId": "<string>",
"voyantOrganizationId": "<string>",
"contactEmail": "<string>",
"contactName": "<string>",
"metadata": {},
"accessType": "owned",
"grantId": "<string>",
"grantScopes": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}Operators
Get an operator
Fetches a single operator by id. Requires ownership or an active grant.
GET
/
connect
/
v1
/
operators
/
{operatorId}
SDK
import { createVoyantConnectClient } from "@voyant-travel/connect-sdk";
const connect = createVoyantConnectClient({ apiKey: process.env.VOYANT_API_KEY });
const result = await connect.operators.get("<operatorId>");curl --request GET \
--url https://api.voyant.travel/connect/v1/operators/<operatorId> \
--header 'Authorization: Bearer <token>'const response = await fetch("https://api.voyant.travel/connect/v1/operators/<operatorId>", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.voyant.travel/connect/v1/operators/<operatorId>",
headers={
"Authorization": "Bearer <token>"
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/connect/v1/operators/{operatorId}",
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://api.voyant.travel/connect/v1/operators/{operatorId}"
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://api.voyant.travel/connect/v1/operators/{operatorId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/connect/v1/operators/{operatorId}")
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": "<string>",
"slug": "<string>",
"name": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "<string>",
"voyantPlatformId": "<string>",
"voyantOrganizationId": "<string>",
"contactEmail": "<string>",
"contactName": "<string>",
"metadata": {},
"accessType": "owned",
"grantId": "<string>",
"grantScopes": [
"<string>"
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}Authorizations
Provide either a static platform API key or an OAuth2 access token (from /connect/v1/oauth/token) as Authorization: Bearer <token>. Scopes are connect:* (e.g. connect:bookings:write).
Path Parameters
Operator id.
Response
An operator.
Available options:
active, deactivated Available options:
owned, granted ⌘I