# Nullable Fields

Certain Cornerstone APIs support sending an XML request body in a POST or PUT operation. For nullable fields in the request body, there are subtle differences in how Cornerstone handles them based on the type of the field and based on whether the XML element is present.

If the nullable XML element is present in the request body with an empty value, and if the field is

  • A boolean, the API responds with an error.
  • A number, the API responds with an error.
  • A string, the API sets the field as blank or default value in your Cornerstone portal. For example, if the field in question is a dropdown and if you have configured a default value of 'Select One' for this field in your Cornerstone portal, the API sets the value to 'Select One' if you pass an empty element in the request. The above applies when a non-required XML element is included as an empty element (<firstname></firstname>) or as an empty tag (<firstname />).

Note that if the API specification does not indicate that a field is required, you do not need to include that element in the request body, irrespective of whether the payload is in XML or JSON format.

This is general guidance for nullable fields. Please review the API documentation for business rules that may apply to specific APIs and fields.