Users

Invite operator/driver to company

POST invite operator (admin)

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.eyJzdWIiOiIxNzg2Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTkyLCJleHAiOjE3NDAxNDM1OTIsImp0aSI6ImRhNDQyZDMyLTdkOGYtNGQ5MC04OTg0LTgxMmZlMzBjZTJiNSJ9.qAMyeNAJolyXqw4jHjjpZGzjio_tTm1VL4koJO30PQI
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "claudia_oreilly@mills.test",
    "first_name": "Signe",
    "last_name": "Harber",
    "job_position": "Operator",
    "company_id": 682,
    "contact_phone_number": "07487 416618"
  }
}

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/"c5163db38e668702b87457ccecd10e8f"
cache-control: max-age=0, private, must-revalidate
x-request-id: 4b961fbc-4c13-4972-813b-ad930c8b1bd8
x-runtime: 0.062117
content-length: 359

Body

{
  "user": {
    "id": 1787,
    "company": {
      "id": 682,
      "address": "606 Darrick Keys, Alton, ND YB5 4DL",
      "license_number": "9315965135",
      "name": "Kessler-Yost",
      "state": "verified"
    },
    "contact_phone_number": "07487 416618",
    "email": "claudia_oreilly@mills.test",
    "first_name": "Signe",
    "job_position": "Operator",
    "last_name": "Harber",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}