Invite operator/driver to company
Users
POST invite operator
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.eyJzdWIiOiIxODIxIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYwOTUwNDc3LCJleHAiOjE3NjM1NDI0NzcsImp0aSI6IjU2OGE0MzY5LTk1MjItNGE3Ny1iOGEyLWNmZGJmZjBhNmIzNiJ9.1ZFkyiWSzEcJLYHV8YcS0OopNY8-JoMeFI21s52uF0M
Host: example.org
Cookie:
Body
{
"user": {
"email": "joshua_lesch@greenholt.test",
"first_name": "Asia",
"last_name": "Beahan",
"contact_phone_number": "07310 798914"
}
}
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/"08ec8d89a6f142ef19e63086d74f9aa0"
cache-control: max-age=0, private, must-revalidate
x-request-id: 7474f1aa-52d7-4ecd-b14c-f7808828a92e
x-runtime: 0.111136
content-length: 411
Body
{
"user": {
"id": 1822,
"company": {
"id": 700,
"address": "Suite 333 9652 Armstrong Trace, Macejkovicfort, IL ZE5H 6JN",
"country": "GBR",
"currency": "GBP",
"license_number": "2688501310",
"name": "Block-Weimann",
"state": "verified"
},
"contact_phone_number": "07310 798914",
"email": "joshua_lesch@greenholt.test",
"first_name": "Asia",
"job_position": null,
"last_name": "Beahan",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}