Users

Invite operator/driver to company

POST invite driver (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.eyJzdWIiOiIxODM0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYwOTUwNDc4LCJleHAiOjE3NjM1NDI0NzgsImp0aSI6IjJiNzQzZmNjLWNhOTgtNDg0MS1iMGUzLWUyNWIwNDQ1YTZlNCJ9.blUyP30e9jXk3czTcMjPV-HHrLLjeB0_aeyLWK-NXvo
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "shelby.kuphal@abernathy-ruecker.example",
    "first_name": "Renetta",
    "last_name": "Gislason",
    "job_position": "Operator",
    "company_id": 704,
    "contact_phone_number": "07988 679376",
    "role": "driver"
  }
}

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/"40e7bfee5daf8761073f36d5372dc9f7"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1f45f9be-5be3-4a32-a027-e40a006a9839
x-runtime: 0.048511
content-length: 430

Body

{
  "user": {
    "id": 1835,
    "company": {
      "id": 704,
      "address": "58389 Cora Oval, Streichville, AL ZC8V 7DB",
      "country": "GBR",
      "currency": "GBP",
      "license_number": "5326105886",
      "name": "Hammes, Koch and Armstrong",
      "state": "verified"
    },
    "contact_phone_number": "07988 679376",
    "email": "shelby.kuphal@abernathy-ruecker.example",
    "first_name": "Renetta",
    "job_position": "Operator",
    "last_name": "Gislason",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}