Users

Invite operator/driver to company

POST invite operator

Endpoint

POST /api/v1/users/invitation

Parameters

Name Description
user[email] required Email
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.eyJzdWIiOiIxODQyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjI3LCJleHAiOjE3NTU4NTgyMjcsImp0aSI6ImE2MDNkYzJmLTIyZDUtNGU1Zi05ZTljLTZmNjNkZjBjNzFhMCJ9.menlx9Eq0rmhLF07KdO18-ZPyarrrC4abzOSFUdsjn4
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "gabrielle.wuckert@mueller.example",
    "first_name": "Minta",
    "last_name": "Hauck",
    "contact_phone_number": "07311 797024"
  }
}

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/"0fb9fc60c1741d3b5ac5dda43302ed69"
cache-control: max-age=0, private, must-revalidate
x-request-id: 85a4cc94-1123-4136-b0a1-c3dbb211b265
x-runtime: 0.128802
content-length: 361

Body

{
  "user": {
    "id": 1843,
    "company": {
      "id": 705,
      "address": "618 Rocco Way, Julechester, ND YK7 2LJ",
      "license_number": "4718441905",
      "name": "Goldner LLC",
      "state": "verified"
    },
    "contact_phone_number": "07311 797024",
    "email": "gabrielle.wuckert@mueller.example",
    "first_name": "Minta",
    "job_position": null,
    "last_name": "Hauck",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}