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.eyJzdWIiOiIxODM1Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTM5LCJleHAiOjE3NTExMDg1MzksImp0aSI6Ijc0NjNlYmQ0LWE3M2ItNDhjMi1hYzg1LTMyM2Y3NDIwYWQ3MiJ9.P2WDjyWjcvUO1abAW2CJaW53Ul3PlwR-aA8FQoX_HSs
Host: example.org
Cookie:
Body
{
"user": {
"email": "aletha@stiedemann.test",
"first_name": "Kellee",
"last_name": "Kunde",
"contact_phone_number": "07442 995806"
}
}
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/"12b49651e4836815637d2e0e68c04a0a"
cache-control: max-age=0, private, must-revalidate
x-request-id: edcd2e2e-abe8-45d4-907f-3267d568c281
x-runtime: 0.115275
content-length: 384
Body
{
"user": {
"id": 1836,
"company": {
"id": 702,
"address": "Apt. 907 96402 Cayla Fort, South Jaimechester, OH W4 1BZ",
"license_number": "5749064003",
"name": "Weimann, Jones and Leannon",
"state": "verified"
},
"contact_phone_number": "07442 995806",
"email": "aletha@stiedemann.test",
"first_name": "Kellee",
"job_position": null,
"last_name": "Kunde",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}