API Documentation

This document is a work in progress and your opinion helps us to improve. Please let us know what we can do better. Thanks! support@procurios.com

Engagement

Determine how engaged relations are with a given theme by linking their incoming behavior to outgoing actions

Accept header for requests to Engagement

application/vnd.procurios.engagement+json; version=1

Actions GET

URL: /l/engagement_api/action

Scope:

engagement/read
Last used: Never

Get the list of available actions

Parameters

Parameter Type Description
page int

The api will provide 25 results per page by default

Live testing disabled

Actions

Request

json

Response

jsonStatus: 200
[
    {
        "code": 123,
        "description": "What we did to engage with people",
        "campaign": 3,
        "theme": "5170a0df-a908-4962-ac7f-6221e61457c4",
        "channel": "5170a0df-a908-4962-ac7f-6221e61457c5"
    }
]

Action POST

URL: /l/engagement_api/action

Scope:

engagement/read
Last used: Never

Register a new action

Live testing disabled

The minimum required set of parameters

Action

Request

json
{
    "description": "Mailing Y for goal X 2020-12-07",
    "campaignId": 8
}

Response

jsonStatus: 201
{
    "actionId": 123
}

The full available set of parameters

Action

Request

json
{
    "description": "Mailing Y for goal X 2020-12-07",
    "campaignId": 8,
    "themeId": "c03445f9-9958-423d-bb9d-27ad0573baa3",
    "channelId": "9e48f7d3-8be2-43c0-983a-3827424d9b20"
}

Response

jsonStatus: 201
{
    "actionId": 124
}

Using bad ids for campaign, theme or channel

Action

Request

json
{
    "description": "Mailing Y for goal X 2020-12-07",
    "campaignId": 999,
    "themeId": "c03445f9-9958-423d-bb9d-27ad0573baa3",
    "channelId": "9e48f7d3-8be2-43c0-983a-3827424d9b20"
}

Response

jsonStatus: 400
{
    "errors": [
        "Unknown campaign",
        "Unknown theme",
        "Unknown channel"
    ]
}

Campaigns GET

URL: /l/engagement_api/campaign

Scope:

engagement/read
Last used: Never

Get the list of available campaigns

Parameters

Parameter Type Description
page int

The api will provide 25 results per page by default

Live testing disabled

Campaigns

Request

json

Response

jsonStatus: 200
[
    {
        "campaignId": 123,
        "title": "Engage for some time!",
        "description": "The (short term) goal for which we engaged with people",
        "startDate": "2020-01-02",
        "endDate": null
    }
]

Channels GET

URL: /l/engagement_api/channel

Scope:

engagement/read
Last used: Never

Get the list of available channels. This list should be short and relatively static and no pagination is available.

Live testing disabled

Channels

Request

json

Response

jsonStatus: 200
[
    {
        "channelId": "01fb1755-e5ef-4905-8315-51e6f7e9ddaa",
        "title": "Newsletter"
    },
    {
        "channelId": "01fb1755-e5ef-4905-8315-51e6f7e9ddab",
        "title": "Facebook"
    },
    {
        "channelId": "01fb1755-e5ef-4905-8315-51e6f7e9ddac",
        "title": "Twitter"
    },
    {
        "channelId": "01fb1755-e5ef-4905-8315-51e6f7e9ddad",
        "title": "Door-to-door"
    }
]

Themes GET

URL: /l/engagement_api/theme

Scope:

engagement/read
Last used: Never

Get the list of available themes. This list should be short and relatively static and no pagination is available.

Live testing disabled

Themes

Request

json

Response

jsonStatus: 200
[
    {
        "themeId": "5170a0df-a908-4962-ac7f-6221e61457c4",
        "title": "Engage for some reason!",
        "description": "The world should be changed towards goal X",
        "startDate": "2020-01-02",
        "endDate": null
    }
]