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

Create office

Request

This endpoint creates an office.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for legal-entity.

Example: 4974a66b-7493-4f41-908c-58ba81093946
Bodyapplication/jsonrequired
addressobject(PostalAddress)

Postal Address Details

namestring
Example: "Office name"
latlngobject(Latlng)

Latitude and Longitude for a Location

externalIdstring
Example: "external-id"
taxIdstring
Example: "123232"
curl -i -X POST \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": {
      "addressLines": [
        "Golden Gate Bridge"
      ],
      "administrativeArea": "CA",
      "administrativeAreaName": "California",
      "description": "San Francisco Home",
      "isDefault": true,
      "languageCode": "en",
      "locality": "San Francisco",
      "locationCode": "LAX",
      "organization": "Spotnana",
      "postalCode": "94130",
      "continentCode": "AF",
      "recipients": [
        "string"
      ],
      "regionCode": "US",
      "regionName": "America",
      "revision": 1,
      "sortingCode": "Jamaica",
      "sublocality": "string",
      "timezone": "America/Los_Angeles",
      "coordinates": {
        "latitude": 77.1025,
        "longitude": 28.7041
      }
    },
    "name": "Office name",
    "latlng": {
      "latitude": 77.1025,
      "longitude": 28.7041
    },
    "externalId": "external-id",
    "taxId": "123232"
  }'

Responses

Created

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

List offices of the legal entity

Request

This endpoint list offices of given legal entity. If externalId is provided in query param, the office having the externalId is fetched.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for legal-entity.

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

External id of the entity.

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

Request

This endpoint gets an office by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for legal-entity.

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

Identifier for office.

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

Responses

OK

Bodyapplication/json
addressobject(PostalAddress)

Postal Address Details

idstring(uuid)
namestring
Example: "Office"
latlngobject(Latlng)

Latitude and Longitude for a Location

externalIdstring
Example: "external-id"
taxIdstring
Example: "123232"
Response
application/json
{ "address": { "addressLines": [], "administrativeArea": "CA", "administrativeAreaName": "California", "description": "San Francisco Home", "isDefault": true, "languageCode": "en", "locality": "San Francisco", "locationCode": "LAX", "organization": "Spotnana", "postalCode": "94130", "continentCode": "AF", "recipients": [], "regionCode": "US", "regionName": "America", "revision": 1, "sortingCode": "Jamaica", "sublocality": "string", "timezone": "America/Los_Angeles", "coordinates": {} }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "Office", "latlng": { "latitude": 77.1025, "longitude": 28.7041 }, "externalId": "external-id", "taxId": "123232" }

Update office

Request

This endpoing updates office by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for legal-entity.

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

Identifier for office.

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

Postal Address Details

idstring(uuid)
namestring
Example: "Office"
latlngobject(Latlng)

Latitude and Longitude for a Location

externalIdstring
Example: "external-id"
taxIdstring
Example: "123232"
curl -i -X PUT \
  'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/legal-entities/{legalEntityId}/offices/{officeId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": {
      "addressLines": [
        "Golden Gate Bridge"
      ],
      "administrativeArea": "CA",
      "administrativeAreaName": "California",
      "description": "San Francisco Home",
      "isDefault": true,
      "languageCode": "en",
      "locality": "San Francisco",
      "locationCode": "LAX",
      "organization": "Spotnana",
      "postalCode": "94130",
      "continentCode": "AF",
      "recipients": [
        "string"
      ],
      "regionCode": "US",
      "regionName": "America",
      "revision": 1,
      "sortingCode": "Jamaica",
      "sublocality": "string",
      "timezone": "America/Los_Angeles",
      "coordinates": {
        "latitude": 77.1025,
        "longitude": 28.7041
      }
    },
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "Office",
    "latlng": {
      "latitude": 77.1025,
      "longitude": 28.7041
    },
    "externalId": "external-id",
    "taxId": "123232"
  }'

Responses

Updated successfully

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

Delete office

Request

This endpoint deletes office by ID.

Path
companyIdstring(uuid)required

Identifier for company.

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

Identifier for legal-entity.

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

Identifier for office.

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}/legal-entities/{legalEntityId}/offices/{officeId}?detachUsers=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Deleted

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

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