Skip to main content

Creating a User

Learn how to create a user on your integration.

Why to create a user account

When a customer on your platform takes a ride on a Dott vehicle you have to provide information about the end user to the Dott API. We are required to store this information in case a government entity would request it. In order to build a mapping between your platform and ours you will need to create a user in our API. Internally, you should associate those entities together.

Requirements

Before a user account can be created the following has to be provided:

  1. A valid JWT: see Generating and Signing a Valid JWT Guide.

  2. Required user details:

    • first name
    • last name

The other information, e.g. email address, phone number, gender, date of birth can be demanded by municipalities. Call the GetRequiredUserData and GetDocumentVerificationRequirements to learn what user data is required in your region.

To create a new Dott user account use the CreateUser API endpoint.

Code example

Test it:

curl --location --request POST \
--header 'Content-Type: application/json' \
--header 'User-Agent: {COMPANY_NAME}' \
--header 'Authorization: Bearer {JWT}' \
-d '{"requestId": {requestId}, "user": {"emailAddress": {userEmailAddress}, "firstName": {userFirstName}, "lastName": {userLastName}, "phoneNumber":{userPhoneNumber}, "gender": {userGender}, "dateOfBirth": {userBirthDate} }}' \
'https://web.maas.api.staging.ridedott.com/v1alpha2/users'
note

The requestId parameter of the API request body should be a unique string value. It allows us to distinguish the request on behalf of a particular individual. You can think of a user ID in your system as an example of the requestId value.

Once the request is successful, a User resource is returned as the response of that request.

info

If the individual starting a trip is already known to Dott no new account is created. Instead an existing User resource is returned.