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.eyJzdWIiOiIxODY4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzNjI2NDEzLCJleHAiOjE3NjYyMTg0MTMsImp0aSI6IjljZGI2Y2MxLTk1NDQtNDAyOC1iMDY3LWI2NDNkZDFkYTRjYSJ9.ZxoQJ4ayqTrMWquRqZBQrrsFpG_1tfFjshGsC10M9rk
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "francesco.walsh@gleason-lind.example",
    "first_name": "Natacha",
    "last_name": "Robel",
    "contact_phone_number": "07797 027699"
  }
}

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/"522777c3e0bbe50d2eb7925a1a2ae34b"
cache-control: max-age=0, private, must-revalidate
x-request-id: 1bc33de0-c74f-4743-9b1b-11bb8513ea6a
x-runtime: 0.100500
content-length: 439

Body

{
  "user": {
    "id": 1869,
    "company": {
      "id": 719,
      "address": "110 Hickle Green, Mrazstad, OR U9 4JW",
      "country": "GBR",
      "currency": "GBP",
      "license_number": "4516248967",
      "name": "King, Spencer and Hoeger",
      "state": "verified"
    },
    "contact_phone_number": "07797 027699",
    "email": "francesco.walsh@gleason-lind.example",
    "financial_company_id": null,
    "first_name": "Natacha",
    "job_position": null,
    "last_name": "Robel",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}