Skip to content

Open a business as one of its people

POST
/console/businesses/{id}/view-as
curl --request POST \
--url https://example.com/console/businesses/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/view-as \
--header 'Content-Type: application/json' \
--cookie bottle.session_token=<bottle.session_token> \
--data '{ "userId": "example", "reason": "example", "override": true }'

A real session for that person, marked with who is behind it, good for an hour at most. Refused unless the business has let support in: view allows only reading, act allows changes. With override, a console owner opens it without a grant, with the right to change things, giving a reason; the reason and who gave it go into the record for internal review, and the business is not told. The browser is signed in as that person by the cookie in the answer; an assistant sends the token as a bearer. Everything done in the session is recorded.

id
required

UUID v7

string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f

UUID v7

Media typeapplication/json
object
userId
required
string
>= 1 characters
reason
string
<= 500 characters
override
boolean
Examplegenerated
{
"userId": "example",
"reason": "example",
"override": true
}

Opened

Media typeapplication/json
object
token
required
string
expiresAt
required
string format: date-time
level
required
string
Allowed values: view act
userId
required
string
userName
required
string
tenantId
required

UUID v7

string format: uuid
Example
{
"level": "view",
"tenantId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"
}

Not signed in

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not Bottle staff, no two-step sign-in, or a console role too low for this

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Not found

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "not_found",
"message": "Customer not found"
}

Validation failed

Media typeapplication/json
object
error
required
string
Allowed values: validation
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{
"error": "validation",
"issues": [
{
"path": "email",
"message": "Invalid email"
}
]
}