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.eyJzdWIiOiIxODgxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDEzLCJleHAiOjE3NjYyMTg0MTMsImp0aSI6IjVhMDc0MGE4LTI2YTAtNGIyYy1hODUyLTFjZjJlMWQxMWQzMSJ9.5Wa43UqKyY4ADOf9-VEc8bkLLeJZLqGu1OhUqxKsfCc
Host: example.org
Cookie:
Body
{
"user": {
"email": "michelle@reichel.example",
"first_name": "Cleora",
"last_name": "Casper",
"job_position": "Operator",
"company_id": 723,
"contact_phone_number": "07581 308055",
"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/"07148e1001760fa28581b91fa313016e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 7d8f5531-9b8e-4e06-98bc-8cdea2cb2bd7
x-runtime: 0.045542
content-length: 442
Body
{
"user": {
"id": 1882,
"company": {
"id": 723,
"address": "41386 Heidenreich Forks, New Zoe, MA W4D 8QA",
"country": "GBR",
"currency": "GBP",
"license_number": "7087022361",
"name": "Thompson, Ullrich and Bins",
"state": "verified"
},
"contact_phone_number": "07581 308055",
"email": "michelle@reichel.example",
"financial_company_id": null,
"first_name": "Cleora",
"job_position": "Operator",
"last_name": "Casper",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}