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

Offices

APIs to create and manage company offices.

Operations

Departments

APIs to create and manage departments.

Operations

Create department

Request

This endpoint creates a department.

Path
companyIdstring(uuid)required

Identifier for company.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
namestringrequired

Name of the department

externalIdstring

External id of the department

Example: "department-external-id"
curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "externalId": "department-external-id"
  }'

Responses

OK

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

List departments

Request

This endpoint lists departments of a company.

Path
companyIdstring(uuid)required

Identifier for company.

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

External id of the department.

Example: externalId=department-external-id
curl -i -X GET \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments?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 department

Request

This endpoint gets a department by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for department.

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

Responses

OK

Bodyapplication/json
idstring(uuid)required
namestringrequired

Name of the department

Example: "IT Department"
externalIdstring

External id of the department

Example: "department-ext-id"
Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "IT Department", "externalId": "department-ext-id" }

Update department

Request

This endpoint updates department by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for department.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
idstring(uuid)required
namestringrequired

Name of the department

Example: "IT Department"
externalIdstring

External id of the department

Example: "department-ext-id"
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments/{departmentId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "IT Department",
    "externalId": "department-ext-id"
  }'

Responses

Updated Successfully

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

Delete department

Request

This endpoint deletes department by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for department.

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

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

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

Responses

Deleted Successfully

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

Service Charge Plan

APIs to manage service charge plans.

Operations

Service Charge

Operations

Company Enrollment

Operations

Company Tier

Operations