SAP Knowledge Base Article - Public

3566401 - Error "Data should be of minimum 1 characters. Correct it and try again." when trying to create an Account via API with empty string for Website field

Symptom

When trying to create an Account via API, an error is thrown for field Website field, even though it is not mandatory in UI. 

Environment

  • SAP Sales Cloud Version 2
  • SAP Sales Cloud and SAP Service Cloud Version 2

Reproducing the Issue

  1. Execute API Request with method POST to create a new Account.
  2. In body, the website field is sent as shown below (empty string).
  3. Execute the request.
  4. Error "Data should be of minimum 1 characters. Correct it and try again." is thrown in the response. 

},
    "defaultCommunication": {
        "web": "" 

Cause

There is minimum length check that is utilized for both fields defaultCommunication/phoneFormattedNumber and defaultCommunication/web in order to make sure that these fields are no empty strings.

In addition, since defaultCommunication/web is of dataFormat "URI", a second check is called, making sure no white space " " is contained in the value of defaultCommunication/web.

Hence, a space (" ") would be allowed for Phone field in the body, but not for Website field.

Resolution

The solution for this issue is to not send defaultCommunication/web with an empty string. 

Keywords

API , Request , POST , Account , Create , Error , Web , Website  , KBA , CEC-CRM-ACC , Account for SAP Sales/Service Cloud , Problem

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0