Welcome! How can we help?

Users

Profiles (also known as Users) are the heart & soul of the Locomote Corporate Travel Platform. They are everything. Without a user profile, you cannot use the platform. Similarly without entering your personal details into any online portal, whether it's directly through the airline website, the hotel or car rental place, all of them require your information or 'profile.'

A profile is where all of your information is stored and can be updated at any time. The more information within a profile, the more customised the travel experience will be. For example, within a profile you can set your seating preferences, meal preferences, emergency contacts and frequent flyer cards.

Profiles can be setup at a company level by the company administrator, or they can be managed by the allocated Travel Arranger. The User themselves, can also edit their own Profile.  

Profiles can share a relationship with many different resources & are the basis of the majority of endpoints available by the API.

Using the Profile (JSON) API, we can retrieve a list of profiles or an individual profile via the GET function. We can also create (POST) without requiring a specific code. Using the "find all" function (GET) we can identify specific profile code(s) and either update (PATCH) or remove (DELETE). When specifying a relationship to profile, PATCH & DELETE options are available for the relationship. And just in case we mistakenly delete the record, we can get it back using a different URL to restore (POST).

 

  Secured by auth_token.

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

All Users

Get Users

Get a list of users resources

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

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

Remember

If no employee ID is assigned to a profile, the list of profiles in the GET response will only display those profiles with an employee ID; ie. it won't return all profiles.

 

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/users/
No request fields required for GET

Example Response

Status Code: 200 - OK

