API Documentation - Add Customer
Endpoint
POST /customer/add
Parameters
The following parameters must be included in the request:
Parameter | Type | Description | Required |
---|---|---|---|
nom | string | The last name of the user | Yes |
prenom | string | The first name of the user | Yes |
string | The email address of the user | Yes | |
denomination | string | The denomination of the user | Yes |
password | string | The password for the user's account | Yes |
megatech_GPR_No | string | Group number for megatech. Default is "01" | No |
is_guest | int | Indicates if the user is a guest. Default is "0" | No |
afficher_prix | int | Indicates if the price should be displayed. Default is "1" | No |
actif | int | Indicates if the user account is active. Default is "1" | No |
langue | string | The language preference of the user | No |
Response
The response is a JSON object containing the following fields:
{
"success": "true or false",
"message": "Description of the response",
"result": {
"customer": [
{
"login": "User login",
"password": "User password"
}
]
}
}
Error Handling
If an error occurs, the response will contain the following fields:
{
"success": "false",
"message": "Error description"
}
Example Request
POST /user/add
Content-Type: application/json
{
"nom": "Doe",
"prenom": "John",
"email": "john.doe@example.com",
"denomination": "Mr",
"password": "securepassword",
"langue": "en"
}
Example Response
{
"success": true,
"message": "success",
"result": {
"customer": [
{
"login": "johndoe",
"password": "securepassword"
}
]
}
}