LR Application API - The body
Simple end-points, complex payload
The api end-points are relatively simple, but the application entity you send in the body is quite complex.
The main references are:
- The LR Application schema which you will send as the body
- The Common schema which defines re-usable components
The schema are supersets
The various schema include many reusable entities. If you see a person represented in one place, you should see it represented the same way in every place; although we may not need all the fields it's possible to fill out.
- Just because the schema allows a field, does not mean an end-point will use it
- The documentation should describe which fields you are expected to fill out
- Some values are read-only or auto generated; you can set them, but we will discard them
How we perform validation
The main LR Application entity undergoes a number of steps of validation which go beyond what is specified in the JSON schema.
To validate the entity we:
- First calculate any automatic fields (
- Check the data against the schema
- Check format definitions in the schema which we have the data to check against, but you might not, like LR Title numbers
- Check some constraints specific to the semantics of an LR application (e.g. particular combination of fields may be required for some application/deed types)
- Transform to an internal format
- Check against an additional ruleset for conditional rules
This means you can expect multiple types of validation messages to be returned. Specifically:
SchemaError- JSON schema and format errors
ValidationError- Logical errors based on business rules for LR applications
LegacyValidationError- An older rule set, with some overlap of the above
AutoPopulationError- Due to a structural error, some fields which are normally provided by the service have not been filled in. You may see additional errors relating to these fields which you are not expected to provide
The conditional "legacy" rule set is complete, but returns errors which relate to the internal format, and are generally not very helpful.
Note: If your application is badly malformed, we may be unable to process it, and will return an error.