Skip to content

JSON and XSD Mapping

For versions 1 and 2 of the Import/Export (Create and Update a Case) endpoints, refer to the following documentation on how to map from the XSD schema to JSON.

The version 3 endpoint does not use this mapping and publishes a schema separately.

On the following image, the left shows extracts from Standard v1.0.xsd (please visit the Templates page to get the latest version) and the right shows a sample JSON payload for the Create Case endpoint.

The API accepts JSON or XML formatted data in the body of the request. You do not need to specify this in the request headers for this endpoint, ClariNet LS™ will figure this out from the request content.

Please use other online references and help pages for a full description of the XSD format, however here are some starting points:

  • optional fields, marked as: minOccurs="0"
  • required fields, marked as: minOccurs="1"
  • collections, translating to arrays in JSON surrounded by square brackets [ ], marked as: maxOccurs="unbounded" (or any value greater than 1)
  • standard types such as strings and dateTime, for example: type="xs:string" or type="xs:dateTime"
  • simple types such as enumerations, corresponding to an xs:simpleType elsewhere in the XSD. These are still simple values in JSON, for example: type="ccs:Gender" or type="ccs:Frequency"
  • complex types mapping to entities (such as Policy, Insured, LE Reports), corresponding to an xs:complexType elsewhere in the XSD. These translate to a JSON object surrounded by curly braces { }, for example: type="ccs:Policy" or type="ccs:UnderwritersReport"
  • valid values are generally described within a simpleType with an xs:restriction, for example ccs:Gender, which defines the pattern "(m|M)|((m|M)(a|A)(l|L)(e|E))" which means the Gender value can be the letter "m" or "M", or the string "male", "MALE", "Male" (or any other not case sensitive combination)
  • Field names in JSON have the same names as on the XSD: they don’t have any spaces and they are intended to be consumed by automated computer programs. All fields match the Excel Uploader format, but in Excel, the field names generally have spaces as they are intended to be read and understood by end users.

Some general rules for the json body of your requests:

  • Field names should be enclosed in double quotes
  • String and date values should be enclosed in double quotes
  • Boolean values must be all lowercase, not enclosed in quotes: true or false; not “True” or False for example.
  • Number values should not be enclosed in quotes
  • For empty values, simply omit the line completely, or set the value to null, without quotes