APIs to onboard and manage company.
curl -i -X POST \
https://apis.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/departments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"externalId": "department-external-id"
}'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }
curl -i -X GET \
https://apis.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/departments/4974a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "IT Department", "externalId": "department-ext-id" }
curl -i -X PUT \
https://apis.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/departments/4974a66b-7493-4f41-908c-58ba81093947 \
-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"
}'
curl -i -X DELETE \
'https://apis.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/departments/4974a66b-7493-4f41-908c-58ba81093947?detachUsers=false' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
curl -i -X POST \
https://apis.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/departments/list \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"searchText": "Engineering",
"paginationParams": {
"offset": 0,
"limit": 100
},
"filters": [
{
"externalIds": [
"department-external-id"
],
"departmentIds": [
"731ccbca-0415-6fe1-d235-c324dfbe7423"
]
}
]
}'
{ "paginationParams": { "totalNumResults": 0 }, "departments": [ { … } ] }
curl -i -X GET \
'https://apis.spotnana.com/v2/companies/4974a66b-7493-4f41-908c-58ba81093947/departments?externalId=department-external-id' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "length": 0, "elements": [ { … } ], "totalNumResults": 0 }