Company API (v2)

Download OpenAPI description
Languages
Servers
Mock server
https://developer.spotnana.com/_mock/openapi/companyapi/
Staging URL
https://apis.spotnana.com/

Companies

APIs to onboard and manage company.

Operations

Cost Centers

APIs to create and manage company cost centers.

Operations

Create cost center

Request

This endpoint creates a cost center.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
namestringrequired
numberOfEmployeesinteger(int32)
externalIdstring
Example: "external-id"
curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "numberOfEmployees": 0,
    "externalId": "external-id"
  }'

Responses

OK

Bodyapplication/json
idstring(uuid)required
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }

List cost centers

Request

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.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
externalIdstring

External id of the cost center.

Example: externalId=cost-center-external-id
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers?externalId=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
lengthinteger(int32)
elementsArray of objects(Reference object containing uuid and name of the entity.)

List of references containing id and name.

Response
application/json
{ "length": 0, "elements": [ {} ] }

Get cost center

Request

This endpoint gets a cost center by ID.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterIdstring(uuid)required

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers/{costCenterId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
employeeCountinteger(int32)

Count of employees in the cost center

Example: 120
idobject(CostCenterId)required
id.​idstringrequired
Example: "731ccbca-0415-6fe1-d235-c324dfbe7423"
namestringrequired
Example: "CostCenter"
externalIdstring
Example: "external-id"
Response
application/json
{ "employeeCount": 120, "id": { "id": "731ccbca-0415-6fe1-d235-c324dfbe7423" }, "name": "CostCenter", "externalId": "external-id" }

Update cost center

Request

This endpoint updates a cost center by ID.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterIdstring(uuid)required

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
employeeCountinteger(int32)

Count of employees in the cost center

Example: 120
idobject(CostCenterId)required
id.​idstringrequired
Example: "731ccbca-0415-6fe1-d235-c324dfbe7423"
namestringrequired
Example: "CostCenter"
externalIdstring
Example: "external-id"
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers/{costCenterId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "employeeCount": 120,
    "id": {
      "id": "731ccbca-0415-6fe1-d235-c324dfbe7423"
    },
    "name": "CostCenter",
    "externalId": "external-id"
  }'

Responses

Updated Successfully

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Delete cost center

Request

This endpoint deletes a cost center by ID.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
costCenterIdstring(uuid)required

Identifier for cost-center.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Query
detachUsersboolean

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

Default false
curl -i -X DELETE \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers/{costCenterId}?detachUsers=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
application/json
{ "debugIdentifier": "string", "errorMessages": [ {} ] }

Offices

APIs to create and manage company offices.

Operations

Departments

APIs to create and manage departments.

Operations

Service Charge Plan

APIs to manage service charge plans.

Operations

Service Charge

Operations

Company Enrollment

Operations

Company Tier

Operations