Switches the current session's company/database.

​

Changes the active company (database) for the current login, whether acting as an employee registered in several companies, or as a regular login registered in several databases. Generates a new JWT token pair scoped to the target company/database for JWT bearer sessions, or re-signs the cookie for cookie-based sessions. Permissions: All users.

Headers

  • The Integration Key generated for API Authentication by the PAR OPS support team as part of the integration/partnership process.

Body·

The target company (database name) to switch to.

Company model.

  • Name of company. Currently it is equal to database name.

Responses

Request Example for post/v2/Account/SwitchCompany
curl /v2/Account/SwitchCompany \
  --request POST \
  --header 'Content-Type: application/json-patch+json' \
  --header 'DCKey: YOUR_SECRET_TOKEN' \
  --data '{
  "Name": ""
}'
{
  "AccessToken": "string",
  "RefreshToken": "string"
}