# Company API

Version: v2

## Servers

Sandbox URL
```
https://api-ext-sboxmeta.partners.spotnana.com
```

## Security

### Bearer

Type: http
Scheme: bearer

## Download OpenAPI description

 - [Company API](https://developer.spotnana.com/_bundle/openapi/CompanyApi.yaml)

## Companies

 - [POST /v2/companies](https://developer.spotnana.com/openapi/companyapi/companies/createcompany.md): This endpoint creates a company. This is allowed only by TMC_ADMIN and above roles.
 - [GET /v2/companies](https://developer.spotnana.com/openapi/companyapi/companies/listcompanies.md): This endpoint lists companies. If externalId is provided in query param, only the company having the specified external ID is returned.
 - [GET /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/readcompany.md): This endpoint gets a company by ID.
 - [PUT /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/updatecompany.md): This endpoint updates a company by ID.
 - [DELETE /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/deletecompany.md): This endpoint deletes a company by ID.
 - [POST /v2/companies/{companyId}/designation-list](https://developer.spotnana.com/openapi/companyapi/companies/getdesignationlist.md): Returns list of unique designations assigned to employees of the given company
 - [GET /v2/companies/{companyId}/features](https://developer.spotnana.com/openapi/companyapi/companies/getcompanyfeatures.md)
 - [PATCH /v2/companies/{companyId}/features](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanyfeaturespatch.md)
 - [GET /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/getcompanytravelcontentconfig.md)
 - [PUT /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanytravelcontentconfig.md)
 - [DELETE /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/deletecompanytravelcontentconfig.md)
 - [PUT /v2/companies/{companyId}/white-label-config](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanywhitelabelconfig.md): This endpoint stores white label config for the company at different entity levels.
 - [GET /v2/companies/{companyId}/white-label-config](https://developer.spotnana.com/openapi/companyapi/companies/getcompanywhitelabelconfig.md): This endpoint fetches the white label config for the company.
 - [DELETE /v2/companies/{companyId}/white-label-config](https://developer.spotnana.com/openapi/companyapi/companies/deletecompanywhitelabelconfig.md): This endpoint deletes the white label config for the company.
 - [PUT /v2/companies/{companyId}/managers-config](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanymanagersconfig.md): This endpoint stores company managers config (account managers and customer success managers) for the company at different entity levels.
 - [GET /v2/companies/{companyId}/managers-config](https://developer.spotnana.com/openapi/companyapi/companies/getcompanymanagersconfig.md): This endpoint fetches the company managers config for the company.
 - [DELETE /v2/companies/{companyId}/managers-config](https://developer.spotnana.com/openapi/companyapi/companies/deletecompanymanagersconfig.md): This endpoint deletes the company managers config for the company.
 - [PUT /v2/companies/{companyId}/color-config](https://developer.spotnana.com/openapi/companyapi/companies/updatecolorconfig.md): This endpoint stores Color config for the company at some entity level.
 - [GET /v2/companies/{companyId}/color-config](https://developer.spotnana.com/openapi/companyapi/companies/getcolorconfig.md): This endpoint fetches the color config for the given entity.
 - [POST /v2/companies/{companyId}/vendor-preferences](https://developer.spotnana.com/openapi/companyapi/companies/uploadcompanypreferences.md)
 - [PUT /v2/companies/{companyId}/preference-tiers](https://developer.spotnana.com/openapi/companyapi/companies/storepreferencetiers.md): This endpoint store the tiers with respective label for a company.
 - [GET /v2/companies/{companyId}/preference-tiers](https://developer.spotnana.com/openapi/companyapi/companies/listpreferencetiers.md): Read all preference tiers with respective label for a company.
 - [GET /v2/companies/{companyId}/support-config](https://developer.spotnana.com/openapi/companyapi/companies/getcompanysupportconfig.md)
## Legal Entities

 - [POST /v2/companies/{companyId}/legal-entities](https://developer.spotnana.com/openapi/companyapi/legal-entities/createlegalentity.md): This endpoint creates a legal entity.
 - [GET /v2/companies/{companyId}/legal-entities](https://developer.spotnana.com/openapi/companyapi/legal-entities/listlegalentities.md): 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.
 - [GET /v2/companies/{companyId}/legal-entities/{legalEntityId}](https://developer.spotnana.com/openapi/companyapi/legal-entities/getlegalentity.md): This endpoint gets a legal entity by ID.
 - [PUT /v2/companies/{companyId}/legal-entities/{legalEntityId}](https://developer.spotnana.com/openapi/companyapi/legal-entities/updatelegalentity.md): This endpoint updates a legal entity by ID.
 - [DELETE /v2/companies/{companyId}/legal-entities/{legalEntityId}](https://developer.spotnana.com/openapi/companyapi/legal-entities/deletelegalentity.md): This endpoint deletes a legal entity by ID.
## Cost Centers

 - [POST /v2/companies/{companyId}/cost-centers](https://developer.spotnana.com/openapi/companyapi/cost-centers/createcostcenter.md): This endpoint creates a cost center.
 - [GET /v2/companies/{companyId}/cost-centers/{costCenterId}](https://developer.spotnana.com/openapi/companyapi/cost-centers/getcostcenter.md): This endpoint gets a cost center by ID.
 - [PUT /v2/companies/{companyId}/cost-centers/{costCenterId}](https://developer.spotnana.com/openapi/companyapi/cost-centers/updatecostcenter.md): This endpoint updates a cost center by ID.
 - [DELETE /v2/companies/{companyId}/cost-centers/{costCenterId}](https://developer.spotnana.com/openapi/companyapi/cost-centers/deletecostcenter.md): This endpoint deletes a cost center by ID.
 - [POST /v3/companies/{companyId}/cost-centers/list](https://developer.spotnana.com/openapi/companyapi/cost-centers/listcostcentersv3.md): This endpoint lists cost centers of a company.
 - [GET /v2/companies/{companyId}/cost-centers](https://developer.spotnana.com/openapi/companyapi/cost-centers/listcostcenters.md): 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.
## Offices

 - [POST /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices](https://developer.spotnana.com/openapi/companyapi/offices/createoffice.md): This endpoint creates an office.
 - [GET /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices](https://developer.spotnana.com/openapi/companyapi/offices/listlegalentityoffices.md): This endpoint list offices of given legal entity. If externalId is provided in query param, the office having the externalId is fetched.
 - [POST /v2/companies/{companyId}/office-list](https://developer.spotnana.com/openapi/companyapi/offices/listofficesv2.md)
 - [GET /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}](https://developer.spotnana.com/openapi/companyapi/offices/getoffice.md): This endpoint gets an office by ID.
 - [PUT /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}](https://developer.spotnana.com/openapi/companyapi/offices/updateoffice.md): This endpoing updates office by ID.
 - [DELETE /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}](https://developer.spotnana.com/openapi/companyapi/offices/deleteoffice.md): This endpoint deletes office by ID.
## Departments

 - [POST /v2/companies/{companyId}/departments](https://developer.spotnana.com/openapi/companyapi/departments/createdepartment.md): This endpoint creates a department.
 - [GET /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/getdepartment.md): This endpoint gets a department by ID.
 - [PUT /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/updatedepartment.md): This endpoint updates department by ID.
 - [DELETE /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/deletedepartment.md): This endpoint deletes department by ID.
 - [POST /v3/companies/{companyId}/departments/list](https://developer.spotnana.com/openapi/companyapi/departments/listdepartmentsv3.md): This endpoint lists departments of a company.
 - [GET /v2/companies/{companyId}/departments](https://developer.spotnana.com/openapi/companyapi/departments/listdepartments.md): This endpoint lists departments of a company.
## Grades

 - [POST /v2/companies/{companyId}/grades](https://developer.spotnana.com/openapi/companyapi/grades/creategrade.md): This endpoint creates a grade.
 - [GET /v2/companies/{companyId}/grades/{gradeId}](https://developer.spotnana.com/openapi/companyapi/grades/getgrade.md): This endpoint gets a grade by ID.
 - [PUT /v2/companies/{companyId}/grades/{gradeId}](https://developer.spotnana.com/openapi/companyapi/grades/updategrade.md): This endpoint updates grade by ID.
 - [DELETE /v2/companies/{companyId}/grades/{gradeId}](https://developer.spotnana.com/openapi/companyapi/grades/deletegrade.md): This endpoint deletes grade by ID.
 - [POST /v2/companies/{companyId}/grades/list](https://developer.spotnana.com/openapi/companyapi/grades/listgrades.md): This endpoint lists grades of a company.
## Service Charge Plan

 - [GET /v2/license/company/{companyId}/service-charge/per-trip](https://developer.spotnana.com/openapi/companyapi/service-charge-plan/getcompanypertripsrvcharge.md): Get per-trip service charge configuration for company
 - [POST /v2/license/company/{companyId}/service-charge/per-trip](https://developer.spotnana.com/openapi/companyapi/service-charge-plan/setcompanypertripsrvcharge.md): Set per-trip service charge configuration for company
## Partner Public Keys

 - [POST /v2/companies/{companyId}/partner-public-keys](https://developer.spotnana.com/openapi/companyapi/partner-public-keys/addpartnerpublickey.md): Adds one or more public keys for a partner organization to use for token exchange authentication. Accessible to TMC, company, and global admins.
 - [GET /v2/companies/{companyId}/partner-public-keys](https://developer.spotnana.com/openapi/companyapi/partner-public-keys/listpartnerpublickeys.md): Lists partner public keys for a TMC. Accessible to TMC, company, and global admins.
 - [DELETE /v2/companies/{companyId}/partner-public-keys/{kid}](https://developer.spotnana.com/openapi/companyapi/partner-public-keys/revokepartnerpublickey.md): Revokes a partner public key identified by kid. Accessible to TMC, company, and global admins.
## Tenant Encryption

 - [POST /v3/tenant-encryption/{companyId}/key](https://developer.spotnana.com/openapi/companyapi/tenant-encryption/provisionorrotatetenantkey.md): First call provisions a Spotnana-managed CMK and DEK. Subsequent calls rotate the CMK and re-wrap the existing DEK. Returns 429 if called within the one-hour cooldown window. Requires the COMPANY_MANA
## Service Charge

 - [POST /v2/service-charge/{entityType}/{entityId}/types/{type}/list](https://developer.spotnana.com/openapi/companyapi/service-charge/listservicecharges.md): List service charges for a given entity
## Company Enrollment

 - [PUT /v2/companies/{companyId}/enrollment-config](https://developer.spotnana.com/openapi/companyapi/company-enrollment/updatecompanyenrollmentconfig.md): This endpoint stores Enrollment config for the company at TMC level.
 - [GET /v2/companies/{companyId}/enrollment-config](https://developer.spotnana.com/openapi/companyapi/company-enrollment/getcompanyenrollmentconfig.md): This endpoint fetches the enrollment config for the company.
## Company Tier

 - [PUT /v2/companies/{companyId}/tier-config](https://developer.spotnana.com/openapi/companyapi/company-tier/updatecompanytierconfig.md): This endpoint stores Tier config for the company at TMC level.
 - [GET /v2/companies/{companyId}/tier-config](https://developer.spotnana.com/openapi/companyapi/company-tier/getcompanytierconfig.md): This endpoint fetches the tier config for the company.
## Stealth Config

 - [PUT /v2/companies/{companyId}/stealth-config](https://developer.spotnana.com/openapi/companyapi/stealth-config/updatecompanystealthconfig.md): This endpoint stores Stealth config for the company.
 - [GET /v2/companies/{companyId}/stealth-config](https://developer.spotnana.com/openapi/companyapi/stealth-config/getcompanystealthconfig.md): This endpoint fetches the stealth config for the company.
