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.eyJzdWIiOiIxODQ4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjI3LCJleHAiOjE3NTU4NTgyMjcsImp0aSI6ImIwNWJjNzFhLTc0MDYtNDg0OC1iZDA3LTIxOThmMzgxNzMyMyJ9.QiAYiW6XTt8ejSHeJ_COXE0b6p91lUHrgRkg0HL0JyU
Host: example.org
Cookie:
Body
{
"user": {
"email": "jame_veum@kreiger-hudson.test",
"first_name": "King",
"last_name": "Medhurst",
"job_position": "Operator",
"company_id": 707,
"contact_phone_number": "07556 986101"
}
}
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/"c3985dc0c7800202d324016a3c53fb52"
cache-control: max-age=0, private, must-revalidate
x-request-id: 8b3a2adf-f84d-4f06-bb50-3df157c14a83
x-runtime: 0.068475
content-length: 371
Body
{
"user": {
"id": 1849,
"company": {
"id": 707,
"address": "61124 Minh Trail, East Robt, OR SH4E 8GF",
"license_number": "7177030112",
"name": "Herman-Botsford",
"state": "verified"
},
"contact_phone_number": "07556 986101",
"email": "jame_veum@kreiger-hudson.test",
"first_name": "King",
"job_position": "Operator",
"last_name": "Medhurst",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}