API Serialization Formats

The API currently supports 2 serialization formats, being JSON and XML.

By default all responses will be in JSON format, however the response format can be explicity set by passing the format querystring parameter as shown below.

JSON

$ https://api.caremessenger.co.uk/v2/webhook?format=json

Example JSON Response

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 5,
            "customer": 89,
            "type": "messages",
            "created": "2015-03-24T11:12:06.712046Z",
            "active": true,
            "url": "https://acmecorp.com/message-updates/"
        }
    ]
}

XML

$ https://api.caremessenger.co.uk/v2/webhook?format=xml

Example XML Response

<root>
        <script/>
        <count>2</count>
        <next/>
        <previous/>
        <results>
                <list-item>
                        <id>5</id>
                        <customer>89</customer>
                        <type>messages</type>
                        <created>2015-03-24T11:12:06.712046Z</created>
                        <active>True</active>
                        <url>https://acmecorp.com/message-updates/</url>
                </list-item>
        </results>
</root>