List agencies
curl --request GET \
--url https://api.stage.origin.one/api/v2/agencies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/agencies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/agencies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"code": "FAA",
"id": "3",
"object": "agency",
"name": "Federal Aviation Administration (FAA)",
"jobCategories": [
{
"id": "3987402f-e963-45a9-8799-b9ea6621adae",
"name": "Flight Crewmember",
"object": "jobCategory",
"url": "/api/v2/agencies/3/jobCategories/3987402f-e963-45a9-8799-b9ea6621adae"
}
],
"url": "/api/v2/agencies/3"
}
],
"limit": 10,
"page": 1,
"total": 1
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Agencies
List agencies
Returns the regulatory agencies an order can name, with their job categories, ordered by code. Requires the agency.list scope.
GET
/
api
/
v2
/
agencies
List agencies
curl --request GET \
--url https://api.stage.origin.one/api/v2/agencies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/agencies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/agencies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"code": "FAA",
"id": "3",
"object": "agency",
"name": "Federal Aviation Administration (FAA)",
"jobCategories": [
{
"id": "3987402f-e963-45a9-8799-b9ea6621adae",
"name": "Flight Crewmember",
"object": "jobCategory",
"url": "/api/v2/agencies/3/jobCategories/3987402f-e963-45a9-8799-b9ea6621adae"
}
],
"url": "/api/v2/agencies/3"
}
],
"limit": 10,
"page": 1,
"total": 1
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Authorizations
Origin One API token. Pass it in the Authorization header: Authorization: Bearer <token>.
Query Parameters
Number of items per page (max 20).
Required range:
1 <= x <= 20Example:
10
Page of results to return (1-based).
Required range:
1 <= x <= 10000Example:
1