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.eyJzdWIiOiIxODI3Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYwOTUwNDc3LCJleHAiOjE3NjM1NDI0NzcsImp0aSI6IjgzMTA4ZWIwLWQ5MTAtNGM2Ny04ZDAzLWIzM2U3MWNiNDhiMyJ9.halYNIkWNJI0EBuaNFNhOqefmE8Krnhyy6eu--C6kPc
Host: example.org
Cookie:
Body
{
"user": {
"email": "sulema.walsh@weber-gutkowski.example",
"first_name": "Danilo",
"last_name": "Sporer",
"job_position": "Operator",
"company_id": 702,
"contact_phone_number": "07594 499062"
}
}
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/"b8b1adf09928c9659712c306a2bc893b"
cache-control: max-age=0, private, must-revalidate
x-request-id: dd368b63-6382-4f66-ae64-7e29de9f66c1
x-runtime: 0.125581
content-length: 414
Body
{
"user": {
"id": 1828,
"company": {
"id": 702,
"address": "45004 Liliana Lodge, Grahamberg, NH ZH9 2XA",
"country": "GBR",
"currency": "GBP",
"license_number": "9773501593",
"name": "Harber and Sons",
"state": "verified"
},
"contact_phone_number": "07594 499062",
"email": "sulema.walsh@weber-gutkowski.example",
"first_name": "Danilo",
"job_position": "Operator",
"last_name": "Sporer",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}