Creating a user
The steps below explain how to create a new user.
Step | Name | Endpoint | Details |
---|---|---|---|
List companies | /v2/companies/ | List all the companies that are part of the TMC. Use this endpoint to find the companyId of the company for which a new user needs to be created. Request body requires: The companyRole must be set to ORG . Response will contain: The list of companyIds along with the company names . Other APIs will use: companyId of the company for which a new user profile needs to be created. | |
List legal entities | /v2/companies/{companyId}/legal-entities | List all legal entities that are part of a company. URL path requires: companyId from step 1. Response will contain: The list of all legal entity ids along with their names . Other APIs will use: The id of the legal entity under which the user needs to be created. | |
Create user | /v2/users/ | Create a new user profile on the Spotnana platform. Request body requires: The persona of the user, businessInfo > legalEntityRef > id from step 2, and organizationRef > id from step 1. These are the only mandatory fields that must be populated when creating a new user. All the other fields in the /v2/users/ API are optional and can be updated later using the update user endpoint. Note: The companyId retrieved from step 1 can be used as the orgId in this endpoint. Response will contain: The userId of the user. You can use this identifier to update other user details via the update user API. |