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

Offices

APIs to create and manage company offices.

Operations

Request

This endpoint creates an office.

Security
Bearer
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)
namestring
Example: "Office name"
latlngobject(Latlng)
externalIdstring
Example: "external-id"
taxIdstring
Example: "123232"
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/legal-entities/4974a66b-7493-4f41-908c-58ba81093946/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
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
Response
application/json
{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }

Request

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

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/legal-entities/4974a66b-7493-4f41-908c-58ba81093946/offices?externalId=office-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 }

Request

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for company.

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

Search text

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
sortParamsobject(OfficeSortParams)
filtersArray of objects(ListOfficeFilter)

List of filters. Offices matching with any of filters would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/office-list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "string",
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "sortParams": {
      "sortBy": "NAME",
      "sortOrder": "DESC"
    },
    "filters": [
      {
        "countries": [
          "US",
          "IN"
        ],
        "officeIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "externalIds": [
          "string"
        ],
        "legalEntityIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
officesArray of objects(OfficeNode)required

List of Offices.

offices[].​legalEntityRefobject(Reference)required
offices[].​legalEntityRef.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
offices[].​legalEntityRef.​namestring
Example: "Name"
offices[].​officeobject(OfficeV2)required
offices[].​office.​addressobject(PostalAddress)
offices[].​office.​idstring(uuid)
offices[].​office.​namestring
Example: "Office"
offices[].​office.​latlngobject(Latlng)
offices[].​office.​externalIdstring
Example: "external-id"
offices[].​office.​taxIdstring
Example: "123232"
paginationParamsobject(OffsetBasedPaginationResponseParams)required
paginationParams.​totalNumResultsinteger(int32)required

Total number of results.

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

Request

This endpoint gets an office by ID.

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

Responses

OK

Bodyapplication/json
addressobject(PostalAddress)
idstring(uuid)
namestring
Example: "Office"
latlngobject(Latlng)
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" }

Request

This endpoing updates office by ID.

Security
Bearer
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)
idstring(uuid)
namestring
Example: "Office"
latlngobject(Latlng)
externalIdstring
Example: "external-id"
taxIdstring
Example: "123232"
curl -i -X PUT \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/legal-entities/4974a66b-7493-4f41-908c-58ba81093947/offices/4974a66b-7493-4f41-908c-58ba81093947 \
  -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
No content

Request

This endpoint deletes office by ID.

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

Responses

Deleted

Response
No content

Departments

APIs to create and manage departments.

Operations

Service Charge Plan

APIs to manage service charge plans.

Operations
Operations
Operations
Operations