Skip to main content

User Registration

POST : http://<base_url>/digipay/v3/auth/user_register

This API is used to user registration

BODY PARAMS:-

ParameterTypeDescriptionValue
dial_codeStringCountry dial code.+91
phone_numberStringhone number of the user.123456789
user_typeIntType of user (e.g., 1 for employee, 2 for customer)..2
first_nameStringFirst name of the user.abc
last_nameStringLast name of the user.deo
account_number_prefixStringPrefix for account numbers.ACCT
passwordStringUser's password.123456
emailStringEmail address of the user.john.doe@example.com"
login_pinStringPIN for login.11234
transaction_pinStringPIN for transactions.1234
status_idIntStatus identifier.1
birth_dateLongBirth date in UNIX timestamp format.946684800000
imageStringURL to user's profile image.https://example.com/profile/john.jpg
kyc_statusIntKYC status (e.g., 1 for pending, 2 for approved).+91
country_idStringCountry identifier.US
kyc_process_statusIntKYC process status (e.g., 1 for initiated, 2 for in progress, 3 for completed).1
location_poinIntKYC status (e.g., 1 for pending, 2 for approved).+91
device_typeIntDevice ID.2
device_idStringUnique identifier for the deviceABCDE12345
parent_user_idStringIdentifier of the parent user.parent123"
device_unique_idStringUnique identifier for the deviceUNIQUE123
referral_codeStringReferral code for the user.REFCODE123
cretaed_byStringIdentifier of the user who created this record.admin

HEADERS:-

ParameterTypeDescriptionValue
AuthorizationStringIt is a combination of type and token to authenticate user for the given tokenToken duik7309njdlkhdauhknksadhjkas986876sd873j
CompanyIDStringCompany_id is a unique primary id, that is represent company detail76bc712200ca444fa334f9e55e5fd7a8

Request Body:-

Request Example
curl --request POST \
--url http://192.168.1.102:8014/digipay/v3/auth/user_register \
--header 'Authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NWY0ZDI1MDliZmU0NTBmYTg4MTVhNTU5Njk3YmM0NyIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjkzNTIxOTU1fQ.9oWwUzlFzmYB1ZOhaVamxKJH6DsMO8tFue2kbg2YyoI' \
--header 'CompanyID: 76bc712200ca444fa334f9e55e5fd7a8' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"dial_code": "+91",
"phone_number": "123456789",
"user_type": 2,
"first_name": "kgkjkl",
"account_number_prefix": "ACCT",
"last_name": "Doe",
"password": "123",
"email": "john.doe@example.com\"",
"login_pin": "1234",
"transaction_pin": "5678",
"status_id": 1,
"birth_date": 946684800000,
"image": "https://example.com/profile/john.jpg",
"kyc_status": 2,
"kyc_process_status": "3",
"location_point": "{ \"\"latitude\"\": 37.7749, \"\"longitude\"\": -122.4194 },",
"device_type": 2,
"device_id": "ABCDE12345",
"parent_user_id": "parent123\"",
"device_unique_id": "UNIQUE123",
"referral_code": "REFCODE123",
"cretaed_by": "admin"
}
'

Response:-

Response 200(OK)

{
"success": 1,
"error": [],
"data"" {
"message": "User registered successfully.",
"token": {
"type": "Token",
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE2NDc0OTEyMjR9.S_YjH-vZSvv495p5TkRsR3m10fGECdUHGlrXuNNSp-UUmiH-uIm4meYykEiy6BJzvEfjUkZXM3QAZAenQlB2IQ"
},
"user_id": "ebccea2ac4114b5aaa790221f72d3799"
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}

RESPONSES :-

Status CodeDescription
200OK
400Bad Request
404Not Found
500Internal Server Error