API Documentation - Update Customer

Endpoint

POST /customer/update

Parameters

The following parameters must be included in the request:

Parameter Type Description Required
id_client int The ID of the customer to update Yes
email string The email address of the customer No
firstName string The first name of the customer No
lastName string The last name of the customer No
address string The address of the customer No
zipcode string The zipcode of the customer No
city string The city of the customer No
country string The country of the customer No
phone string The phone number of the customer No
cellphone string The cellphone number of the customer No
denomination string The denomination of the customer No
tvaNumber string The VAT number of the customer No
megawinapp_login string The Megawinapp login of the customer No
language string The preferred language of the customer No
showPrice string Indicates if prices should be displayed No
webRemise string The web discount of the customer No
password string The password for the customer's account No

Response

The response is a JSON object containing the following fields:

{
    "success": "true or false",
    "message": "Description of the response"
}

Error Handling

If an error occurs, the response will contain the following fields:

{
    "success": "false",
    "message": "Error description"
}

Example Request

POST /customer/update
Content-Type: application/json

{
    "id_client": 123,
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "address": "123 Main St",
    "zipcode": "12345",
    "city": "Sample City",
    "country": "Sample Country",
    "phone": "123-456-7890",
    "cellphone": "098-765-4321",
    "denomination": "Mr",
    "tvaNumber": "123456789",
    "megawinapp_login": "johndoe",
    "language": "en",
    "showPrice": "1",
    "webRemise": "10",
    "password": "newpassword"
}

Example Response

{
    "success": true,
    "message": "Updated successfully."
}