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?externalId=department-external-id' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "length": 0, "elements": [ { … } ] }
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>'