Covenant Eyes Developer Portal

Converting to JSON and XML

Payloads and responses within this documentation are presented in Python object templates, which can be converted to JSON or XML for the majority of the available api calls.

For an example we will use the user call to view user information. This is seen here as a Python object template:

{'email': '',
'name': {'firstName': 'Bob', 'lastName': 'Tester'},
'services': '[Accountability, Filter]'}


To convert to JSON:

  1. Remove any parentheses.
  2. Change single quotes to double quotes.

Here is the call in JSON:

{"services": ["Accountability", "Filter"], "name": {"lastName": "Tester", "firstName": "Bob"}, "email": ""}


To convert to XML:

  1. Ignore the paratheses. They are for informational purposes only.
  2. Translate key names into tag names.
  3. We do not use XML attributes.
  4. `<record>` is a special reserved XML tag for denoting a record in a list.
    • All lists records should have a `<record>` tag.
    • The one exception is when each child node has a one element dictionary that denotes the record type.
      • You may still use the `<record>` tag if you want.
      • When mixing record types you must either use the `<record>` tag, or have at least 2 records of one record type.

Here is the call in XML: