Invite operator/driver to company
Users
POST invite operator (admin)
Endpoint
POST /api/v1/users/invitation
Parameters
Name | Description |
---|---|
user[email] required | |
user[first_name] required | First name |
user[last_name] required | Last name |
user[job_position] required | Job position (admin) |
user[company_id] required | Company id (admin) |
user[contact_phone_number] required | Contact phone number |
Request
Route
POST /api/v1/users/invitation
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxODQxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTM5LCJleHAiOjE3NTExMDg1MzksImp0aSI6ImJjOWI1MThmLTBiY2ItNGE0Ni1hMzA1LWE3MmRmMDg5NTZiMSJ9.DQbSxG0knveyb9J0AGVJoc0Sk_18oODt5cxwKtVn40Y
Host: example.org
Cookie:
Body
{
"user": {
"email": "pennie@padberg.test",
"first_name": "Jasper",
"last_name": "McCullough",
"job_position": "Operator",
"company_id": 704,
"contact_phone_number": "07771 504674"
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"222c65e3e99f63f0056eda36c432eb6e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 302f1478-4857-436f-85b6-7bf9726b3f95
x-runtime: 0.056844
content-length: 366
Body
{
"user": {
"id": 1842,
"company": {
"id": 704,
"address": "7120 Jacobi Lodge, Schmelermouth, SC O9 5HJ",
"license_number": "4413331214",
"name": "Jaskolski Inc",
"state": "verified"
},
"contact_phone_number": "07771 504674",
"email": "pennie@padberg.test",
"first_name": "Jasper",
"job_position": "Operator",
"last_name": "McCullough",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}