curl --request POST \
--url https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumbers": [
"<string>"
],
"address": {
"shortAddress": "<string>",
"adressLines": [
"<string>"
],
"locality": "<string>",
"administrativeArea": "<string>",
"administrativeAreaName": "<string>",
"postalCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
}
},
"userId": "<string>",
"name": "<string>",
"birthDate": "<string>",
"emails": [
"jsmith@example.com"
],
"documents": {
"CPF": {
"code": "<string>",
"issueCountry": "<string>"
},
"RG": {
"code": "<string>",
"issueCountry": "<string>"
},
"PASSPORT": {
"code": "<string>",
"issueCountry": "<string>"
},
"CNH": {
"code": "<string>",
"issueCountry": "<string>"
}
},
"loyalty": {},
"customFields": {}
}
'import requests
url = "https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers"
payload = {
"phoneNumbers": ["<string>"],
"address": {
"shortAddress": "<string>",
"adressLines": ["<string>"],
"locality": "<string>",
"administrativeArea": "<string>",
"administrativeAreaName": "<string>",
"postalCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
}
},
"userId": "<string>",
"name": "<string>",
"birthDate": "<string>",
"emails": ["jsmith@example.com"],
"documents": {
"CPF": {
"code": "<string>",
"issueCountry": "<string>"
},
"RG": {
"code": "<string>",
"issueCountry": "<string>"
},
"PASSPORT": {
"code": "<string>",
"issueCountry": "<string>"
},
"CNH": {
"code": "<string>",
"issueCountry": "<string>"
}
},
"loyalty": {},
"customFields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumbers: ['<string>'],
address: {
shortAddress: '<string>',
adressLines: ['<string>'],
locality: '<string>',
administrativeArea: '<string>',
administrativeAreaName: '<string>',
postalCode: '<string>',
country: '<string>',
timezone: '<string>',
coordinates: {lat: 123, lng: 123}
},
userId: '<string>',
name: '<string>',
birthDate: '<string>',
emails: ['jsmith@example.com'],
documents: {
CPF: {code: '<string>', issueCountry: '<string>'},
RG: {code: '<string>', issueCountry: '<string>'},
PASSPORT: {code: '<string>', issueCountry: '<string>'},
CNH: {code: '<string>', issueCountry: '<string>'}
},
loyalty: {},
customFields: {}
})
};
fetch('https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers', 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.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers",
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([
'phoneNumbers' => [
'<string>'
],
'address' => [
'shortAddress' => '<string>',
'adressLines' => [
'<string>'
],
'locality' => '<string>',
'administrativeArea' => '<string>',
'administrativeAreaName' => '<string>',
'postalCode' => '<string>',
'country' => '<string>',
'timezone' => '<string>',
'coordinates' => [
'lat' => 123,
'lng' => 123
]
],
'userId' => '<string>',
'name' => '<string>',
'birthDate' => '<string>',
'emails' => [
'jsmith@example.com'
],
'documents' => [
'CPF' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'RG' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'PASSPORT' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'CNH' => [
'code' => '<string>',
'issueCountry' => '<string>'
]
],
'loyalty' => [
],
'customFields' => [
]
]),
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.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers"
payload := strings.NewReader("{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_body/realms/{realmId}/organizations/{organizationId}/travel/passengers
curl --request POST \
--url https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumbers": [
"<string>"
],
"address": {
"shortAddress": "<string>",
"adressLines": [
"<string>"
],
"locality": "<string>",
"administrativeArea": "<string>",
"administrativeAreaName": "<string>",
"postalCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
}
},
"userId": "<string>",
"name": "<string>",
"birthDate": "<string>",
"emails": [
"jsmith@example.com"
],
"documents": {
"CPF": {
"code": "<string>",
"issueCountry": "<string>"
},
"RG": {
"code": "<string>",
"issueCountry": "<string>"
},
"PASSPORT": {
"code": "<string>",
"issueCountry": "<string>"
},
"CNH": {
"code": "<string>",
"issueCountry": "<string>"
}
},
"loyalty": {},
"customFields": {}
}
'import requests
url = "https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers"
payload = {
"phoneNumbers": ["<string>"],
"address": {
"shortAddress": "<string>",
"adressLines": ["<string>"],
"locality": "<string>",
"administrativeArea": "<string>",
"administrativeAreaName": "<string>",
"postalCode": "<string>",
"country": "<string>",
"timezone": "<string>",
"coordinates": {
"lat": 123,
"lng": 123
}
},
"userId": "<string>",
"name": "<string>",
"birthDate": "<string>",
"emails": ["jsmith@example.com"],
"documents": {
"CPF": {
"code": "<string>",
"issueCountry": "<string>"
},
"RG": {
"code": "<string>",
"issueCountry": "<string>"
},
"PASSPORT": {
"code": "<string>",
"issueCountry": "<string>"
},
"CNH": {
"code": "<string>",
"issueCountry": "<string>"
}
},
"loyalty": {},
"customFields": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumbers: ['<string>'],
address: {
shortAddress: '<string>',
adressLines: ['<string>'],
locality: '<string>',
administrativeArea: '<string>',
administrativeAreaName: '<string>',
postalCode: '<string>',
country: '<string>',
timezone: '<string>',
coordinates: {lat: 123, lng: 123}
},
userId: '<string>',
name: '<string>',
birthDate: '<string>',
emails: ['jsmith@example.com'],
documents: {
CPF: {code: '<string>', issueCountry: '<string>'},
RG: {code: '<string>', issueCountry: '<string>'},
PASSPORT: {code: '<string>', issueCountry: '<string>'},
CNH: {code: '<string>', issueCountry: '<string>'}
},
loyalty: {},
customFields: {}
})
};
fetch('https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers', 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.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers",
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([
'phoneNumbers' => [
'<string>'
],
'address' => [
'shortAddress' => '<string>',
'adressLines' => [
'<string>'
],
'locality' => '<string>',
'administrativeArea' => '<string>',
'administrativeAreaName' => '<string>',
'postalCode' => '<string>',
'country' => '<string>',
'timezone' => '<string>',
'coordinates' => [
'lat' => 123,
'lng' => 123
]
],
'userId' => '<string>',
'name' => '<string>',
'birthDate' => '<string>',
'emails' => [
'jsmith@example.com'
],
'documents' => [
'CPF' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'RG' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'PASSPORT' => [
'code' => '<string>',
'issueCountry' => '<string>'
],
'CNH' => [
'code' => '<string>',
'issueCountry' => '<string>'
]
],
'loyalty' => [
],
'customFields' => [
]
]),
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.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers"
payload := strings.NewReader("{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.travel.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/travel/passengers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumbers\": [\n \"<string>\"\n ],\n \"address\": {\n \"shortAddress\": \"<string>\",\n \"adressLines\": [\n \"<string>\"\n ],\n \"locality\": \"<string>\",\n \"administrativeArea\": \"<string>\",\n \"administrativeAreaName\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\",\n \"timezone\": \"<string>\",\n \"coordinates\": {\n \"lat\": 123,\n \"lng\": 123\n }\n },\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"birthDate\": \"<string>\",\n \"emails\": [\n \"jsmith@example.com\"\n ],\n \"documents\": {\n \"CPF\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"RG\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"PASSPORT\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n },\n \"CNH\": {\n \"code\": \"<string>\",\n \"issueCountry\": \"<string>\"\n }\n },\n \"loyalty\": {},\n \"customFields\": {}\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
MALE, FEMALE 1^\d{10,15}$Show child attributes
Show child attributes
Identity user to LINK. When present, name/emails/documents.CPF are copied from the user (do not send them) and birthDate falls back to the user record. When absent, the body is a STANDALONE passenger and name/birthDate/emails/documents become required.
1Required in standalone mode; read-only (omit) in linked mode.
1Required in standalone mode; in linked mode used only when the identity user has no birth date on record.
^\d{4}-\d{2}-\d{2}$Required in standalone mode; read-only (omit) in linked mode.
1^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Required in standalone mode (at least one of CPF/RG/PASSPORT/CNH). In linked mode CPF comes from the user (do not send documents.CPF; an empty object is fine); extra documents may be added.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Undocumented response (no code type, no existing spec).