Company API (v2)

Download OpenAPI specification:Download

Companies

APIs to onboard and manage company.

Create company

This endpoint creates a company. This is allowed only by TMC_ADMIN and above roles.

SecurityBearer
Request
Request Body schema: application/json
name
required
string

Company name

emailDomains
Array of strings unique

List of the company email domains

billingCurrency
required
string

Billing currency of the company

Array of objects (PhoneNumber)

List of company phone numbers

Array of objects (EmergencyContactInfo)

List of company emergency contacts

isSelfSignUpEnabled
boolean

Boolean to show if company has self sign up enabled.

Array of objects (Announcement)

Company announcements

object (Image)

Company logo

object (CompanyId)

Company ID which have contracted this company.

companyRoles
required
Array of strings (CompanyRole)

Company roles

Items Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
object (SupportConfig)
Deprecated

Support Configuration for company

Array of objects (SupportConfig)

Support Configs for company

ccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be cced. This is applicable only for company roles 'ORG'

bccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be bcced. This is applicable only for company roles 'ORG'

object (PostalAddress)

Postal address of the company.

redirectUrl
string

Redirect URL for the company. It is applicable only for company roles 'PARTNER_TMC'

object (RewardsProgram)
Deprecated

Rewards Program corresponding to partner. It is applicable only for company roles 'PARTNER_TMC'.

object (TmcDefaultConfiguration)

Default Booking configuration for the TMC. It is applicable only for company roles 'TMC'

object (ExpensePartnerConfig)

Expense Partner Configuration

mobileRedirectUrl
string

Redirect URL for the company for mobile. It is applicable only for company roles 'PARTNER_TMC'

applicableCustomFieldTypes
Array of strings (CustomFieldType)

List of custom fields supported by the company.

Items Enum: "QUESTION" "MEETING" "BUDGET" "BREX_TOKEN"
object (OAuthPartnerConfig)

Config for token exchange in case of partner's have their own IDP.

object (PrivacySettings)

Privacy settings for a company.

object (EmailClientConfig)

Email client configuration representing the email provider to be used.

externalId
string

External id for legal entity.

isFake
boolean
Default: false

Whether the company is a fake company for testing. This is for internal use.

Array of objects (TmcPartnerRoleMapping)

list of individual role mappings between spotnana and partner.

loyaltyBlockedCountries
Array of strings

List of 2 letter country codes where business travelers should not be allowed to add loyalty info.

allowDomainBasedAuthConfig
boolean
Default: false

Whether to allow user to get auth config based on email domain

object (CarbonCostConfig)

The config is used to calculate carbon cost of CO2 emission.

Responses
201

Created

400

Bad request

401

Unauthorized

403

Forbidden

