Let an owner or admin drive rounds
PATCH
/members/{userId}/drives-rounds
const url = 'https://example.com/members/example/drives-rounds';const options = { method: 'PATCH', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"drivesRounds":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/members/example/drives-rounds \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "drivesRounds": true }'An owner or admin put forward to drive can be given a round, so they can cover for a driver who is off. They keep their role. A driver always drives, so has nothing to change here. Admins may not change it for an owner.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
drivesRounds
required
boolean
Example generated
{ "drivesRounds": true}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
user
required
object
id
required
string
email
required
string format: email
firstName
required
string
lastName
required
string
name
required
string
emailVerified
required
boolean
twoFactorEnabled
required
boolean
twoFactorMethod
required
string | null
image
required
string | null
role
required
Owner: billing, deleting the tenant, full control of members. admin: all operational work and may manage drivers and admins. driver: their own round only.
string
stockTakeAllowed
boolean
drivesRounds
boolean
joinedAt
required
string format: date-time
Example
{ "user": { "id": "kZ8n2xQpR1vLmT4wY7bJc", "email": "joe.bloggs@example.com", "firstName": "Joe", "lastName": "Bloggs", "name": "Joe Bloggs", "twoFactorMethod": "totp" }, "role": "owner"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or the role is not allowed to do this
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not an owner or admin in this business
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}