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.eyJzdWIiOiIxODc0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDEzLCJleHAiOjE3NjYyMTg0MTMsImp0aSI6ImMzNDE1ZDM3LTExMWQtNDFkZC1iMTE0LTFkNWFlZTAxOTUwMCJ9.PIpndzMJbuoH6h5uNCSYA32TJ1GIA8IkD4cWHeRbli0
Host: example.org
Cookie:
Body
{
"user": {
"email": "dirk@thiel.example",
"first_name": "Berneice",
"last_name": "Jacobs",
"job_position": "Operator",
"company_id": 721,
"contact_phone_number": "07132 572566"
}
}
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/"c41c11f182247e01324acd757083e109"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1caae459-5e2c-481d-b6b0-ed6f0f8eeaa9
x-runtime: 0.045457
content-length: 422
Body
{
"user": {
"id": 1875,
"company": {
"id": 721,
"address": "4578 Malcolm Pike, Port Palmermouth, MI ZV7 6BB",
"country": "GBR",
"currency": "GBP",
"license_number": "2463395272",
"name": "Toy Inc",
"state": "verified"
},
"contact_phone_number": "07132 572566",
"email": "dirk@thiel.example",
"financial_company_id": null,
"first_name": "Berneice",
"job_position": "Operator",
"last_name": "Jacobs",
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}