REQUEST

If you don't have account to access to the DNL System, This API is used to register a new account. You can call this API without authorization.

The structure of API as below:

POST/registration/create

BODY

You have to put the User Information that you want to create into the body as below:

{
  	"billing_zip": "string",
  	"country": "string",
  	"zip": "string",
  	"billing_phone": "string",
  	"tax_id": "string",
  	"billing_contact_name": "string",
  	"send_signup_notification": 0,
  	"billing_country": "string",
  	"password": "string",
  	"address": "string",
  	"company": "string",
  	"billing_state": "string",
  	"rate_send_from_email": "string",
  	"billing_city": "string",
  	"products": [
    	0
  		],
  	"phone": "string",
  	"ip_address": [
    	{
      	"mask": 32,
      	"port": 0,
      	"ip": "string"
    	}
  		],
  	"company_detail": "string",
  	"billing_address": "string",
  	"state": "string",
  	"client_name": "string",
  	"city": "string",
  	"referral": "string",
  	"billing_email": "string",
  	"rate_send_to_email": "string",
  	"username": "string",
  	"main_email": "[email protected]",
  	"noc_email": "string"
}

JSON RESPONSE

There is message return as JSON format. It will return the result of API and the related information as well.

If successful, the server will return code 200 with the message as below:

{
  	"object_id": ID of User,
   	"success": true
}

 

If missing body or missing any fields, It will return code 400 and message as below:

{
   "error_type": "validation_error",
   "success": false,
   "errors": [   {
      "field_name": ["Missing data for required field."]
   }]
}

On this page:

EXAMPLE

We will know more about the API through the example below:

Request

I will call API to create new Agent:

curl \
-X POST -d "{ \"password\": \"123456\", \"address\": \"TMA\", \"company\": \"TMA\", \"client_name\": \"DN123\", \"username\": \"vn303\", \"main_email\": \"[email protected]\", \"noc_email\": \"[email protected]\"}" \
"http://88.99.175.131:8000/v1/auth/registration/create"
 

Response

{
 	"object_id": 263,
  	"success": true
}
  • No labels