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.eyJzdWIiOiIxODc3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzMDIyMjM0LCJleHAiOjE3NjU2MTQyMzQsImp0aSI6ImQxZWQ4NmIwLWMwY2EtNDg4MS04Y2IzLTYxNTAwNjc5ZmY0OSJ9.WrXiI6qXib3_lkkykqyWmum69cgPKa20P9qp6F_7958
Host: example.org
Cookie:
Body
{
"user": {
"email": "setsuko.sawayn@ryan.example",
"first_name": "Colby",
"last_name": "Toy",
"job_position": "Operator",
"company_id": 723,
"contact_phone_number": "07751 834282",
"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/"c8b03990067550c0f1116328117d682f"
cache-control: max-age=0, private, must-revalidate
x-request-id: b6c4efc0-03a3-4561-bb76-9643e1bb8a6d
x-runtime: 0.043738
content-length: 445
Body
{
"user": {
"id": 1878,
"company": {
"id": 723,
"address": "777 Seth Plains, East Latonia, AZ ZC9M 4HB",
"country": "GBR",
"currency": "GBP",
"license_number": "9129351349",
"name": "Nicolas, MacGyver and Vandervort",
"state": "verified"
},
"contact_phone_number": "07751 834282",
"email": "setsuko.sawayn@ryan.example",
"financial_company_id": null,
"first_name": "Colby",
"job_position": "Operator",
"last_name": "Toy",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}