BETA: This functionality is under development and there may be changes not reflected in this help.

This section handles the domains configuration.

GET /domains

This method returns the list of domains.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the list of domains.
    • message: "Success" or a descriptive information of the error in any other case.

Request:

{"type":"get",

"url":"domains",

"data":"company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB"}

Response:

{

"status": "0",

"data": [

{

"Id": "clients",

"Desc": "Clientes"

},

 {

"Id": "No",

"Desc": ""

},

 {

"Id": "P1",

"Desc": "P1"

}

],

"message": "Success"

}

POST /domains/{id}

This method creates a domain. The user must have the administrator role.

Request attribute:

    • id [mandatory]: the Id of the domain.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • description [mandatory]:the description of the domain.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "success" on success, and empty in case of error.
    • message: "success" or a descriptive information of the error in any other case.

Request:

{"type":"post",

"url":"domains/P5",

"data":"company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB&idcomb=test&desc=testcomb"}

Response:

{

"status": 0,

"data": true,

"message": "Success"

}

PUT/domains/{id}

This method modify a domain. The user must have the administrator role.

Request attribute:

    • id [mandatory]: the Id of the domain.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • description [mandatory]:the description of the combo.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "success" on success, and empty in case of error.
    • message: "success" or a descriptive information of the error in any other case.

Request:

{"type":"put",

"url":"domains/clients",

"data":"company=0337182880&session=QYZg8jAUbwaJcfQegBpTuw8GxnRQeWmTBvUT2d2XJMI2okCUgyJsc78efg85&idcomb=No&desc=testcomb"}

Response:

Response:

{

"status": 0,

"data": true,

"message": "Success"

}

DELETE /domains/{id}

This method deletes a domain. The user must have the administrator role.

Request attribute:

    • id [mandatory]: the Id of the domain.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "success" on success, and empty in case of error.
    • message: "success" or a descriptive information of the error in any other case.

Request:

{"type":"delete",

"url":"domains/clients",

"data":"company=0337182880&session=QYZg8jAUbwaJcfQegBpTuw8GxnRQeWmTBvUT2d2XJMI2okCUgyJsc78efg85"}

Response:

{

"status": 0,

"data": true,

"message": "Success"

}