Skip to content
Download OpenAPI description
Languages
Servers
Sandbox URL

https://api-ext-sboxmeta.partners.spotnana.com/

Spotnana mock server

https://developer.spotnana.com/_mock/openapi/companyapi/

Companies

APIs to onboard and manage company.

Operations

Cost Centers

APIs to create and manage company cost centers.

Operations

Request

This endpoint creates a cost center.

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/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
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
Response
application/json
{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }

Request

This endpoint gets a cost center by ID.

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

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

Request

This endpoint updates a cost center by ID.

Security
Bearer
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
idobject(CostCenterId)required
id.​idstringrequired
Example: "731ccbca-0415-6fe1-d235-c324dfbe7423"
namestringrequired
Example: "CostCenter"
externalIdstring
Example: "external-id"
curl -i -X PUT \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": {
      "id": "731ccbca-0415-6fe1-d235-c324dfbe7423"
    },
    "name": "CostCenter",
    "externalId": "external-id"
  }'

Responses

Updated Successfully

Response
No content

Request

This endpoint deletes a cost center by ID.

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers/4974a66b-7493-4f41-908c-58ba81093947?detachUsers=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
No content

Request

This endpoint lists cost centers of a company.

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for company.

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

Search string entered by the user

Example: "Credit"
paginationParamsobject(OffsetBasedPaginationRequestParams)required
paginationParams.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
paginationParams.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
filtersArray of objects(ListCostCentersFilter)

List of filters. Cost centers matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "Credit",
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "filters": [
      {
        "externalIds": [
          "external-id"
        ],
        "costCenterIds": [
          "731ccbca-0415-6fe1-d235-c324dfbe7423"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationParamsobject(OffsetBasedPaginationResponseParams)required
paginationParams.​totalNumResultsinteger(int32)required

Total number of results.

costCentersArray of objects(CostCenterInfo)

List of cost centers containing id and name.

Response
application/json
{ "paginationParams": { "totalNumResults": 0 }, "costCenters": [ {} ] }

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.

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers?externalId=cost-center-external-id' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
lengthinteger(int32)
elementsArray of objects(Reference)

List of references containing id and name.

totalNumResultsinteger(int32)

Total number of results

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

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
Operations
Operations
Operations