{
"data": [
{
"type": "users",
"attributes": {
"email": "demo_cbt@profile.travel",
"title": Mr,
"first_name": "Travelport",
"last_name": "Locomote",
"work_employee_id": null
}
},
{
"id": "employee_1534120533_1",
"type": "users",
"attributes": {
"email": "cbt_a@locomote.com.au",
"title": "Senator",
"first_name": "Authoriser",
"last_name": "Account",
"work_employee_id": "employee_1534120533_1"
}
},
{
"id": "employee_1534120535_2",
"type": "users",
"attributes": {
"email": "cbt_ta@locomote.com.au",
"title": "Dr",
"first_name": "Travel Arranger",
"last_name": "Account",
"work_employee_id": "employee_1534120535_2"
}
}
],

Response Fields

Field Name Description Valid Values
id Identifier used to reference a given record Read only 
type Type of resource users
email User's email address Any valid email address
title User's preferred title Mr, Mrs, Ms, Master, Miss, Dr, Admiral, Ambassador, Captain, Father, Honorable, Judge, Justice, Lady, Lord, Madam, Prof, Rabbi, Reverend, Senator, Sergeant, Sheikh, Sheikha, Sir, Sister
first_name User's first name Character length: <= 225
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
last_name User's surname Character length: <= 225
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_employee_id Identifier a company uses to reference a given employee Character length: <=50,
Valid characters: A-z 0-9 "_"

Need to Know

Getting all Users will return an abbreviated/summary version of the user(s) profile(s). When getting a single User by specifying the Employee ID, this will return a comprehensive response.

Remember

If no employee ID is assigned, the list will only display those profiles with an employee ID.

 

 

Create Users

Create a new users resource

POST https://locomotetmp.com/api/users

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

Note

Users can only be created if the Dependencies have been created and exist. A Dependency for a user is a Department, Cost Centre or Role(s)

Example Request

curl -i -H X-USER_TOKEN\:\ [your API key] -H X-USER-USERNAME\:\ [Company Admin email] -H Content-Type\:\ application/json -XPOST https\://[your subdomain].locomotetmp.com/api/users/
{
"data": {
"type": "users",
"attributes": {
"email": "steve.risk@profile.com",
"title": "Dr",
"alternative_title": "Mr",
"first_name": "Steve",
"last_name": "Risk",
"gender": "Male",
"emergency_contact_full_name": "",
"emergency_contact_relationship": "",
"emergency_contact_phone": "",
"work_job_title": "CEO",
"work_employee_id": "222444",
"work_country_code": "AU",
"work_address": "5 Queens Road",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3004",
"work_phone": "(03) 9810 4450",
"work_fax": "(03) 9811 4450",
"work_mobile": "0408 871 707",
"home_email": "stevenjamesrisk@example.com",
"home_country_code": "AU",
"home_address": "1 Expensive Court",
"home_suburb": "Melbourne",
"home_state": "VIC",
"home_post_code": "3000",
"home_phone": "(03) 9000 0000",
"home_fax": "",
"home_mobile": "0448 888 440",
"vip": false,
"enabled": true,
"time_zone": "Australia/Melbourne"
}
}
}

Example Response

Status code 201 - Created

{
"data": {
"id": "222444",
"type": "users",
"attributes": {
"email": "steve.risk@profile.com",
"title": "Dr",
"alternative_title": "Mr",
"first_name": "Steve",
"last_name": "Risk",
"gender": "Male",
"emergency_contact_full_name": "",
"emergency_contact_relationship": "",
"emergency_contact_phone": "",
"work_job_title": "CEO",
"work_employee_id": "222444",
"work_country_code": "AU",
"work_address": "5 Queens Road",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3004",
"work_phone": "+61398104450",
"work_fax": "+61398114450",
"work_mobile": "+61408871707",
"home_email": "stevenjamesrisk@example.com",
"home_country_code": "AU",
"home_address": "1 Expensive Court",
"home_suburb": "Melbourne",
"home_state": "VIC",
"home_post_code": "3000",
"home_phone": "+61390000000",
"home_fax": "",
"home_mobile": "+61448888440",
"vip": false,
"enabled": true,
"time_zone": "Australia/Melbourne",
"created_at": "2019-01-04T13:06:06+11:00",
"updated_at": "2019-01-04T13:06:06+11:00"
},
"relationships": {
"department": {
"data": null
},
"office": {
"data": null
},
"policy": {
"data": {
"id": "100543",
"type": "policies"
}
},
"agency_department": {
"data": {
"id": "e8cacd7e-3c8c-11e8-87f9-0662bed6e7db",
"type": "agency_departments"
}
},
"roles": {
"data": [
{
"id": "traveller",
"type": "roles"
}
]
},
"cost_centres": {
"data": []
}
}
},

Response Fields

Field Name Description Valid Values
id Identifier used to reference a given record Read only 
type* Type of resource users
email* User's email address Any valid email address
title* User's preferred title Mr, Mrs, Ms, Master, Miss, Dr, Admiral, Ambassador, Captain, Father, Honorable, Judge, Justice, Lady, Lord, Madam, Prof, Rabbi, Reverend, Senator, Sergeant, Sheikh, Sheikha, Sir, Sister
alternative_title* User's preferred alternative title Mr, Mrs, Miss
first_name* User's first name Character length: <= 225
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
last_name* User's surname Character length: <= 225
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
gender User's gender Male, Female, Other

emergency_

contact_full_name

Full name of user's emergency contact

Character length: <= 225,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_

relationship

User's relationship to the emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_phone

Best phone number for emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

work_job_title Position the user holds within the company Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_employee_id Identifier a company uses to reference a given employee Character length: <=50,
Valid characters: A-z 0-9 "_"

work_

country_code*

Country of user's workplace Refer to this page for the drop-down list.
work_address* User's work address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_suburb* User's work suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_state* User's work state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_post_code* User's work postal code Character length: <=50,
Valid characters: 0-9
work_phone User's work phone number Character length: <=50,
Valid characters: 0-9 
work_fax User's work fax number Character length: <=50,
Valid characters: 0-9 
work_mobile* User's work mobile number Character length: <=50,
Valid characters: 0-9
home_email User's personal/home email address Any valid email address

home_

country_code

User's residential country Refer to this page for the drop-down list.
home_address User's residential address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_suburb User's residential suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_state User's residential state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_post_code User's residential postal code Character length: <=50,
Valid characters: 0-9
home_phone User's personal phone number Character length: <=50,
Valid characters: 0-9
home_fax User's personal fax number Character length: <=50,
Valid characters: 0-9
home_mobile User's personal mobile number Character length: <=50,
Valid characters: 0-9
vip Represents the user's VIP status Boolean: True, False
enabled* Identifier a company uses to reference a given employee Boolean: True, False
time_zone User's preferred time zone Refer to this page for drop-down list.
created_at Date at which the user's profile was created YYYY-MM-DDTHH:MM:SS+00:00Z
updated_at Last date when the user's profile was updated YYYY-MM-DDTHH:MM:SS+00:00Z

Remember

You don't need the resource id as the system will assign code as the unique identifier record. For Users this will be the same as the Employee ID.

 

 

Single Users

Get a User

Get a single "users" resource

GET https://locomotetmp.com/api/users{work_employee_id}

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/users/{work_employee_id}
No request fields required for GET

Example Response

Status Code: 200 - OK

{
"data": {
"id": "123456",
"type": "users",
"attributes": {
"email": "vanessa-demo@locomote.com",
"title": "Miss",
"alternative_title": "Miss",
"first_name": "Vanessa",
"last_name": "Demo",
"gender": "Female",
"emergency_contact_full_name": "",
"emergency_contact_relationship": "",
"emergency_contact_phone": "",
"work_job_title": null,
"work_employee_id": "123456",
"work_country_code": "AU",
"work_address": "5 Queens Rd",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3004",
"work_phone": "",
"work_fax": "",
"work_mobile": "+61440200400",
"home_email": "",
"home_country_code": "",
"home_address": "",
"home_suburb": "",
"home_state": "",
"home_post_code": "",
"home_phone": "",
"home_fax": "",
"home_mobile": "",
"vip": false,
"enabled": true,
"time_zone": "Melbourne",
"created_at": "2016-10-31T08:47:15+11:00",
"updated_at": "2018-12-06T22:57:46+11:00"
},
"relationships": {
"department": {
"data": null
},
"office": {
"data": {
"type": "offices"
}
},
"policy": {
"data": {
"id": "100543",
"type": "policies"
}
},
"agency_department": {
"data": {
"id": "e8caf326-3c8c-11e8-87f9-0662bed6e7db",
"type": "agency_departments"
}
},
"roles": {
"data": [
{
"id": "company_admin",
"type": "roles"
},
{
"id": "travel_arranger",
"type": "roles"
},
{
"id": "traveller",
"type": "roles"
}
]
},
"cost_centres": {
"data": [
{
"id": "Finance",
"type": "cost_centres"
}
]
}
}
},

Response Fields

Field Name Description Valid Values
id Identifier used to reference a given record Read only 
type* Type of resource users
email* User's email address Any valid email address
title* User's preferred title Mr, Mrs, Ms, Master, Miss, Dr, Admiral, Ambassador, Captain, Father, Honorable, Judge, Justice, Lady, Lord, Madam, Prof, Rabbi, Reverend, Senator, Sergeant, Sheikh, Sheikha, Sir, Sister
alternative_title* User's preferred alternative title Mr, Mrs, Miss
first_name* User's first name Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
last_name* User's surname Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
gender User's gender Male, Female, Other

emergency_

contact_full_name

Full name of user's emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_

relationship

User's relationship to the emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_phone

Best phone number for emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

work_job_title Position the user holds within the company Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_employee_id Identifier a company uses to reference a given employee Character length: <=50,
Valid characters: A-z 0-9 "_"

work_

country_code*

Country of user's workplace Refer to this page for the drop-down list.
work_address* User's work address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_suburb* User's work suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_state* User's work state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_post_code* User's work postal code Character length: <=50,
Valid characters: 0-9
work_phone User's work phone number Character length: <=50,
Valid characters: 0-9 
work_fax User's work fax number Character length: <=50,
Valid characters: 0-9 
work_mobile* User's work mobile number Character length: <=50,
Valid characters: 0-9
home_email User's personal/home email address Any valid email address

home_

country_code

User's residential country Refer to this page for the drop-down list.
home_address User's residential address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_suburb User's residential suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_state User's residential state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_post_code User's residential postal code Character length: <=50,
Valid characters: 0-9
home_phone User's personal phone number Character length: <=50,
Valid characters: 0-9
home_fax User's personal fax number Character length: <=50,
Valid characters: 0-9
home_mobile User's personal mobile number Character length: <=50,
Valid characters: 0-9
vip Represents the user's VIP status Boolean: True, False
enabled* Identifier a company uses to reference a given employee Boolean: True, False
time_zone User's preferred time zone Refer to this page for drop-down list.
created_at Date at which the user's profile was created YYYY-MM-DDTHH:MM:SS+00:00Z
updated_at Last date when the user's profile was updated YYYY-MM-DDTHH:MM:SS+00:00Z

 

Update a User

Update a "users" resource

PATCH https://locomotetmp.com/api/users/{work_employee_id}

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 -XPATCH https\://[your subdomain].locomotetmp.com/api/users/{work_employee_id}
{
"data": {
"id": "098765",
"type": "users",
"attributes": {
"email": "traveller.john@profile.com",
"title": "Mr",
"alternative_title": "Mr",
"first_name": "John",
"last_name": "Smith",
"gender": "Male",
"emergency_contact_full_name": "Jessica Smith",
"emergency_contact_relationship": "Wife",
"emergency_contact_phone": "(03) 9812 3400",
"work_job_title": "Software Developer",
"work_employee_id": "098765",
"work_country_code": "AU",
"work_address": "1000 Main Street",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3000",
"work_phone": "(03) 9800 1234",
"work_fax": "(03) 9800 1234",
"work_mobile": "0400 023 456",
"home_email": "john.smith@example.com",
"home_country_code": "AU",
"home_address": "23 Beach Road",
"home_suburb": "Melbourne",
"home_state": "VIC",
"home_post_code": "3000",
"home_phone": "(03) 9000 0000",
"home_fax": "",
"home_mobile": "0448 123 456",
"vip": false,
"enabled": true,
"time_zone": "Australia/Melbourne"
}
}
}

Example Response

Status Code: 200 - OK

{
"data": {
"id": "098765",
"type": "users",
"attributes": {
"email": "traveller.john@profile.com",
"title": "Mr",
"alternative_title": "Mr",
"first_name": "John",
"last_name": "Smith",
"gender": "Male",
"emergency_contact_full_name": "Jessica Smith",
"emergency_contact_relationship": "Wife",
"emergency_contact_phone": "+61398123400",
"work_job_title": "Software Developer",
"work_employee_id": "098765",
"work_country_code": "AU",
"work_address": "1000 Main Street",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3000",
"work_phone": "+61398001234",
"work_fax": "+61398001234",
"work_mobile": "+61400023456",
"home_email": "john.smith@example.com",
"home_country_code": "AU",
"home_address": "23 Beach Road",
"home_suburb": "Melbourne",
"home_state": "VIC",
"home_post_code": "3000",
"home_phone": "+61390000000",
"home_fax": "",
"home_mobile": "+61448123456",
"vip": false,
"enabled": true,
"time_zone": "Australia/Melbourne",
"created_at": "2019-01-07T09:48:33+11:00",
"updated_at": "2019-01-07T09:53:12+11:00"
},
"relationships": {
"department": {
"data": null
},
"office": {
"data": null
},
"policy": {
"data": {
"id": "100543",
"type": "policies"
}
},
"agency_department": {
"data": {
"id": "e8cacd7e-3c8c-11e8-87f9-0662bed6e7db",
"type": "agency_departments"
}
},
"roles": {
"data": [
{
"id": "traveller",
"type": "roles"
}
]
},
"cost_centres": {
"data": []
}
}
},

Response Fields

Field Name Description Valid Values
id Identifier used to reference a given record Read only 
type* Type of resource users
email* User's email address Any valid email address
title* User's preferred title Mr, Mrs, Ms, Master, Miss, Dr, Admiral, Ambassador, Captain, Father, Honorable, Judge, Justice, Lady, Lord, Madam, Prof, Rabbi, Reverend, Senator, Sergeant, Sheikh, Sheikha, Sir, Sister
alternative_title* User's preferred alternative title Mr, Mrs, Miss
first_name* User's first name Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
last_name* User's surname Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
gender User's gender Male, Female, Other

emergency_

contact_full_name

Full name of user's emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_

relationship

User's relationship to the emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_phone

Best phone number for emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

work_job_title Position the user holds within the company Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_employee_id Identifier a company uses to reference a given employee Character length: <=50,
Valid characters: A-z 0-9 "_"

work_

country_code*

Country of user's workplace Refer to this page for the drop-down list.
work_address* User's work address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_suburb* User's work suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_state* User's work state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_post_code* User's work postal code Character length: <=50,
Valid characters: 0-9
work_phone User's work phone number Character length: <=50,
Valid characters: 0-9 
work_fax User's work fax number Character length: <=50,
Valid characters: 0-9 
work_mobile* User's work mobile number Character length: <=50,
Valid characters: 0-9
home_email User's personal/home email address Any valid email address

home_

country_code

User's residential country Refer to this page for the drop-down list.
home_address User's residential address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_suburb User's residential suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_state User's residential state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_post_code User's residential postal code Character length: <=50,
Valid characters: 0-9
home_phone User's personal phone number Character length: <=50,
Valid characters: 0-9
home_fax User's personal fax number Character length: <=50,
Valid characters: 0-9
home_mobile User's personal mobile number Character length: <=50,
Valid characters: 0-9
vip Represents the user's VIP status Boolean: True, False
enabled* Identifier a company uses to reference a given employee Boolean: True, False
time_zone User's preferred time zone Refer to this page for drop-down list.
created_at Date at which the user's profile was created YYYY-MM-DDTHH:MM:SS+00:00Z
updated_at Last date when the user's profile was updated YYYY-MM-DDTHH:MM:SS+00:00Z

User entities can have relationships with other resources on the system.

For example:

  • agency_department
  • cost_centers
  • offices
  • policy
  • roles
 

To update any of these resources, please refer to this page.

 

Delete a User

Delete a "users" resource

DELETE https://locomotetmp.com/api/users/{work_employee_id}

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 -XDELETE https\://[your subdomain].locomotetmp.com/api/users/{work_employee_id}
No request fields required for DELETE

Example Response

Status Code: 204 - No content

No body returned for response

Response Fields

No response fields required as no content is returned after deletion.  

Remember

You don't need any response fields entered (eg. type, code, name) to delete a record. The unique resource id (or {code}) is already identified in the URL, so the API knows which specific record to delete.

 

 

Restore a User

Restore a single resource

POST https://locomotetmp.com/api/users/{work_employee_id}/actions/restore

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 -XPOST https\://[your subdomain].locomotetmp.com/api/users/{work_employee_id}/actions/restore
No request fields required for RESTORE

Example Response

Status Code: 200 - OK

The resource was successfully restored. The updated resource is returned.
{
"data": {
"id": "098765",
"type": "users",
"attributes": {
"email": "traveller.john@profile.com",
"title": "Mr",
"alternative_title": "Mr",
"first_name": "John",
"last_name": "Smith",
"gender": "Male",
"emergency_contact_full_name": "Jessica Smith",
"emergency_contact_relationship": "Wife",
"emergency_contact_phone": "+61398123400",
"work_job_title": "Software Developer",
"work_employee_id": "098765",
"work_country_code": "AU",
"work_address": "1000 Main Street",
"work_suburb": "Melbourne",
"work_state": "VIC",
"work_post_code": "3000",
"work_phone": "+61398001234",
"work_fax": "+61398001234",
"work_mobile": "+61400023456",
"home_email": "john.smith@example.com",
"home_country_code": "AU",
"home_address": "23 Beach Road",
"home_suburb": "Melbourne",
"home_state": "VIC",
"home_post_code": "3000",
"home_phone": "+61390000000",
"home_fax": "",
"home_mobile": "+61448123456",
"vip": false,
"enabled": true,
"time_zone": "Australia/Melbourne",
"created_at": "2019-01-07T09:48:33+11:00",
"updated_at": "2019-01-06T23:43:17Z"
},
"relationships": {
"department": {
"data": null
},
"office": {
"data": null
},
"policy": {
"data": {
"id": "100543",
"type": "policies"
}
},
"agency_department": {
"data": {
"id": "e8cacd7e-3c8c-11e8-87f9-0662bed6e7db",
"type": "agency_departments"
}
},
"roles": {
"data": [
{
"id": "traveller",
"type": "roles"
}
]
},
"cost_centres": {
"data": []
}
}
},

Response Fields

Field Name Description Valid Values
id Identifier used to reference a given record Read only 
type* Type of resource users
email* User's email address Any valid email address
title* User's preferred title Mr, Mrs, Ms, Master, Miss, Dr, Admiral, Ambassador, Captain, Father, Honorable, Judge, Justice, Lady, Lord, Madam, Prof, Rabbi, Reverend, Senator, Sergeant, Sheikh, Sheikha, Sir, Sister
alternative_title* User's preferred alternative title Mr, Mrs, Miss
first_name* User's first name Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
last_name* User's surname Character length: <= 50
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
gender User's gender Male, Female, Other

emergency_

contact_full_name

Full name of user's emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_

relationship

User's relationship to the emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

emergency_

contact_phone

Best phone number for emergency contact

Character length: <=50,
Valid characters: A-z 0-9 "_"

Note: Mandatory field once any 1 of 3 emergency fields have a value entered.

work_job_title Position the user holds within the company Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_employee_id Identifier a company uses to reference a given employee Character length: <=50,
Valid characters: A-z 0-9 "_"

work_

country_code*

Country of user's workplace Refer to this page for the drop-down list.
work_address* User's work address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_suburb* User's work suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_state* User's work state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
work_post_code* User's work postal code Character length: <=50,
Valid characters: 0-9
work_phone User's work phone number Character length: <=50,
Valid characters: 0-9 
work_fax User's work fax number Character length: <=50,
Valid characters: 0-9 
work_mobile* User's work mobile number Character length: <=50,
Valid characters: 0-9
home_email User's personal/home email address Any valid email address

home_

country_code

User's residential country Refer to this page for the drop-down list.
home_address User's residential address Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_suburb User's residential suburb Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_state User's residential state Character length: <=50,
Valid characters: A-z 0-9
%&'()[]*,-./\:_ and whitespace
home_post_code User's residential postal code Character length: <=50,
Valid characters: 0-9
home_phone User's personal phone number Character length: <=50,
Valid characters: 0-9
home_fax User's personal fax number Character length: <=50,
Valid characters: 0-9
home_mobile User's personal mobile number Character length: <=50,
Valid characters: 0-9
vip Represents the user's VIP status Boolean: True, False
enabled* Identifier a company uses to reference a given employee Boolean: True, False
time_zone User's preferred time zone Refer to this page for drop-down list.
created_at Date at which the user's profile was created YYYY-MM-DDTHH:MM:SS+00:00Z
updated_at Last date when the user's profile was updated YYYY-MM-DDTHH:MM:SS+00:00Z

Need to Know

*= Denotes mandatory field.

 

Troubleshooting

 

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

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

Comments

0 comments

Article is closed for comments.