API Schemas

  Date Updated: May 30th 2014

Returning Schemas

Data Schemas

By sending special queries to the EXO API, you can return data schemas that show all attributes for a specific endpoint.

There are two separate schemas for POST (create) and PUT (update) requests:

  • PUT - returns the schema to validate a PUT request.
  • POST - returns the schema to validate a POST request

These schema provide information on whether an attribute is required, whether it can be null, and its data type.

Examples:


https://exo.api.myob.com/contact?$schema=PUT
https://exo.api.myob.com/contact?$schema=POST

Schemas to Help Build the UI

There is special superset of the JSON schema that is used to assist in building the UI for objects exposed in the API:

  • GETFORM - returns schema to apply to the UI when a user is viewing a record.
  • PUTFORM - returns schema to apply to the UI when a user is updating a record.
  • POSTFORM - returns schema to apply to the UI when a user is creating a new a record.
The properties returned are:
  • Precision and scale for certain attributes. These follow from the Decimal Places in Numeric Values settings in the Business Essentials > General Settings section of the EXO Configurator.
  • Whether attributes are required.
  • Whether attributes can be null.
  • Display names for certain attributes as set up in EXO Business.

Examples:


https://exo.api.myob.com/contact?$schema=GETFORM
https://exo.api.myob.com/contact?$schema=PUTFORM
https://exo.api.myob.com/contact?$schema=POSTFORM

Extra Fields and Schemas

Each entity returns any Extra Fields that have been set up against it in EXO Business. The EXO API supports GET, PUT and POST against Extra Fields. All of the schemas mentioned above, i.e. PUT, POST, GETFORM, PUTFORM and POSTFORM apply to Extra Fields as well.

The following properties are returned for Extra Fields that help in building the UI as well as validating data for PUT/POST:

  • Required - Specifies whether or not the field is a required for PUT/POST.
  • Title - Text for the label as set up in EXO Business.
  • Description - Description of the field as set up in EXO Business.
  • Type - Data type.
  • Read only - Specifies whether the attribute is read-only or not.
  • Control type - Which type of control needs to be drawn on the UI to accurately display the data.
  • Control order - Position of the control on screen.
  • Enum - Only applies to extra fields with dropdown style controls. This lists the values that get saved in database.
  • EnumTitles - Only applies to extra fields with dropdown style controls. This property lists the display values that are visible on the UI.