APIs to onboard and manage company.
curl -i -X POST \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/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://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments?externalId=string' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "length": 0, "elements": [ { … } ] }
curl -i -X GET \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments/{departmentId}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "IT Department", "externalId": "department-ext-id" }
curl -i -X PUT \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments/{departmentId}' \ -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" }'
{ "debugIdentifier": "string", "errorMessages": [ { … } ] }
curl -i -X DELETE \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/departments/{departmentId}?detachUsers=false' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "debugIdentifier": "string", "errorMessages": [ { … } ] }