REST API

REST API

Legacy Poppulo platform REST API

Status

Overview

Status entities are returned when objects are created, updated and deleted. They are also returned in the event of an error. As such, it is critical that all calls are capable of handling a status response.

Fields

Field nameDescriptionType/Allowed values
status_codeThe HTTP status code of the request.Numeric HTTP Status codes
sub_codeError code specific to this error type, if anyNumeric
etagThe etag of the object created or updated, if anyETag
resources_createdA link to the resource created by this call.Link
resources_updatedA link to the resource updated by this call.Link
resources_deletedA link to the resource deleted by this call.Link
debugSome set of tags returned indicating details of this specific errorUnspecified tag set
warningsA list of warning sub-tagsWarning sub-tags
warningA warning issued when processing this request.Human readable text

Examples

Status Entity in response to create call:

<status>
    <status_code>201</status_code>
    <etag>12345678</etag>
    <resources_created>
        <link
            rel="http://api-info.newsweaver.com/v2/rels/status.created"
            href="https://api.newsweaver.com/v2/example-account/subscriber/someone@somewhere.com/tag/Some%20Tag"
            title="Subscriber Tag (Some Tag)" />
    </resources_created>
    <warnings>
        <warning>Some Warning Message</warning>
    </warnings>
</status>

Status Entity in response to update call:

<status>
    <status_code>200</status_code>
    <etag>12345678</etag>
    <resources_updated>
        <link
            rel="http://api-info.newsweaver.com/v2/rels/status.updated"
            href="https://api.newsweaver.com/v2/example-account/subscriber/someone@somewhere.com/tag/Some%20Tag"
            title="Subscriber Tag (Some Tag)" />
    </resources_updated>
    <warnings>
        <warning>Some Warning Message</warning>
    </warnings>
</status>

Status Entity in response to delete call:

<status>
    <status_code>200</status_code>
    <resources_deleted>
        <link
            rel="http://api-info.newsweaver.com/v2/rels/status.deleted"
            href="https://api.newsweaver.com/v2/example-account/subscriber/someone@somewhere.com/tag/Some%20Tag"
            title="Subscriber Tag (Some Tag)" />
    </resources_deleted>
    <warnings>
        <warning>Some Warning Message</warning>
    </warnings>
</status>

Status Entity in an error situation:

<status>
    <status_code>409</status_code>
    <message>Human readable message</message>
    <sub_code>Some Number</sub_code>
    <debug>
        <exception_id>12345678</exception_id>
        <detail>Some Detail Message</detail>
    </debug>
    <warnings>
        <warning>Some Warning Message</warning>
    </warnings>
</status>

See errors for additional information.