Create a new corporate traveler
POST/v1/corporates/:id/travelers
Creates a new corporate traveler account for a specific corporate account
Request
Path Parameters
Corporate ID
- application/json
Body
required
0- Male1- Female2- Other
First name
Last name
Phone
Date of birth
Assistant email
Possible values: [0, 1, 2]
Gender:
Address
City
State
Zip code
Country
Job title
Department
Corp division
Manager name
Manager email
Cost centre
Corp ID
Corp PO
Is active
Responses
- 201
- 400
- 404
Corporate traveler created successfully
- application/json
- Schema
- Example (from schema)
Schema
The ID of the corporate traveler
The first name of the corporate traveler
The last name of the corporate traveler
The phone of the corporate traveler
The email of the corporate traveler
The gender of the corporate traveler
The date of birth of the corporate traveler
The address of the corporate traveler
The city of the corporate traveler
The state of the corporate traveler
The zip code of the corporate traveler
The country of the corporate traveler
The job title of the corporate traveler
The department of the corporate traveler
The corp division of the corporate traveler
The manager name of the corporate traveler
The manager email of the corporate traveler
The assistant email of the corporate traveler
The corp ID of the corporate traveler
The corp PO of the corporate traveler
Whether the corporate traveler is active
The created date of the corporate traveler
The latest update date of the corporate traveler
{
"_id": "1234567890",
"firstName": "James",
"lastName": "Bond",
"phone": "+1234567890",
"email": "jamesbond@goodjourney.io",
"gender": 0,
"dateOfBirth": "1990-01-01",
"address": "123 Main St",
"city": "New York",
"state": "NY",
"zipCode": "10001",
"country": "USA",
"jobTitle": "CEO",
"department": "Finance",
"corpDivision": "Finance",
"managerName": "John Doe",
"managerEmail": "john.doe@goodjourney.io",
"assistantEmail": "assistant@goodjourney.io",
"corpId": "1234567890",
"corpPo": "1234567890",
"isActive": true,
"createdDate": "2021-01-01T00:00:00.000Z",
"latestUpdate": "2021-01-01T00:00:00.000Z"
}
Phone number and email already exists in different travelers
Corporate not found