Register

Endpoint

This endpoint allows to register a new user.

Method URI Headers
POST https://test-api.updivision.work/api/register Accept: application/json

Body Parameters

To register a new user you must have the fields below completed. All of them are required and also must be pass the specified validation rules.

Name eg: Sarah
Email must be a valid address that follows certain rules of syntax. eg: mail@domain.tdl
Password must be at least 6 characters.
Password_confirmation must be the same as the password field.
Education_start_date must be a valid date.
Education_end_date must be a valid date and greater than education start date.

Terms User must be agree with the terms and condition.

{
    "name"                  : "string",
    "email"                 : "string|email|unique",
    "password"              : "string|min:6",
    "password_confirmation" : "string|min:6",
    "education_start_date"  : "date",
    "education_end_date"    : "date|after:education_start_date",
    "terms"                 : "required"
}

Response

Example response 200

{
    "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNDg5YTZhOTQzMjczYTViYmJlOGFjMjA5ODEwMmVjNTI0ZWNkODkzZmY5YzU0NDViNDVhNGE2MjcxZjE1YzU3YmI1MjU2NGEyOTczY2ExODQiLCJpYXQiOjE1NzU0NjI1NzcsIm5iZiI6MTU3NTQ2MjU3NywiZXhwIjoxNjA3MDg0OTc3LCJzdWIiOiIzIiwic2NvcGVzIjpbXX0.fhy8fy-i8_-_8hf_O_GlNh0eNEgXsbtlAxivrwnafnFCFIF0zS6MEz06y2zbn2dF36SUpYa6DAVHarAfH_L86xsS_DwJPV0bT9qHDL7NX8hgi5cRqshxAqRLnTX8WHG0IKjyQ2UhjU2OtK2vdL90lZQI5eOAzNzsohgqWe4CRokVG9xpxGjptHiRzQXXLIQ1VqMTQ5i3xMvrQl_lsRjozSzBS7_KpBww64C-wTXzLKKPZFMhkFu5NhzRB3YJE4BGVH3niiz3lT5kVAKnmgeue4CwqBEdA_x_e9D4wpDRg5RNL2W6rwW8weuKbGpn9wCf48GkahIM7ecrNt5Q9nOwhvrN_baHx_Xzkt1amMbudUfArRlaY_cfN8-CXWfBqv8gnScXw3JiRMX7ewtU_XUpRVxpdlnBr4dQ8X8p6DxXtAI_l1ntNiSB1S_tusdW-SvVBtEN01zROSlU_N7pHyl-Zkkv-kD6ymwTc2zt7ySzYRM3QLZLmQdb9UBUPyGToSpBqOjWsVFSj9ueDxxvtLnp_ucR_SNb3g9R2NmzXFbZr5YxEr-ETDxfL1C8R79iFZEckrmzdsMNGOwHenFwa4L-1BhT-IaPgV903QAP0bR6LiAyOY-GbhSEbRxaKv4zHBS8c8ywdHINXYDJN0OC-ky-v1JXTM6x-ua9j2l8ZsWi2GQ"
}

Example response 422

{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "email": [
            "The email field is required."
        ],
        "password": [
            "The password field is required."
        ],
        "education_start_date": [
            "The education start date field is required."
        ],
        "education_end_date": [
            "The education end date field is required."
        ],
        "terms": [
            "The terms field is required."
        ]
    }
}