Agency Departments
Locomote Team avatar
Written by Locomote Team
Updated over a week ago

Agency Departments can be retrieved within the Locomote Corporate Travel Platform using the API. By using GET it will retrieve all Agency Departments within the database.

This data is Read Only and cannot be changed or edited by the API, which is why a "find all" (GET) is only available, whereas other resources have PATCH, POST & DELETE. A specific user does not require identifying, so there's no need to append an Employee ID to the back of the URL.

Secured by auth_token.

Authorisation via "X-USER-USERNAME" and "X-USER-TOKEN"

All Agency Departments

Get Agency Departments

Get a list of agency_departments resources

GET https://locomotetmp.com/api/agency_departments

Request Parameters

Parameter Name

Description

Required

Valid Values

page[number]

The page number to fetch

No

Any Integer

page[size]

The number of items that appear on each page

No

Any Integer

Example Request

curl -i -H X-USER_TOKEN\:\ [your API key] -H X-USER-USERNAME\:\ [Company Admin email] -H Content-Type\:\ application/json -XGET https\://[your subdomain].locomotetmp.com/api/agency_departments/
No request fields required for GET

Example Response

Status Code: 200 - OK

{ "data": [ { "id": "e8cacd7e-3c8c-11e8-87f9-0662bed6e7db", "type": "agency_departments", "attributes": { "agency": "Locomote L9J", "name": "Demo TMC (Demo_Company)" } }, { "id": "e8cad82c-3c8c-11e8-87f9-0662bed6e7db", "type": "agency_departments", "attributes": { "agency": "Locomote L9J", "name": "DB Travel" } }, { "id": "e8cadbe8-3c8c-11e8-87f9-0662bed6e7db", "type": "agency_departments", "attributes": { "agency": "Locomote L9J", "name": "MR Travel" } },

Response Fields

Field Name

Description

Valid Values

id

Identifier used to reference a given record

Read only

type

Type of resource

Read only

agency

Name of the Agency

Read only

name

Name of the Department within the agency

Read only

Need to Know

As this Agency Departments is a Read Only query, there is no input or mandatory fields required as the data cannot be edited.

Troubleshooting

If you got a response code other than the code listed in the article, please refer to this page.

Did this answer your question?