Users & Roles
Models
Projects
LineItems
Pricing & Feasibility
Models
Events
Models
Invoicing
Reconciliation
Attributes
Categories
Countries & Languages
Supplier Sources
Metadata
Quota Plan Templates
Models
Powered by Stoplight
post

/switchCompany

Obtain the access token for another company using the refresh token of a logged in user.

You can store the access Token from the response of this call to then use for subsequent API calls.

Request Body

1 Example
Schema
object
clientId
string

Your app id. Provided to you during account setup. Will always be api

refreshToken
string

Refresh token that can be used to obtain a new access token before the access token expires

companyId
integer

unique identifier for the company that you want to switch the accessToken into

Responses

1 Example
Schema
object
accessToken
string

Access token that should be passed in API calls

expiresIn
integer

Access token expires in this many seconds

refreshExpiresIn
integer

Refresh token expires in this many seconds

refreshToken
string

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.