APIs to onboard and manage company.
curl -i -X POST \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "numberOfEmployees": 0, "externalId": "external-id" }'
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }
curl -i -X GET \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers?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}/cost-centers/{costCenterId}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "employeeCount": 120, "id": { "id": "731ccbca-0415-6fe1-d235-c324dfbe7423" }, "name": "CostCenter", "externalId": "external-id" }
curl -i -X PUT \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers/{costCenterId}' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \ -H 'Content-Type: application/json' \ -d '{ "employeeCount": 120, "id": { "id": "731ccbca-0415-6fe1-d235-c324dfbe7423" }, "name": "CostCenter", "externalId": "external-id" }'
{ "debugIdentifier": "string", "errorMessages": [ { … } ] }
curl -i -X DELETE \ 'https://developer.spotnana.com/_mock/openapi/companyapi/v2/companies/{companyId}/cost-centers/{costCenterId}?detachUsers=false' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "debugIdentifier": "string", "errorMessages": [ { … } ] }