Invite operator/driver to company
Users
POST invite driver (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.eyJzdWIiOiIxODQ4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTM5LCJleHAiOjE3NTExMDg1MzksImp0aSI6IjAxMTk1NjM3LWVhYzEtNDFhMi05NjIyLWVhMGRmOWIzZDFmOSJ9.zhwXwjqK6s9xXD2NtRjoNUlRG7uC0w88NKNJbD8r_tw
Host: example.org
Cookie:
Body
{
"user": {
"email": "laurice@quigley-ebert.test",
"first_name": "Wilford",
"last_name": "Goldner",
"job_position": "Operator",
"company_id": 706,
"contact_phone_number": "07848 942608",
"role": "driver"
}
}
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/"16a5599ae9b84ded31af5895a6b07724"
cache-control: max-age=0, private, must-revalidate
x-request-id: 26ed28c3-068d-45bc-a1a4-75e55b5e4ee3
x-runtime: 0.056072
content-length: 383
Body
{
"user": {
"id": 1849,
"company": {
"id": 706,
"address": "Suite 859 81279 Mraz Vista, Kunzefort, OK UF2 8WZ",
"license_number": "2888052384",
"name": "Conn, Conn and Wolf",
"state": "verified"
},
"contact_phone_number": "07848 942608",
"email": "laurice@quigley-ebert.test",
"first_name": "Wilford",
"job_position": "Operator",
"last_name": "Goldner",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}