post/v2/companies
Request samples
application/json
{
  • "name": "Spotnana",
  • "emailDomains": [
    ],
  • "billingCurrency": "INR",
  • "phoneNumbers": [
    ],
  • "emergencyContactInfos": [
    ],
  • "isSelfSignUpEnabled": true,
  • "announcements": [],
  • "companyLogo": {},
  • "contractedBy": {
    },
  • "companyRoles": [
    ],
  • "supportConfig": {
    },
  • "supportConfigs": [
    ],
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "postalAddress": {
    },
  • "redirectUrl": "string",
  • "rewardsProgram": {
    },
  • "tmcDefaultConfiguration": {
    },
  • "expensePartnerConfig": {
    },
  • "mobileRedirectUrl": "string",
  • "applicableCustomFieldTypes": [
    ],
  • "oauthPartnerConfig": {
    },
  • "privacySettings": {
    },
  • "emailClientConfig": {
    },
  • "externalId": "company-external-id",
  • "isFake": false,
  • "tmcPartnerRoleMappings": [
    ],
  • "loyaltyBlockedCountries": [
    ],
  • "allowDomainBasedAuthConfig": false,
  • "carbonCostConfig": {
    }
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

List companies

This endpoint lists companies. If externalId is provided in query param, only the company having the specified external ID is returned.

SecurityBearer
Request
query Parameters
externalId
string

External id of the entity.

Example: externalId=my-external-id
companyRole
string (CompanyRole)

Filter by a particular role

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=ORG
companyIds
Array of strings <uuid>

Filter by a list of companies

Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/companies
Request samples
Response samples
application/json
{
  • "length": 0,
  • "elements": [
    ]
}

Get company

This endpoint gets a company by ID.

SecurityBearer
Request
path Parameters
companyId
required
string

Identifier for company. External id can be supplied in X prefixed form. For instance, if external_id = abc, then Xabc, has to be passed.

Example: 4974a66b-7493-4f41-908c-58ba81093947
header Parameters
x-application-id
string <uuid>
Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}
Request samples
Response samples
application/json
{
  • "id": {
    },
  • "name": "Spotnana",
  • "emailDomains": [
    ],
  • "billingCurrency": "INR",
  • "phoneNumbers": [
    ],
  • "emergencyContactInfos": [
    ],
  • "isSelfSignUpEnabled": true,
  • "announcements": [],
  • "companyLogo": {},
  • "contractedBy": {
    },
  • "isActive": true,
  • "companyRoles": [
    ],
  • "supportConfig": {
    },
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "connectors": [
    ],
  • "postalAddress": {
    },
  • "redirectUrl": "string",
  • "rewardsProgram": {
    },
  • "tmcDefaultConfiguration": {
    },
  • "expensePartnerConfig": {
    },
  • "mobileRedirectUrl": "string",
  • "applicableCustomFieldTypes": [
    ],
  • "oauthPartnerConfig": {
    },
  • "privacySettings": {
    },
  • "designationTree": {
    },
  • "externalId": "MyCompanyId",
  • "emailClientConfig": {
    },
  • "isFake": false,
  • "tmcPartnerRoleMappings": [
    ],
  • "supportConfigs": {
    },
  • "loyaltyBlockedCountries": [
    ],
  • "allowDomainBasedAuthConfig": false,
  • "carbonCostConfig": {
    }
}

Update company

This endpoint updates a company by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
required
object (CompanyId)

Company ID

name
required
string

Company name

emailDomains
Array of strings unique

List of the company email domains

billingCurrency
required
string

Billing currency of the company

Array of objects (PhoneNumber)

List of company phone numbers

Array of objects (EmergencyContactInfo)

List of company emergency contacts

isSelfSignUpEnabled
boolean

Boolean to show if company has self sign up enabled.

Array of objects (Announcement)

Company announcements

object (Image)

Company logo

object (CompanyId)

Company ID which have contracted this company.

isActive
boolean

Boolean to show if this is an active company.

companyRoles
required
Array of strings (CompanyRole)

Company roles

Items Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
object (SupportConfig)
Deprecated

Support Configuration for company

ccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be cced. This is applicable only for company roles 'ORG'

bccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be bcced. This is applicable only for company roles 'ORG'

Array of objects (Connector)

Connectors related to company.

object (PostalAddress)

Postal address of the company.

redirectUrl
string

Redirect URL for the company. It is applicable only for company roles 'PARTNER_TMC'

object (RewardsProgram)
Deprecated

Reward Program corresponding to partner. It is applicable only for company roles 'PARTNER_TMC'.

object (TmcDefaultConfiguration)

Default Booking configuration for the TMC. It is applicable only for company roles 'TMC'

object (ExpensePartnerConfig)

Expense Partner Configuration

mobileRedirectUrl
string

Redirect URL for the company for mobile. It is applicable only for company roles 'PARTNER_TMC'

applicableCustomFieldTypes
Array of strings (CustomFieldType)

List of custom fields supported by the company.

Items Enum: "QUESTION" "MEETING" "BUDGET" "BREX_TOKEN"
object (OAuthPartnerConfig)

Config for token exchange in case of partner's have their own IDP.

object (PrivacySettings)

Privacy settings for a company.

object (DesignationNode)

Designation tree for company showing who reports whom.

externalId
string

External id to be linked with this.

object (EmailClientConfig)

Email client configuration representing the email provider to be used.

isFake
boolean
Default: false

Whether the company is a fake company for testing. This is for internal use.

Array of objects (TmcPartnerRoleMapping)

list of individual role mappings between spotnana and partner.

object (SupportConfigs)
loyaltyBlockedCountries
Array of strings

List of 2 letter country codes where business travelers should not be allowed to add loyalty info.

allowDomainBasedAuthConfig
boolean
Default: false

Whether to allow user to get auth config based on email domain

object (CarbonCostConfig)

The config is used to calculate carbon cost of CO2 emission.

