Switch Current User Company
This endpoint allows you to switch a user from their current company to another. The new company must be a network company that the user is linked to.
Path parameters
-
The ID of the company you want to link the user to.
PATCH
/api/v2/user/companies/{NewCompanyID}
curl \
-X PATCH https://api.fincalc.co.uk/api/v2/user/companies/{NewCompanyID} \
-H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"success": true,
"message": "User successfully updated to company 167"
}
Response examples (404)
{
"success": false,
"message": "New company id must be an integer."
}
Response examples (422)
{
"success": false,
"message": "New company id must be a network company."
}