Welcome! How can we help?

Introduction to the Locomote Connect API

Whether you are a rookie to our Locomote Corporate Travel Platform and using the Profile API, or whether you're a seasoned vet and just need something to refer to - you've come to the right place to learn all you need to know, in order to save the world. 

The Locomote Connect API lets you programatically access employee profiles & other resources within the platform.

Some common examples of usage are: Employee provisioning, synchronising employee profiles & preferences with an underlying HR system & synchronising of departments & cost centres with an underlying ERP system.

Here's an overview of the Locomote Connect API basics to get you through those cold nights.

 

Getting Started

 

All API endpoints are accessible via the Root Endpoint    https://<your subdomain>.locomotetmp.com/api

The Root Endpoint is only accessible by using an API client.

Entering the URL into a browser will not display/achieve anything because it requires proper methods & authentication.   

Need to Know

If you do not have a subdomain configured it will be https://locomotetmp.com/api

Profile API (JSON)

Glossary

Type Description
Resource An object with a type, associated data, relationships to other resources, and a set of methods that operate on it.
Attributes A piece of information which determines the properties of a field or tag in a database or a string of characters in a display.
Cost Centre A part of an organization to which costs may be charged for accounting purposes.
Department A division of a large organization such as a government, university, or business, dealing with a specific area of activity.
Policy A course or principle of action adopted or proposed by an organization or individual.
Office The local centre of a large business.
Users A person who uses or operates something.
Relationships The way in which two or more people or things are connected, or the state of being connected.

Profiles in Locomote

Note

The main tabs within a Profile that we can access via the API are: Personal, Financial, Loyalty, Preferences, Documents & Assignments

Authentications

Authentication is done via adding two custom headers to any requests to the API.

  • Content-type : application/vnd.api+json
  • Accept : application/vnd.api+json
  • "X-USER-USERNAME" : This will be an authenticated email address
  • "X-USER-TOKEN" : This token is available via the company administrator
An example of Authentications in the API client Insomnia.

Remember

Please contact your Company Administrator to request the API credentials required to access the API.

 

Dependencies 

A Department is required before you can create a Cost Centre.

The following are required before you can create a User:

  • Department
  • Cost Centre
  • Office

Limitations

Currently supports about 1000 concurrent requests at a time. 

 

Tools

You can use any API client that you prefer including some of the following common ones:

Troubleshooting

 

If you got a response code that was unexpected or need help troubleshooting an error code, please refer to this page. 

 

Table of Contents

Endpoint Functions
/users GETPOST
/users/{work_employee_id} GETPATCHDELETE
/users/{work_employee_id}/actions/restore POST
/users/{work_employee_id}/authorisers
/users/{work_employee_id}/risk_authorisers
/users/{work_employee_id}/travel_arrangers
/users/{work_employee_id}/employee_groups
GET
/users/{work_employee_id}/passports GETPOST
 /users/{work_employee_id}/passports/{id} GETPATCHDELETE
/users/{work_employee_id}/loyalty_memberships GETPOST
/users/{work_employee_id}/loyalty_memberships/{id} GETPATCHDELETE
/users/{work_employee_id}/visas GETPOST
/users/{work_employee_id}/visas/{id} GETPATCHDELETE
/users/{work_employee_id}/credit_cards GETPOST
/users/{work_employee_id}/credit_cards/{id} GETPATCHDELETE
/users/{work_employee_id}/seat_preference
/users/{work_employee_id}/meal_preference
GETPOSTPATCHDELETE
/users/{work_employee_id}/relationships/cost_centres
/users/{work_employee_id}/relationships/roles
/users/{work_employee_id}/relationships/authorisers
/users/{work_employee_id}/relationships/risk_authorisers
/users/{work_employee_id}/relationships/travel_arrangers
/users/{work_employee_id}/relationships/employee_groups
PATCHDELETE
/cost_centres
GETPOST
/cost_centres/{code}  GETPATCHDELETE
/cost_centres/{code}/relationships/departments  PATCHDELETE
/cost_centres/{code}/actions/restore POST
/departments  GETPOST
/departments/{code} GETPATCHDELETE
/departments/{code}/actions/restore POST
/employee_groups GETPOST
/employee_groups/{code} GETPATCHDELETE
/employee_groups/{code}/actions/restore POST
/offices GETPOST
/offices/{code} GETPATCHDELETE
/offices/{code}/actions/restore POST
/policies  GETPOST
/policies/{code} GETPATCHDELETE
/policies/{code}/actions/restore POST
/loyalty_providers GET
/agency_departments GET

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.