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.eyJzdWIiOiIxODExIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTUyLCJleHAiOjE3NDUwNTY5NTIsImp0aSI6IjVmMWZjNWI0LTIwMTMtNGZmYi1iMTkyLTc1N2NiMDZlMTlmNCJ9.WfCnYnL9NHeHLd8nhBe3Xi8iQBsaiHe8LdDzIeWP54k
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "clarence@gleichner-thompson.test",
    "first_name": "Thurman",
    "last_name": "Cormier",
    "contact_phone_number": "07437 020447"
  }
}

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/"07dce0bdfed7f5e10ee0cb29282d712d"
cache-control: max-age=0, private, must-revalidate
x-request-id: 7a48a682-db74-49e2-ad2f-76a21e80bb5f
x-runtime: 0.114728
content-length: 386

Body

{
  "user": {
    "id": 1812,
    "company": {
      "id": 689,
      "address": "Apt. 537 78436 Thomasena Valley, South Devon, AL M6 4EY",
      "license_number": "7348118995",
      "name": "Pfannerstill LLC",
      "state": "verified"
    },
    "contact_phone_number": "07437 020447",
    "email": "clarence@gleichner-thompson.test",
    "first_name": "Thurman",
    "job_position": null,
    "last_name": "Cormier",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}