Responses
204

Updated Successfully

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}
Request samples
application/json
{
  • "id": {
    },
  • "name": "Spotnana",
  • "emailDomains": [
    ],
  • "billingCurrency": "INR",
  • "phoneNumbers": [
    ],
  • "emergencyContactInfos": [
    ],
  • "isSelfSignUpEnabled": true,
  • "announcements": [],
  • "companyLogo": {},
  • "contractedBy": {
    },
  • "isActive": true,
  • "companyRoles": [
    ],
  • "supportConfig": {
    },
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "connectors": [
    ],
  • "postalAddress": {
    },
  • "redirectUrl": "string",
  • "rewardsProgram": {
    },
  • "tmcDefaultConfiguration": {
    },
  • "expensePartnerConfig": {
    },
  • "mobileRedirectUrl": "string",
  • "applicableCustomFieldTypes": [
    ],
  • "oauthPartnerConfig": {
    },
  • "privacySettings": {
    },
  • "designationTree": {
    },
  • "externalId": "MyCompanyId",
  • "emailClientConfig": {
    },
  • "isFake": false,
  • "tmcPartnerRoleMappings": [
    ],
  • "supportConfigs": {
    },
  • "loyaltyBlockedCountries": [
    ],
  • "allowDomainBasedAuthConfig": false,
  • "carbonCostConfig": {
    }
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete company

This endpoint deletes a company by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
204

Deleted Successfully

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get company features

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=TMC
header Parameters
X-Application-Id
string <uuid>
Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/features
Request samples
Response samples
application/json
{
  • "length": 1,
  • "features": [
    ]
}

Update Company Features

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=TMC
header Parameters
X-Application-Id
string <uuid>
Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
Array of objects (FeatureConfig)

Features that has to be updated.

featuresToDelete
Array of strings (FeatureNameEnum)

Features that has to be deleted.

Items Enum: "FLIGHT_RESULTS_OOP" "HOTEL_RESULTS_OOP" "RAIL_RESULTS_OOP" "CARS_RESULTS_OOP" "PAYMENT_ADD_CARD" "MENU_ITEM_POLICIES" "INTEGRATION_EXPENSIFY" "TRAVELER_SELECTION" "FEATURE_PERSONAL_TRAVEL" "PRODUCT_OBT_RAIL" "MENU_ITEM_COMPANY_REMARKS" "HOMEPAGE_ADD_USER" "MENU_ITEM_CUSTOM_FIELDS" "PAYMENT_UNUSED_CREDITS" "EMAIL_UPDATE_BY_COMPANY_ADMIN" "ADHOC_BOOKING_SEARCH_PAGE" "ADHOC_BOOKING_SAVE_TRAVELER" "ADMIN_VIRTUAL_CARD" "CENTRAL_CARD_SERVICE_FEE" "EXPEDIA_SOURCE_ENABLED" "BOOKING_COM_SOURCE_ENABLED" "HOTEL_MEDIAN_ENABLE" "HIDE_SEARCH_CRITERIA" "ADHOC_PAYMENT_SOURCE" "SERVICE_CHARGE_CONFIG_DISABLED" "HIDE_SETTINGS_MENU_ITEM_COMPANY" "HIDE_SETTINGS_MENU_ITEM_USERS" "HIDE_POLICY_APPROVAL_SECTION" "HIDE_POLICY_CREATION" "HIDE_SETTINGS_TEXT_FROM_MENU" "HIDE_LEFT_NAV" "HIDE_POLICY_AIR_CARRIER" "HIDE_POLICY_AIR_CO2" "HIDE_POLICY_HOTEL_PRICE_LOCATION_CUSTOMISATION" "HIDE_PROFILE_PREFERENCES_AIRLINES" "HIDE_PROFILE_PREFERENCES_ALLIANCES" "MONEY_SET_CONVERTED_CURRENCY_AS_ORIGINAL_CURRENCY" "PRODUCT_OBT_AIR_DISABLED" "PRODUCT_OBT_HOTEL_DISABLED" "PRODUCT_OBT_CAR_DISABLED" "PRODUCT_OBT_LIMO_DISABLED" "PRODUCT_OBT_CONCIERGE_DISABLED" "EVENT_BOOKING_ENABLED" "EMPLOYEE_LEVEL_DESIGNATED_APPROVER_ENABLED" "ENRICH_SEARCH_RESPONSE_WITH_REWARD_POINTS" "HIDE_LEFT_NAV_EMBED" "HIDE_POLICY_AIR_NOT_ALLOWED_TO_BE_BOOKED" "HIDE_TRIP_FEE_CONFIG" "HIDE_AGENT_FEE_CONFIG" "SHOW_SERVICE_FEE_TAXES" "HIDE_GUEST_BOOKING_SETTING" "USER_CREATION_PERSONA_TYPE_OPTIONS" "AIR_SEARCH_RESULT_AIRLINE_SORT_ORDER" "HIDE_SHERPA_VISA_WIDGET" "AUTO_DEACTIVATE_GUEST" "POLICY_USER_GROUPS" "HIDE_SUPPLIER_MANAGEMENT" "HIDE_BOOKING_RESTRICTIONS_BY_COUNTRY" "LINKED_MARRIOTT_BONVOY_REQUIRED" "EDITING_DEFAULT_POLICIES_DISABLED" "DISALLOW_MULTI_CITY_ADD_FLIGHT" "REQUIRE_ONBOARDING_ON_ENROLLMENT" "GEO_CUSTOMIZATIONS" "HIDE_PREFERRED_PARENT_CHAINS" "HIDE_PREFERRED_HOTEL_BRANDS" "HIDE_ROOM_OPTIONS_AND_STAY_PREFERENCES" "HIDE_CONDITIONAL_RATES_PREFERENCES" "HIDE_HOTELS_IN_SUPPLIER_MANAGEMENT" "HIDE_HOTEL_BRANDS_IN_SUPPLIER_MANAGEMENT" "HIDE_POLICY_HOTEL_STAR_RATING" "PRODUCT_OBT_HOMEPAGE_ORDER" "HIDE_COMPANY_SUPPLIER_MENU" "EXTERNAL_EVENT_BOOKING_URL" "HIDE_IDLE_SESSION_TIMEOUT" "LE_CUSTOM_COLUMNS_CONFIG" "PROFILE_ELEMENTS_VISIBILITY" "SHOW_TRIP_FEE_CONFIG" "SHOW_AGENT_FEE_CONFIG" "DEFAULT_HOTEL_SEARCH_RADIUS_CONFIG" "ENROLLMENT_DASHBOARD" "PRIVACY_CONFIG_HIERARCHY" "POLICY_CONFIGURED_IN_HR_FEED" "COMPANION_VIEW_CONFIG" "SHOW_INDIAN_CARD_PAYMENT_GUIDELINES"
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

patch/v2/companies/{companyId}/features
Request samples
application/json
{
  • "featuresToUpdate": [
    ],
  • "featuresToDelete": [
    ]
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get company travel content config

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/travel-content-config
Request samples
Response samples
application/json
{
  • "airConfig": {
    }
}

Update company travel content config

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json

Travel content config of a given company

object (AirConfig)

Air content config

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/travel-content-config
Request samples
application/json
{
  • "airConfig": {
    }
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete company travel content config

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}/travel-content-config
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Updates white label config

This endpoint stores white label config for the company at different entity levels.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
required
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=ORG
Request Body schema: application/json
companyName
string
required
object (ColorWhiteLabelConfig)

Whitelabel configuration related to colours.

object (WebLinksConfig)

Weblinks which are parts of WhiteLabelConfig.

fromEmailAddress
string
fontFamily
string
Default: "Arial"
emailFontFamily
string
Default: "Roboto"
fontFamilyCss
string
object (EmailClientConfig)

Email client configuration representing the email provider to be used.

clientRoutingBasePath
string

Base path used by Spotnana OBT application to invoke API calls. Default path value is /

object (RoutingConfig)

App routing configuration.

object (PrivacyDisclaimer)

Html to shown on the the login page. This will be text with hyper links.

Responses
200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/white-label-config
Request samples
application/json
{}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get white label config

This endpoint fetches the white label config for the company.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
required
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=ORG
applicationId
string <uuid>

Application context to get white label config.

Example: applicationId=1234a66b-7493-4f41-908c-58ba81055667
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/white-label-config
Request samples
Response samples
application/json
{}

Updates Color config

This endpoint stores Color config for the company at some entity level.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
required
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=TMC
Request Body schema: application/json
Array of objects (ProfileColors)

The list of colors relating to profile.

Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/color-config
Request samples
application/json
{
  • "profileColors": [
    ]
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get color config

This endpoint fetches the color config for the given entity.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
required
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=TMC
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/color-config
Request samples
Response samples
application/json
{
  • "profileColors": [
    ]
}

Legal Entities

APIs to create and manage company legal entities.

Create legal entity

This endpoint creates a legal entity.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
name
required
string

Name of the legal entity

required
object (PostalAddress)

Address of the legal entity.

billingCurrency
required
string

Billing currency for the legal entity.

dba
string

Business name, sort form of Doing Business As

ein
string

Tax number

Array of objects (PhoneNumber)
isDelayedInvoicingEnabled
boolean

Whether delayed invoicing is enabled for the legal entity. If enabled, travelers of the legal entity won't be charged for trip on checkout, rather the bills would be sent to the company later on based on the billing cycle.

ccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails for this LE will be cc'ed. This is applicable only for company roles 'ORG'

bccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails for this LE will be bcc'ed. This is applicable only for company roles 'ORG'

externalId
string

External id for legal entity.

Array of objects (CompanySpecifiedAttributeLegalEntity)

Company specified attributes or fields for the legal entity.

Responses
201

Created

400

Bad request

401

Unauthorized

403

Forbidden

post/v2/companies/{companyId}/legal-entities
Request samples
application/json
{
  • "name": "string",
  • "address": {
    },
  • "billingCurrency": "string",
  • "dba": "string",
  • "ein": "string",
  • "phoneNumbers": [
    ],
  • "isDelayedInvoicingEnabled": true,
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "externalId": "legal-entity-external-id",
  • "companySpecifiedAttributes": [
    ]
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

List legal entities

This endpoint lists legal entities of a company. If externalId is provided in the query param only the legal entity having the provided externalId is returned.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
pageNumber
integer <int32> >= 1
Default: 1

Page number to fetch for the query. Page number starts from 1.

Example: pageNumber=2
pageSize
integer <int32> [ 1 .. 1000 ]
Default: 1000

Page size to be to fetch for the query.

Example: pageSize=20
externalId
string

External id of the entity.

Example: externalId=my-external-id
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/companies/{companyId}/legal-entities
Request samples
Response samples
application/json
{
  • "length": 0,
  • "elements": [
    ]
}

Get legal entity

This endpoint gets a legal entity by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/legal-entities/{legalEntityId}
Request samples
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": {
    },
  • "billingCurrency": "string",
  • "dba": "string",
  • "ein": "string",
  • "phoneNumbers": [
    ],
  • "isDelayedInvoicingEnabled": true,
  • "bookingTmcRef": {
    },
  • "expensePartnerConfig": {
    },
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "externalId": "my-external-id",
  • "companySpecifiedAttributes": [
    ]
}

Update legal entity

This endpoint updates a legal entity by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
id
string <uuid>

Unique identifier of the legal entity.

name
string

Name of the legal entity

object (PostalAddress)

Address of the legal entity.

billingCurrency
string

Billing currency for the legal entity.

dba
string

Business name, sort form of Doing Business As

ein
string

Tax number

Array of objects (PhoneNumber)
isDelayedInvoicingEnabled
boolean

Whether delayed invoicing is enabled for the legal entity. If enabled, travelers of the legal entity won't be charged for trip on checkout, rather the bills would be sent to the company later on based on the billing cycle.

object (Reference)

Booking TMC of the legal entity.

object (ExpensePartnerConfig)

Configured details of expense partner.

ccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be CCed. This is applicable only for company roles 'ORG'

bccEmailAddresses
Array of strings

List of email addresses on which all confirmation emails will be BCCed. This is applicable only for company roles 'ORG'

externalId
string

External id for the legal entity.

Array of objects (CompanySpecifiedAttributeLegalEntity)

Company specified attributes or fields for the legal entity.

Responses
204

Updated Successfully

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/legal-entities/{legalEntityId}
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": {
    },
  • "billingCurrency": "string",
  • "dba": "string",
  • "ein": "string",
  • "phoneNumbers": [
    ],
  • "isDelayedInvoicingEnabled": true,
  • "bookingTmcRef": {
    },
  • "expensePartnerConfig": {
    },
  • "ccEmailAddresses": [
    ],
  • "bccEmailAddresses": [
    ],
  • "externalId": "my-external-id",
  • "companySpecifiedAttributes": [
    ]
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete legal entity

This endpoint deletes a legal entity by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
204

Deleted

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}/legal-entities/{legalEntityId}
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Cost Centers

