Documentation

POST customer/check

Used for

Function to check if there are any issues with the customer before adding the customer. The customer will not be saved in this function.
Only a status message will be displayed. This can be useful to validate user input.

Authentication

Anonymous access.

Parameters

Parameter Description Required Example
customer Array of customer fields No See field overview
lang Language No ?lang=english

Response codes

  • 200 OK

Example

Checking a customer with a correct set of fields.

POST api/rest/customer/check/

Request:

{
   "lastname":"Pietje Puk",
   "email":"info@pietje.nl"
}

Response:

 {
   "status":true,
   "messages":[
      "No issues found"
   ]
}

Checking a customer with issues.

POST api/rest/customer/check/

Request:

{
   "incorrect_field":"Pietje Puk",
   "email":"info@pietje.nl"
}

Response:

 

    {
        "status": false,
        "messages":
        [
            "lastname: Required field",
            "Field incorrect_field is not allowed"
        ]
    }