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.eyJzdWIiOiIxODY0Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYzMDIyMjM0LCJleHAiOjE3NjU2MTQyMzQsImp0aSI6IjY3YjAxNmU2LWU3ZGYtNDlmOC04Zjc4LWRkOTlmZDYyOTc1NSJ9.5WTimm0id8OSiDPznGzIDt2zjw1MCd-NjmQNic6nDUc
Host: example.org
Cookie: 

Body

{
  "user": {
    "email": "luella@oberbrunner.test",
    "first_name": "Hollis",
    "last_name": "Kertzmann",
    "contact_phone_number": "07963 963774"
  }
}

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/"5f5be77637e0b3d4d707c7b6736abbbf"
cache-control: max-age=0, private, must-revalidate
x-request-id: b9d1a6ba-9166-4dc8-8f90-7e62d8ffc3a3
x-runtime: 0.100550
content-length: 441

Body

{
  "user": {
    "id": 1865,
    "company": {
      "id": 719,
      "address": "Suite 720 50862 Nicolas Isle, Lake Juliettestad, HI I3A 5BW",
      "country": "GBR",
      "currency": "GBP",
      "license_number": "8333657653",
      "name": "Feeney-Ziemann",
      "state": "verified"
    },
    "contact_phone_number": "07963 963774",
    "email": "luella@oberbrunner.test",
    "financial_company_id": null,
    "first_name": "Hollis",
    "job_position": null,
    "last_name": "Kertzmann",
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}