Select account
Request description
Endpoint: /users/select-account
Method: POST
Header
{
"Content-Type": "application/json",
"Authorization": "Bearer <accessToken>"
}
Payload example
{
"selectedAccount": "mock-organization-id" // Organization ID of the account to select
}
Payload structure
interface ISelectAccountPayload {
selectedAccount: string; // Organization ID of the account to select
}
Important note: The organizationId is obtained as a result of the authentication process using the User Login endpoint.
Responses
Correct response
Successful operation
Describe a successful operation when selecting an account
200
Response body example:
{
"message": "Data saved successfully"
}
interface ISelectedAccountResponse {
message: string;
}
Wrong responses
Unauthorized request
Describes the response when user is not authorized to select an account
401
Response body
type SelectAccountErrorResponse = {
message: string;
};
Forbidden request
Describes the response when user is not allowed to select an account
403
Response body
type SelectAccountErrorResponse = {
message: string;
};
Bad request
Describe an invalid request
400
Response structure
type SelectAccountErrorResponse = {
message: string;
};