APIs to create and manage company cost centers.

Create cost center

This endpoint creates a cost center.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
name
required
string
numberOfEmployees
integer <int32>
externalId
string
Responses
201

OK

400

Bad request

401

Unauthorized

403

Forbidden

post/v2/companies/{companyId}/cost-centers
Request samples
application/json
{
  • "name": "string",
  • "numberOfEmployees": 0,
  • "externalId": "external-id"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

List cost centers

This endpoint lists cost centers of a company. If an externalId is provided in the query parameter only the cost center with the provided externalId is returned.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
externalId
string

External id of the cost center.

Example: externalId=cost-center-external-id
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/companies/{companyId}/cost-centers
Request samples
Response samples
application/json
{
  • "length": 0,
  • "elements": [
    ]
}

Get cost center

This endpoint gets a cost center by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterId
required
string <uuid>

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/cost-centers/{costCenterId}
Request samples
Response samples
application/json
{
  • "employeeCount": 120,
  • "id": {
    },
  • "name": "CostCenter",
  • "externalId": "external-id"
}

Update cost center

This endpoint updates a cost center by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterId
required
string <uuid>

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
employeeCount
integer <int32>

Count of employees in the cost center

required
object (CostCenterId)
name
required
string
externalId
string
Responses
204

Updated Successfully

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/cost-centers/{costCenterId}
Request samples
application/json
{
  • "employeeCount": 120,
  • "id": {
    },
  • "name": "CostCenter",
  • "externalId": "external-id"
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete cost center

This endpoint deletes a cost center by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterId
required
string <uuid>

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
detachUsers
boolean
Default: false

Whether to remove this cost center's reference from associated user entities.

Responses
204

No Content

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}/cost-centers/{costCenterId}
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Offices

APIs to create and manage company offices.

Create office

This endpoint creates an office.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093946
Request Body schema: application/json
object (PostalAddress)

Postal Address Details

name
string
object (Latlng)

Latitude and Longitude for a Location

externalId
string
taxId
string
Responses
201

Created

400

Bad request

401

Unauthorized

403

Forbidden

post/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices
Request samples
application/json
{
  • "address": {
    },
  • "name": "Office name",
  • "latlng": {
    },
  • "externalId": "external-id",
  • "taxId": "123232"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

List offices of the legal entity

This endpoint list offices of given legal entity. If externalId is provided in query param, the office having the externalId is fetched.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093946
query Parameters
externalId
string

External id of the entity.

Example: externalId=office-external-id
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices
Request samples
Response samples
application/json
{
  • "length": 0,
  • "elements": [
    ]
}

Get office

This endpoint gets an office by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
officeId
required
string <uuid>

Identifier for office.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}
Request samples
Response samples
application/json
{
  • "address": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "Office",
  • "latlng": {
    },
  • "externalId": "external-id",
  • "taxId": "123232"
}

Update office

This endpoing updates office by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
officeId
required
string <uuid>

Identifier for office.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
object (PostalAddress)

Postal Address Details

id
string <uuid>
name
string
object (Latlng)

Latitude and Longitude for a Location

externalId
string
taxId
string
Responses
204

Updated successfully

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}
Request samples
application/json
{
  • "address": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "Office",
  • "latlng": {
    },
  • "externalId": "external-id",
  • "taxId": "123232"
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete office

This endpoint deletes office by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
legalEntityId
required
string <uuid>

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093947
officeId
required
string <uuid>

Identifier for office.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
detachUsers
boolean
Default: false

Whether to remove this entity's reference from associated user entities.

Responses
204

Deleted

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Departments

APIs to create and manage departments.

Create department

This endpoint creates a department.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
name
required
string

Name of the department

externalId
string

External id of the department

Responses
201

OK

400

Bad request

401

Unauthorized

403

Forbidden

post/v2/companies/{companyId}/departments
Request samples
application/json
{
  • "name": "string",
  • "externalId": "department-external-id"
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

List departments

This endpoint lists departments of a company.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
externalId
string

External id of the department.

Example: externalId=department-external-id
Responses
200

OK

401

Unauthorized

403

Forbidden

get/v2/companies/{companyId}/departments
Request samples
Response samples
application/json
{
  • "length": 0,
  • "elements": [
    ]
}

Get department

This endpoint gets a department by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
departmentId
required
string <uuid>

Identifier for department.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/departments/{departmentId}
Request samples
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "IT Department",
  • "externalId": "department-ext-id"
}

Update department

This endpoint updates department by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
departmentId
required
string <uuid>

Identifier for department.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
id
required
string <uuid>
name
required
string

Name of the department

externalId
string

External id of the department

Responses
204

Updated Successfully

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/departments/{departmentId}
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "IT Department",
  • "externalId": "department-ext-id"
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Delete department

This endpoint deletes department by ID.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
departmentId
required
string <uuid>

Identifier for department.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
detachUsers
boolean
Default: false

Whether to remove this entity's reference from associated user entities.

Responses
204

Deleted Successfully

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

delete/v2/companies/{companyId}/departments/{departmentId}
Request samples
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Service Charge Plan

APIs to manage service charge plans.

Get per-trip service charge configuration

Get per-trip service charge configuration for company

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Company ID

Example: f49d00fe-1eda-4304-ba79-a980f565281d
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/license/company/{companyId}/service-charge/per-trip
Request samples
Response samples
application/json
{
  • "config": {
    },
  • "enabled": true,
  • "enableDisableOpSupported": true
}

Set per-trip service charge configuration

Set per-trip service charge configuration for company

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Company ID

Example: f49d00fe-1eda-4304-ba79-a980f565281d
Request Body schema: application/json
required
object (FixedChargeConfig)

Fixed charge configuration for service charge

Responses
204

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/license/company/{companyId}/service-charge/per-trip
Request samples
application/json
{
  • "config": {
    }
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Service Charge

List service charges

List service charges for a given entity

SecurityBearer
Request
path Parameters
entityType
required
string (ServiceChargeEntityType)

Entity type for service charge

Enum: "TRIP" "USER"
Example: TRIP
entityId
required
string

Entity ID for service charge e.g. trip ID for entityType = TRIP

Example: 1234567890
type
required
string (ServiceChargeType)

Service charge type.

Value: "TMC_CHARGE"
Example: TMC_CHARGE
Request Body schema: application/json
serviceType
string (ServiceType)

Type of service charge (Optional).

Enum: "ITINERARY_BOOKING" "AGENT_CONTACT"
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

post/v2/service-charge/{entityType}/{entityId}/types/{type}/list
Request samples
application/json
{
  • "serviceType": "ITINERARY_BOOKING"
}
Response samples
application/json
{
  • "serviceCharges": [
    ]
}

Company Enrollment

Updates Enrollment config

This endpoint stores Enrollment config for the company at TMC level.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Request Body schema: application/json
termsAndConditions
required
string

Link to terms and conditions.

Responses
200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/enrollment-config
Request samples
application/json
{}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get enrollment config

This endpoint fetches the enrollment config for the company.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/enrollment-config
Request samples
Response samples
application/json
{}

Company Tier

Updates Tier config

This endpoint stores Tier config for the company at TMC level.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=ORG
Request Body schema: application/json
Array of objects (TierDefinition)

A list of tiers for this company.

Responses
200

OK

400

Bad request

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

put/v2/companies/{companyId}/tier-config
Request samples
application/json
{
  • "tiers": [
    ]
}
Response samples
application/json
{
  • "debugIdentifier": "string",
  • "errorMessages": [
    ]
}

Get tier config

This endpoint fetches the tier config for the company.

SecurityBearer
Request
path Parameters
companyId
required
string <uuid>

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
query Parameters
companyRole
string (CompanyRole)

Role of the company.

Enum: "ORG" "TMC" "PARTNER_TMC" "HR_FEED_CONNECTOR" "TRIPS_DATA_CONNECTOR"
Example: companyRole=ORG
Responses
200

OK

401

Unauthorized

403

Forbidden

404

The specified resource was not found.

get/v2/companies/{companyId}/tier-config
Request samples
Response samples
application/json
{
  • "tiers": [
    ]
}
Copyright © 2020-2024 Spotnana Technology, Inc.