When a user has several organizations, he needs to switch to the one where he wants to do some operations (create a project, etc.)
You can use this route to set the current organization of the user (identified by its ID).
POST /aos/v1/organizations/switch
| Parameter | Type | Mandatory |
|---|---|---|
| organization_id | string (uuid) | yes |
{
"organization_id": "97740901-3431-4290-a799-ba27d1161508"
}
Status: 200 OK
It returns a organization object as described in the Retrieve an organization route.
{
"organization": {
"id": "97740901-3431-4290-a799-ba27d1161508",
"name": "Agence 1",
"information": {
"fiscal_number": "12345678901234"
},
"addresses": [
{
"number": "1",
"address": "rue de l'agence",
"zip_code": "75008",
"city": "PARIS",
"country": "fr"
}
],
"users": [
{
"first_name": "User",
"last_name": "Name",
"phone": "+33102030405",
"mobile": null,
"email": "email@email.com",
"is_registered": true
}
// Other users...
],
"created_at": "2018-03-08T08:25:24.827000Z",
"updated_at": "2022-03-22T08:54:24.204000Z"
}
}
}