Users

Create a new user. It creates new user and sends an email or SMS (depends on login type) with a pin code.

POST sign up(referral)

Endpoint

POST /api/v1/users

Parameters

Name Description Enum
user[login] required Email or Phone number
user[role] required User role ["driver", "operator", "financial_admin", "admin"]

Request

Route

POST /api/v1/users

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "user": {
    "login": "brandon_wiegand@volkman.example",
    "role": "driver",
    "referral_code": "584716"
  }
}

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/"82307cf4f3ab1f0a50b6fb31682dd230"
cache-control: max-age=0, private, must-revalidate
x-request-id: 88274cfa-81cb-4913-9d6e-51b61463432d
x-runtime: 0.019988
content-length: 204

Body

{
  "user": {
    "id": 1922,
    "email": "brandon_wiegand@volkman.example",
    "financial_company_id": null,
    "first_name": null,
    "last_name": null,
    "phone_number": null,
    "profile_id": null,
    "referral_code": "012193",
    "role": "driver"
  }
}