# 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 APIs to onboard and manage company. ### Create company - [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. ### List companies - [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 company - [GET /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/readcompany.md): This endpoint gets a company by ID. ### Update company - [PUT /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/updatecompany.md): This endpoint updates a company by ID. ### Delete company - [DELETE /v2/companies/{companyId}](https://developer.spotnana.com/openapi/companyapi/companies/deletecompany.md): This endpoint deletes a company by ID. ### Get company features - [GET /v2/companies/{companyId}/features](https://developer.spotnana.com/openapi/companyapi/companies/getcompanyfeatures.md) ### Update Company Features - [PATCH /v2/companies/{companyId}/features](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanyfeaturespatch.md) ### Get company travel content config - [GET /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/getcompanytravelcontentconfig.md) ### Update company travel content config - [PUT /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/updatecompanytravelcontentconfig.md) ### Delete company travel content config - [DELETE /v2/companies/{companyId}/travel-content-config](https://developer.spotnana.com/openapi/companyapi/companies/deletecompanytravelcontentconfig.md) ### Updates white label config - [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 white label config - [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 white label config - [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. ### Updates company managers config - [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 company managers config - [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 company managers config - [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. ### Updates Color config - [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 color config - [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. ## Legal Entities APIs to create and manage company legal entities. ### Create legal entity - [POST /v2/companies/{companyId}/legal-entities](https://developer.spotnana.com/openapi/companyapi/legal-entities/createlegalentity.md): This endpoint creates a legal entity. ### List legal entities - [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 legal entity - [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. ### Update legal entity - [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 legal entity - [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 APIs to create and manage company cost centers. ### Create cost center - [POST /v2/companies/{companyId}/cost-centers](https://developer.spotnana.com/openapi/companyapi/cost-centers/createcostcenter.md): This endpoint creates a cost center. ### Get 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. ### Update cost center - [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 cost center - [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. ### List cost centers - [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. ### List cost centers (deprecated) - [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 APIs to create and manage company offices. ### Create office - [POST /v2/companies/{companyId}/legal-entities/{legalEntityId}/offices](https://developer.spotnana.com/openapi/companyapi/offices/createoffice.md): This endpoint creates an office. ### List offices of the legal entity - [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. ### List company offices - [POST /v2/companies/{companyId}/office-list](https://developer.spotnana.com/openapi/companyapi/offices/listofficesv2.md) ### Get office - [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. ### Update office - [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 office - [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 APIs to create and manage departments. ### Create department - [POST /v2/companies/{companyId}/departments](https://developer.spotnana.com/openapi/companyapi/departments/createdepartment.md): This endpoint creates a department. ### Get department - [GET /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/getdepartment.md): This endpoint gets a department by ID. ### Update department - [PUT /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/updatedepartment.md): This endpoint updates department by ID. ### Delete department - [DELETE /v2/companies/{companyId}/departments/{departmentId}](https://developer.spotnana.com/openapi/companyapi/departments/deletedepartment.md): This endpoint deletes department by ID. ### List departments - [POST /v3/companies/{companyId}/departments/list](https://developer.spotnana.com/openapi/companyapi/departments/listdepartmentsv3.md): This endpoint lists departments of a company. ### List departments (deprecated) - [GET /v2/companies/{companyId}/departments](https://developer.spotnana.com/openapi/companyapi/departments/listdepartments.md): This endpoint lists departments of a company. ## Service Charge Plan APIs to manage service charge plans. ### Get per-trip service charge configuration - [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 ### Set per-trip service charge configuration - [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 ## Service Charge ### List service charges - [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 ### Updates Enrollment config - [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 enrollment config - [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 ### Updates Tier config - [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 tier config - [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 ### Updates 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 stealth config - [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.