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.eyJzdWIiOiIxODcwIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzMDIyMjM0LCJleHAiOjE3NjU2MTQyMzQsImp0aSI6ImI4Njk5MTlmLTA4MTctNGRhNi04NDY3LWRiZTc0NDBiYWE4NiJ9.GqSWpuA6t9ycFD4r6IOu-g6-1jiliXBBZ8o1wcdwV8M
Host: example.org
Cookie:
Body
{
"user": {
"email": "ronny_hermiston@koch-bednar.example",
"first_name": "Consuelo",
"last_name": "Gerhold",
"job_position": "Operator",
"company_id": 721,
"contact_phone_number": "07764 563577"
}
}
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/"4afec0bfbf2f402f2009723601e818ea"
cache-control: max-age=0, private, must-revalidate
x-request-id: 8ab3a17c-5088-4e71-8c54-3095a3f844c7
x-runtime: 0.051124
content-length: 451
Body
{
"user": {
"id": 1871,
"company": {
"id": 721,
"address": "Suite 682 452 Chong Loaf, West Lesshire, IL WF5V 2BB",
"country": "GBR",
"currency": "GBP",
"license_number": "5938984249",
"name": "Pagac-Stroman",
"state": "verified"
},
"contact_phone_number": "07764 563577",
"email": "ronny_hermiston@koch-bednar.example",
"financial_company_id": null,
"first_name": "Consuelo",
"job_position": "Operator",
"last_name": "Gerhold",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}