NAV Navbar
  • Introduction
  • Audience API
  • Audience API conditions
  • Events API
  • Dmp API
  • Shortener API
  • Introduction

    Welcome to the DMP API!

    Audience API

    Create an audience

    Example request

    {
      "name": "Audience Name",
      "types": ["alterable", "disabled"],
      "community_id": 2436,
      "conditions": [
        {
          "condition_group": "sendings",
          "id": "am:123",
          "type": "push",
          "status": ["delivered"],
          "operator": "in"
        }
      ]
    }
    

    Example responses

    200

    {
      "data": {
        "id": 509,
        "name": "Audience Name",
        "created_at": "2017-05-29 16:27:45 +0000",
        "conditions": [
          {
            "id": "am:123",
            "type": "push",
            "status": [
              "delivered"
            ],
            "operator": "in",
            "condition_group": "sendings"
          }
        ],
        "archived_at": null,
        "archivable": true,
        "types": ["alterable", "disabled"],
        "cache_enabled": false,
        "members_count": 0,
        "members_count_calculated_at": "2017-05-29 16:27:45 +0000"
      }
    }
    

    Example request for not archivable audience

    {
      "name": "Everyone",
      "community_id": 2436,
      "conditions": [],
      "archivable": false
    }
    

    Example responses for not archivable audience

    200

    {
      "data": {
        "id": 510,
        "name": "Everyone",
        "created_at": "2020-10-29 18:33:45 +0000",
        "conditions": [],
        "archived_at": null,
        "archivable": false,
        "types": [],
        "cache_enabled": false,
        "members_count": 1210,
        "members_count_calculated_at": "2020-10-29 18:33:45 +0000"
      }
    }
    

    400

    {
      "error": "conditions is missing"
    }
    

    Create audience. Your API permit should have the same community_id as passed in params. Otherwise you will receive error message:

    404

    {
      "error": "Community not found"
    }
    

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences

    Parameters

    Parameter Required Type Description
    name true String Audience name.
    community_id false* Integer Community id from Boostcom Loyalty.
    community_ids false* Array[Integer] Community ids from Boostcom Loyalty.
    conditions true Array[Object] Array of objects with conditions.
    types false Array[String] Differend types you can later filter on
    archivable false Boolean Decide if audience can be automatically archived (default: true)

    NOTE: - (*) at least one of is required

    Show an audience

    Example request

    https://dmp.mpc.placewise.com/api/2.0/audiences/552
    

    Example responses

    200

    {
      "data": {
        "id": 552,
        "name": "Audience 1",
        "created_at": "2017-05-31 09:20:38 +0000",
        "conditions": [
          {
            "id": "am:123",
            "type": "push",
            "status": [
              "delivered"
            ],
            "operator": "in",
            "condition_group": "sendings"
          }
        ],
        "archived_at": null,
        "archivable": true,
        "types": [],
        "cache_enabled": false,
        "members_count": 500,
        "members_count_calculated_at": "2017-05-31 09:20:38 +0000"
      }
    }
    

    404

    {
      "error": "No audience found"
    }
    

    Show an audience.

    HTTP Request

    GET https://dmp.mpc.placewise.com/api/2.0/audiences/:id

    Query parameters

    Parameter Required Type Description
    id true Integer Audience id.

    members_count

    Returns up to date member's count.

    List audiences

    Example Requests

    [1] https://dmp.mpc.placewise.com/api/2.0/audiences
    [2] https://dmp.mpc.placewise.com/api/2.0/audiences?name=Audience 1
    [3] https://dmp.mpc.placewise.com/api/2.0/audiences?ids[]=552&ids[]=509
    [4] https://dmp.mpc.placewise.com/api/2.0/audiences?include_archived=true
    [5] https://dmp.mpc.placewise.com/api/2.0/audiences?from=20&size=10
    

    Example Response

    {
      "data": [
        {
          "id": 552,
          "name": "Audience 1",
          "community_id": 905,
          "created_at": "2017-05-31 09:20:38 +0000",
          "types": [],
          "conditions": [
            {
              "id": "am:123",
              "type": "push",
              "status": ["delivered"],
              "operator": "in",
              "condition_group": "sendings"
            }
          ],
          "archivable": true,
          "archived_at": null,
          "members_count": 500,
          "members_count_calculated_at": "2017-05-31 09:20:38 +0000"
        },
        {
          "id": 509,
          "name": "Audience 2",
          "community_id": 905,
          "created_at": "2017-05-29 16:27:45 +0000",
          "conditions": [
            {
              "field": "gender",
              "value": ["man"],
              "operator": "in",
              "condition_group": "member_properties"
            }
          ],
          "archivable": true,
          "archived_at": null,
          "types": [],
          "members_count": 1000,
          "members_count_calculated_at": "2017-05-29 16:27:45 +0000"
        }
      ]
    }
    

    [6] https://dmp.mpc.placewise.com/api/2.0/audiences?force_recalculate=true

    {
        "data": [
            {
                "id": 509,
                "name": "Tomek audience",
                "community_id": 905,
                "created_at": "2017-05-29 16:27:45 +0000",
                "conditions": [
                    {
                        "field": "gender",
                        "value": "man",
                        "operator": "equals",
                        "condition_group": "member_properties"
                    }
                ],
                "archivable": true,
                "archived_at": null,
                "types": [],
                "cache_enabled": false,
                "members_count": 11,
                "members_count_calculated_at": "2017-07-31 09:48:33 +0000",
                "community_count": 21
            }
        ]
    }
    

    [7] https://dmp.mpc.placewise.com/api/2.0/audiences?types[]=aaa&types[]=bbb

    {
        "data": [
            {
                "id": 8,
                "name": "test sth",
                "community_id": 123,
                "created_at": "2021-09-02T08:53:56.998Z",
                "conditions": [],
                "archived_at": null,
                "archivable": true,
                "types": [
                    "aaa"
                ],
                "cache_enabled": false,
                "members_count": 0,
                "members_count_calculated_at": "2021-09-02T08:53:56.998Z"
            },
            {
                "id": 8,
                "name": "test sth",
                "community_id": 123,
                "created_at": "2021-09-02T08:53:56.998Z",
                "conditions": [],
                "archived_at": null,
                "archivable": true,
                "types": [
                    "bbb", "ccc"
                ],
                "cache_enabled": false,
                "members_count": 0,
                "members_count_calculated_at": "2021-09-02T08:53:56.998Z"
            }
        ]
    }
    

    Show audiences with not types set:

    [8] https://dmp.mpc.placewise.com/api/2.0/audiences?types[]=

    {
        "data": [
            {
                "id": 8,
                "name": "test sth",
                "community_id": 123,
                "created_at": "2021-09-02T08:53:56.998Z",
                "conditions": [],
                "archived_at": null,
                "archivable": true,
                "types": [],
                "cache_enabled": false,
                "members_count": 0,
                "members_count_calculated_at": "2021-09-02T08:53:56.998Z"
            }
        ]
    }
    

    [9] https://dmp.mpc.placewise.com/api/2.0/audiences?not_types[]=aaa

    {
        "data": [
            {
                "id": 8,
                "name": "test sth",
                "community_id": 123,
                "created_at": "2021-09-02T08:53:56.998Z",
                "conditions": [],
                "archived_at": null,
                "archivable": true,
                "types": [
                    "test"
                ],
                "cache_enabled": false,
                "members_count": 0,
                "members_count_calculated_at": "2021-09-02T08:53:56.998Z"
            }
        ]
    }
    

    List all audiences.

    HTTP Request

    GET https://dmp.mpc.placewise.com/api/2.0/audiences

    Query parameters

    Parameter Required Type Description
    ids false Array Array with audience ids, query will built with = operator.
    name false String Audience name to search for, query will be built with ilike operator.
    force_recalculate false Boolean Flag indicating whether audience's members count should be recalculated (false on default). It returns also community count.
    include_archived false Boolean Flag indicating whether archived audiences are included (false on default).
    include_empty_types false Boolean Include audiences with no types added, and when you are filtering on specific type. ()
    from false Integer Number of skipped records (0 on default)
    size false Integer Number of returned records (1000 on default)
    types false* Array Show audiences with specific types as strings
    not_types false* Array Show audiences with dont have specific

    Members count

    Members count is cached and stored in field members_count. Audiences list by default contain cached values. To recalculate members count add force_recalculate param to request. Members count is also refreshed on show action.

    Archived audiences

    Endpoint on default returns only not archived audiences. To get all audiences add param include_archived to request [4].

    List members

    Example Request

    {
      "sort_by": "full_name",
      "sort_order": "asc",
      "nulls_order": "first"
    }
    

    Example Response

    {
      "data": [
        {
          "external_id": 55391684,
          "member_id": 55391684,
          "profile": {
            "email": "beshan224@gmail.com",
            "sms_status": "verified",
            "push_status": "enabled",
            "email_status": "enabled",
            "optin_channel": "import",
            "optin_subchannel": "newsletter",
            "action_empty_password_regenerate_token": "5c6bc08a3f305c9685855356250f7645341e6b39",
            "msisdn": "380664627834"
          }
        },
      ...
      ]
    

    Lists members of given audience. Sorting parameters are supported.
    It's possible to require additional data about members.
    View can be used as a source of data.

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences/999/members

    Query parameters

    Parameter Required Type Description
    id true Integer Audience id

    Parameters

    Parameter Required Type Description
    from false Integer Pagination offset
    size false Integer Page size, default is 1000
    fields false Object Contains information whether to fetch additional members' data
    fields.profile false Boolean If set to true, fetch members' profile data
    fields.mobile false Boolean If set to true, fetch members' mobile data
    fields.system false Boolean If set to true, fetch members' system data
    fields.external_data false Array[String] External data to fetch, only array with size > 0 and elements in [reward_points_balance or points_balance] is valid
    conditions false Array[Object] If set, these audience conditions are used to fetch members
    scroll false Boolean If set, view is used as data source
    scroll_name false Boolean Name of view which will be used as data source
    sort_by false String Value to sort members by, valid values are member_id, email, msisdn, full_name, optin_channel, created_at, optin_date, default value is member_id
    sort_order false String Valid values are asc, desc, default value is asc
    nulls_order false String Determines where to place null values while sorting, valid values are first, last, default value is first

    Update an audience

    [1] Request

    {
      "name": "Audience Name",
      "conditions": [
        {
          "condition_group": "sendings",
          "id": "am:123",
          "type": "push",
          "status": ["delivered"],
          "operator": "in"
        }
      ]
    }
    

    [1] Response

    {
      "data": {
        "id": 509,
        "name": "Audience Name",
        "created_at": "2017-05-29 16:27:45 +0000",
        "conditions": [
          {
            "id": "am:123",
            "type": "push",
            "status": ["delivered"],
            "operator": "in",
            "condition_group": "sendings"
          }
        ],
        "types": [],
        "archived_at": null,
        "members_count": 0,
        "members_count_calculated_at": "2017-05-29 16:27:45 +0000"
      }
    }
    

    [2] Archive audience request

    {
      "archived": true
    }
    

    [2] Archive audience response

    {
      "data": {
        "id": 509,
        "name": "Audience Name",
        "created_at": "2017-05-29 16:27:45 +0000",
        "conditions": [
          {
            "id": "am:123",
            "type": "push",
            "status": ["delivered"],
            "operator": "in",
            "condition_group": "sendings"
          }
        ],
        "types": [],
        "archived_at": "2017-07-17 14:47:28 +0000",
        "members_count": 0,
        "members_count_calculated_at": "2017-05-29 16:27:45 +0000"
      }
    }
    

    Update an audience.

    HTTP Request

    PUT https://dmp.mpc.placewise.com/api/2.0/audiences

    Parameters

    Parameter Required Type Description
    name true string Audience name.
    conditions true Array[Object] Array of objects with conditions.
    types true Array[String] Types assigned to the audience.

    Archive

    Audience can be archived/unarchived. To change audience state send:

    Delete an audience

    Example Request

    https://dmp.mpc.placewise.com/api/2.0/audiences/505
    

    Example Response

    200

    {
      "data": "Audience 505 deleted"
    }
    

    Permanently deletes an audience.

    HTTP Request

    DELETE https://dmp.mpc.placewise.com/api/2.0/audiences

    Query parameters

    Parameter Required Type Description
    id true Integer Audience id.

    Extended count

    Example request

    {
      "conditions": [
        {
          "condition_group": "links",
          "url": { "operator": "equals", "value": ["http://www.google.pl"] },
          "status": { "operator": "in", "value": ["delivered"] }
        }
      ]
    }
    

    Example responses

    200

    {
        "data": {
            "community": 20,
            "audience": 1,
            "conditions": 20
        }
    }
    

    400

    {
        "error": "conditions is missing"
    }
    

    Audience extended count. Takes conditions array and returns 3 counts:

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences/:id/count

    Parameters

    Parameter Required Type Description
    conditions true Array[Object] Array of objects with conditions.

    Count members

    Example Request

    {
      "community_id": 905,
      "conditions": [
        {
          "condition_group": "member_properties",
          "field": "gender",
          "operator": "in",
          "value": ["man"]
        },
        {
          "condition_group": "sendings",
          "id": "sending:123",
          "type": "push",
          "status": ["open"],
          "operator": "in"
        }
      ]
    }
    

    Example Response

    {
      "data": {
        "count": 2,
        "community_count": 60
      }
    }
    

    Counts members using passed conditions. Also returns count for the whole community.

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences/count_members

    Query parameters

    Parameter Required Type Description
    community_id true string Audience name.
    conditions true Array[Object] List of audience conditions.

    For member

    Example Requests

    [1] https://dmp.mpc.placewise.com/api/2.0/audiences/for_member?msisdn=4748229076
    [2] https://dmp.mpc.placewise.com/api/2.0/audiences/for_member?member_id=99887705
    [3] https://dmp.mpc.placewise.com/api/2.0/audiences/for_member?member_id=99887705&audience_ids[]=509&audience_ids[]=1190
    

    Example Response

    200

    {
      "data": [
        {
          "id": 509,
          "name": "Only Man",
          "community_id": 905,
          "created_at": "2017-05-29 16:27:45 +0000",
          "conditions": [
            {
              "field": "gender",
              "value": "man",
              "operator": "equals",
              "condition_group": "member_properties"
            }
          ],
          "archived_at": null,
          "members_count": 11,
          "members_count_calculated_at": "2017-07-31 10:07:36 +0000"
        },
        {
          "id": 1190,
          "name": "Sending 1",
          "community_id": 905,
          "created_at": "2017-06-17 15:33:48 +0000",
          "conditions": [
            {
              "id": "am:665533",
              "status": ["delivered"],
              "operator": "not_in",
              "condition_group": "sendings"
            }
          ],
          "archived_at": null,
          "members_count": 21,
          "members_count_calculated_at": "2017-07-31 10:07:36 +0000"
        }
      ]
    }
    

    200

    {
      "data": []
    }
    

    400

    {
      "error": "msisdn, member_id are missing, exactly one parameter must be provided"
    }
    

    Return member's audiences.

    HTTP Request

    GET https://dmp.mpc.placewise.com/api/2.0/audiences/for_member

    Query parameters

    Exactly one parameter of msisdn and member_id must be provided.

    Parameter Required Description
    member_id false Member's id from MP.
    msisdn false Member's msisdn.
    audience_ids false List of audience ids to narrow searching

    Is member

    Example Requests

    https://dmp.mpc.placewise.com/api/2.0/audiences/509/is_member?external_id=99887705
    https://dmp.mpc.placewise.com/api/2.0/audiences/509/is_member?msisdn=4742876362
    

    Example Response

    200

    {
      "data": {
        "external_id": 99887705,
        "profile": {
          "email": "pipin@middle.earth",
          "first_name": "Wiesiek",
          "optin_channel": "tests",
          "birthday": "1999-01-01",
          "gender": "man",
          "msisdn": "4742876362"
        },
        "mobile": {}
      }
    }
    

    200

    {
      "data": false
    }
    

    400

    {
      "error": "msisdn, external_id are missing, exactly one parameter must be provided"
    }
    

    Checks if member belongs to audience. When member is found his profile is returned.

    HTTP Request

    GET 2.0/audiences/509/is_member

    Query parameters

    Exactly one parameter must be provided.

    Parameter Description
    external_id Member's id from MP.
    msisdn Member's msisdn.

    Create scroll members

    Example request

    {
      "view_name": "my_view",
      "audience_id": 553,
      "conditions":
            [
              {
                "condition_group": "member_properties",
                "field": "gender",
                "operator": "equals",
                "value": "man"
              }
            ]
    }
    

    Example responses

    200

    {
      "data": {
        "view_name": "my_view",
        "audience_id": 553,
        "conditions": [
          {
            "condition_group": "member_properties",
            "field": "gender",
            "operator": "equals",
            "value": "man"
          }
        ]
      }
    }
    

    404

    {
      "error": "Audience not found"
    }
    

    422

    {
      "error": "View name is already taken"
    }
    

    Creates materialized view for an audience. It significantly speeds up querying members with pagination. Name could be any string but if follows pattern: audience_members_<name>_<timestamp> it would be deleted by view's cleaner. Also when you use opiton randomized will have random order (ordered by column with random values).

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences/scroll_members

    Parameters

    Parameter Required Type Description
    view_name true string Unique view name.
    audience_id true integer Audience id.
    conditions false Array[Object] Array of objects with conditions.
    randomized false Boolean Return members from view in random (but consistent) order (by default it's turned off)

    Show scroll members

    Example request

    GET https://dmp.mpc.placewise.com/api/2.0/audiences/scroll_members/my_view
    

    Example responses

    200

    {
      "data": [
        {
          "external_id": 1,
          "member_id": 1,
          "profile": {
            "first_name": "Karyna",
            "msisdn": "4773606023"
          },
          "external_data": {
            "points_balance": 1015
          }
        }
      ]
    }
    
    

    404

    {
      "error": "View not found"
    }
    

    Returns members for materialized view.

    HTTP Request

    GET https://dmp.mpc.placewise.com/api/2.0/audiences/scroll_members/:view_name

    Parameters

    Parameter Required Type Description
    view_name true string Unique view name
    from false integer Offset from the first result
    size false integer Maximum amount of members
    fields false object Fields included in response

    Fields Parameters

    Parameter Required Type Default Description
    profile false bool true Member's personal data
    mobile false bool false Member's push data (push token and push enabled flag)
    external_data false array[string] false Additional member's data. Possible values: "reward_points_balance", "points_balance". At least one element is required.

    Delete scroll members

    Example request

    DELETE https://dmp.mpc.placewise.com/api/2.0/audiences/scroll_members/my_view
    

    Example responses

    200

    {
      "data": "Materialized view my_view deleted"
    }
    

    404

    {
      "error": "View not found"
    }
    

    Deletes materialized view.

    HTTP Request

    DELETE https://dmp.mpc.placewise.com/api/2.0/audiences/scroll_members/:view_name

    Refresh audience cache

    Example request

    {
      "member_ids": [123, 456],
      "event_type": "member_event"
    }
    

    Example responses

    200

    {
      "data": "Audience cache refresh job scheduled."
    }
    
    

    404

    {
      "error": "event_type does not have a valid value"
    }
    

    Sends update members in audience cache

    HTTP Request

    POST https://dmp.mpc.placewise.com/api/2.0/audiences/audience_cache/refresh

    Parameters

    Parameter Required Type Description
    member_ids true Array[Integer] Unique view name
    event_type true string Possible values: coupon_event link_event member_event mobile_event pos_transaction profile_event sending_events wifi_events

    Audience API conditions

    This page describes possible values in conditions array. It's a part of payload in Audience API that is used in many requests.

    IMPORTANT
    Required field means that field must be present in payload and it can't contain [], {}, null, ""

    CUSTOM DATA TYPES

    MinMax

    Subfield Type Required?
    min Integer, Float No*
    max Integer, Float No*

    *At least one of them must be present

    {
      "quantity": {
        "min": 5,
        "max": 15
      }
    }
    
    {
      "frequency": {
        "min": 5
      }
    }
    
    {
      "frequency": {
        "max": 5.4
      }
    }
    

    Example usage in documentation

    Field Type Required?
    quantity MinMax Yes
    Field Type Required?
    frequency MinMax Yes

    DMP_Date

    Subfield Type Required? Description
    from DateTime, Integer No DateTime must be valid ISO format 2022-05-28T08:11:38Z
    to DateTime, Integer No DateTime must be valid ISO format 2022-05-28T08:11:38Z
    ago Integer No Legacy, check note below
    not_ago Integer No Legacy, check note below
    use_calendar_days Boolean No Indicates if date should be rounded to the beginning/end of day (default is True)
    use_complete_interval Boolean No Indicates if date should be rounded to the beginning/end of interval (default is False)
    interval String No Interval used for calculating relative dates, one of: hours, days, weeks, months, years (default is days)

    NOTE
    ago and not_ago are legacy and support for them will be removed in the nearest future. Use from / to with integers specified instead:
    not_ago -> -to
    ago -> -from

    so for example:
    "date": { "ago": 7 } should be replaced with "date": { "from": -7 }
    and
    "date": { "not_ago": 10 } should be replaced with "date": { "to": -10 }

    Examples

    absolute dates
    
    {
      "date": {
        "from": "1997-03-03"
      }
    }
    
    {
      "date": {
        "to": "1998-03-03"
      }
    }
    
    relative dates
    
    {
      "date": {
        "from": 10
      }
    }
    
    {
      "date": {
        "to": 5,
        "use_calendar_days": true
      }
    }
    
    {
      "date": {
        "ago": 7
      }
    }
    
    {
      "date": {
        "not_ago": 10
      }
    }
    
    selecting current month
    
    {
      "date": {
        "from": 0,
        "to": 0,
        "interval": "months",
        "use_complete_interval": true
      }
    }
    
    selecting previous year
    
    {
      "date": {
        "from": -1,
        "to": -1,
        "interval": "years",
        "use_complete_interval": true
      }
    }
    
    selecting last 3 weeks
    
    {
      "date": {
        "from": -2,
        "to": 0,
        "interval": "weeks",
        "use_complete_interval": true
      }
    }
    

    Example usage in documentation

    Field Type Required?
    date DMP_Date No

    arcadier_carts

    {
      "condition_group": "arcadier_carts",
      "quantity": { "min": 5, "max": 15 },
      "item_ids": { "operator": "not_any", "value": ["a", "b", "c"] },
      "categories_ids": { "operator": "not_any", "value": ["f", "o", "o"] },
    }
    
    Field Type Required? Descriptiion
    quantity MinMax No can't be null/can't be empty if it's set
    item_category_ids Object No
    item_category_ids.operator String Yes One of : any, not_any
    item_category_ids.value String[] Yes
    item_ids Object No
    item_ids.operator String Yes One of : any, not_any
    item_ids.value String[] Yes

    arcadier_carts_last_updated

    {
      "condition_group": "arcadier_carts_last_updated",
      "date": { "relative_from": 10, "relative_to": 3 }
    }
    
    Field Type Required? Descriptiion
    date Object Yes
    date.relative_from Integer No
    date.relative_to Integer No

    arcadier_orders_amount

    {
      "condition_group": "arcadier_orders_amount",
      "amount": { "min": 0 }, "date": { "ago": 0, "use_calendar_days": true }
    }
    
    {
      "condition_group": "arcadier_orders_amount",
      "amount": { "min": 0 },
      "merchant_ids": { "operator": "any", "value": ["123", "112", "17", "9"] }
    }
    
    {
      "condition_group": "arcadier_orders_amount",
      "amount": { "min": 0 },
      "fulfilment_status": { "operator": "any", "value": ["created"] }
    }
    
    {
      "condition_group": "arcadier_orders_amount",
      "amount": { "min": 0 },
      "item_category_ids": { "operator": "any", "value": ["1231-dasda-123"] }
    }
    
    {
      "condition_group": "arcadier_orders_amount",
      "amount": { "min": 0 },
      "item_ids": { "operator": "any", "value": ["1231-dasda-123"] }
    }
    
    Field Type Required? Descriptiion
    amount MinMax Yes can't be null/can't be empty if it's set
    date DMP_Date No can't be empty if it's set
    merchant_ids Object No
    merchant_ids.operator String Yes One of : any, not_any
    merchant_ids.value String[] Yes
    fulfilment_status Object No
    fulfilment_status.operator String Yes One of : any, not_any
    fulfilment_status.value String[] Yes
    item_category_ids Object No
    item_category_ids.operator String Yes One of : any, not_any
    item_category_ids.value String[] Yes
    item_ids Object No
    item_ids.operator String Yes One of : any, not_any
    item_ids.value String[] Yes

    arcadier_orders_frequency

    {
      "condition_group": "arcadier_orders_frequency",
      "frequency": { "min": 0, "max": 10 },
      "merchant_ids": { "operator": "any", "value": ["123", "112", "17", "9"] },
      "fulfilment_status": { "operator": "any", "value": ["created"] },
      "item_category_ids": { "operator": "any", "value": ["1231-dasda-123"] },
      "item_ids": { "operator": "not_any", "value": ["1231-dasda-123"] },
      "date": { "ago": 0, "use_calendar_days": true }
    }
    
    Field Type Required? Descriptiion
    frequency MinMax Yes can't be null/can't be empty if it's set
    date DMP_Date No can't be empty if it's set
    merchant_ids Object No
    merchant_ids.operator String Yes One of : any, not_any
    merchant_ids.value String[] Yes
    fulfilment_status Object No
    fulfilment_status.operator String Yes One of : any, not_any
    fulfilment_status.value String[] Yes
    item_category_ids Object No
    item_category_ids.operator String Yes One of : any, not_any
    item_category_ids.value String[] Yes
    item_ids Object No
    item_ids.operator String Yes One of : any, not_any
    item_ids.value String[] Yes

    arcadier_orders_no_transaction

    {
      "condition_group": "arcadier_orders_no_transaction",
      "merchant_ids": { "operator": "any", "value": ["123", "112", "17", "9"] },
      "fulfilment_status": { "operator": "any", "value": ["created"] },
      "item_category_ids": { "operator": "any", "value": ["1231-dasda-123"] },
      "item_ids": { "operator": "not_any", "value": ["1231-dasda-123"] },
      "date": { "ago": 0, "use_calendar_days": true }
    }
    
    Field Type Required? Descriptiion
    date DMP_Date No can't be empty if it's set
    merchant_ids Object No
    merchant_ids.operator String Yes One of : any, not_any
    merchant_ids.value String[] Yes
    fulfilment_status Object No
    fulfilment_status.operator String Yes One of : any, not_any
    fulfilment_status.value String[] Yes
    item_category_ids Object No
    item_category_ids.operator String Yes One of : any, not_any
    item_category_ids.value String[] Yes
    item_ids Object No
    item_ids.operator String Yes One of : any, not_any
    item_ids.value String[] Yes

    audiences

    {
      "condition_group": "audiences",
      "ids": [1, 2, 3],
      "operator": "or"
    }
    
    Field Type Required? Descriptiion
    ids Integer[] Yes
    operator String Yes One of : or, and

    cars

    fetch cars which will expire in 3 days
    
    {
      "condition_group": "cars",
      "registration_numbers": {
        "expiration": {
          "from": 0,
          "to": 3
        }
      }
    }
    
    fetch cars which have already expired
    
    {
      "condition_group": "cars",
      "registration_numbers": {
        "expiration": {
          "to": 0
        }
      }
    }
    
    fetch cars which will expire in 7 days and have registration number KT222222
    
    {
      "condition_group": "cars",
      "registration_numbers": {
        "expiration": {
          "from": 0,
          "to": 7
        },
        "value": "KT222222",
        "operator": "equals"
      }
    }
    
    fetch cars which registration number starts with KT
    
    {
      "condition_group": "cars",
      "registration_numbers": {
        "value": "KT",
        "operator": "starts_with"
      }
    }
    
    fetch cars which make contains BMW
    
    {
      "condition_group": "cars",
      "make": {
        "value": "BMW",
        "operator": "contains"
      }
    }
    
    fetch members who never had any cars registered
    
    {
      "condition_group": "cars",
      "complement": true
    }
    
    Field Type Required? Descriptiion
    registration_numbers Object No
    registration_numbers.value String No
    registration_numbers.operator String No One of : equals, starts_with
    registration_numbers.expiration DMP_Date No
    make Object No
    make.value String Yes
    make.operator String Yes One of : consists
    complement Boolean No One of : true, false

    channel_verification

    {
      "conditon_group": "channel_verification",
      "account_older_than": 10,
      "type": "sms",
      "status": "not_verified"
    }
    
    Field Type Required? Descriptiion
    account_older_than Integer Yes
    type String Yes One of : sms, email
    status String Yes One of : verified, not_verified

    channels

    {
      "condition_group": "channels",
      "push": true,
    }
    
    Field Type Required? Descriptiion
    push Boolean, String No One of : true(String/Boolean), false(String/Boolean), available
    email Boolean, String No One of : true(String/Boolean), false(String/Boolean), available
    sms Boolean, String No One of : true(String/Boolean), false(String/Boolean), available
    ignore_consents Boolean No Disable checking consents, check only channel status
    
    {
      "condition_group": "channels",
      "sms": true,
      "ignore_consents": true
    }
    
    
    {
      "condition_group": "channels",
      "email": true,
      "ignore_consents": true
    }
    
    {
      "condition_group": "channels",
      "push": true,
      "ignore_consents": true
    }
    

    checkin_events

    {
      "condition_group": "checkin_events",
      "event_ids": {
        "values": 123,
        "operator": "in"
      }
    }
    
    Field Type Required? Descriptiion
    event_ids Object Yes
    event_ids.operator String Yes One of : in, all
    event_ids.values Integer, Integer[] Yes
    date DMP_Date No

    checkin_stores

    fetch by store ids
    
    {
      "condition_group": "checkin_stores",
      "store_id": {
        "value": [1, 2, 3],
        "operator": "in"
      }
    }
    
    fetch by absolute dates
    
    {
      "condition_group": "checkin_stores",
      "date": {
        "from": "2024-03-03",
        "to": "2024-03-30"
      }
    }
    
    fetch by quantity of checkins
    
    {
      "condition_group": "checkin_stores",
      "count": {
        "min": 2
      }
    }
    
    fetch by multiple parameters
    
    {
      "condition_group": "checkin_stores",
      "store_id": {
        "value": [4],
        "operator": "not_in"
      },
      "date": {
        "from": -30,
        "to": 0
      },
      "count": {
        "max": 1
      }
    }
    
    fetch by checkins in current month
    
    {
      "condition_group": "checkin_stores",
      "date": {
        "from": 0,
        "to": 0,
        "interval": "months",
        "use_complete_interval": true
      }
    }
    
    fetch by checkins in last 3 weeks (2 from past + current one)
    
    {
      "condition_group": "checkin_stores",
      "date": {
        "from": -2,
        "to": 0,
        "interval": "weeks",
        "use_complete_interval": true
      }
    }
    
    fetch by checkins in last month (without current)
    
    {
      "condition_group": "checkin_stores",
      "date": {
        "from": -1,
        "to": -1,
        "interval": "months",
        "use_complete_interval": true
      }
    }
    
    Field Type Required? Description
    store_id Object No
    store_id.value Integer[] Yes
    store_id.operator String Yes One of : in, not_in
    date DMP_Date No
    count MinMax No Counts how many times event has occurred (taking other filters into account)

    consents

    {
      "condition_group": "consents",
      "values": [true],
      "name": "foo"
    }
    
    {
      "condition_group": "consents",
      "values": ["false", "true", false],
      "name": "foo"
    }
    
    {
      "condition_group": "consents",
      "values": ["", null],
      "name": "foo"
    }
    
    Field Type Required? Descriptiion
    name String Yes
    values Boolean, String Yes One of : true(String/Boolean), false(String/Boolean), "", null
    version String No
    {
      "condition_group": "consent_changes",
      "consent_names": {
        "value": [
          "sms_marketing"
        ],
        "operator": "in"
      },
      "change": {
        "to": true
      },
      "date": {
        "from": "2023-03-01",
        "to": "2023-12-31"
      }
    }
    
    {
      "condition_group": "consent_changes",
      "consent_names": {
        "value": [
          "email_marketing"
        ],
        "operator": "in"
      },
      "change": {
        "to": false
      },
      "date": {
        "from": "2023-03-01",
        "to": "2023-12-31"
      }
    }
    
    {
      "condition_group": "consent_changes",
      "consent_names": {
        "value": [
          "email_marketing"
        ],
        "operator": "not_in"
      },
      "change": {
        "to": true
      },
      "date": {
        "ago": 3
      }
    }
    
    {
      "condition_group": "consent_changes",
      "consent_names": {
        "value": [
          "email_marketing"
        ],
        "operator": "in"
      },
      "change": {
        "to": false
      }
    }
    
    Field Type Required? Descriptiion
    consent_names Object Yes
    consent_names.value String[] Yes Names of the consents, e.g. email_marketing, sms_marketing
    consent_names.operator String Yes One of : in, not_in
    change Object Yes
    change.to Boolean Yes
    date DMP_Date No If not present, date is set to period [now - 3 years, now]

    coupons

    {
      "condition_group": "coupons",
      "status": {"operator": "in", "value": ["used"]},
      "coupon_ids": { "operator": "any", "value": ["123", "456"]},
      "date": { "from":  "2023-01-01", "to": "2023-04-04" }
    }
    
    {
      "condition_group": "coupons",
      "status": {"operator": "not_in", "value": ["used"]},
      "coupon_ids": { "operator": "any", "value": ["123"]},
    }
    
    {
      "condition_group": "coupons",
      "status": {"operator": "in", "value": ["used", "granted"]},
      "coupon_type": {"operator":  "in", "value": ["birthday", "parking"]},
      "store_id": {"operator":  "in", "value": [12345]},
      "date": { "ago":  5 },
      "count": {"min": 1, "max": 5}
    }
    
    {
      "condition_group": "coupons",
      "status": {"operator": "in", "value": ["used"]},
      "auth_type": {"operator":  "in", "value": ["qr_scan"]},
      "auth_store_id": {"operator":  "in", "value": [12345]}
    }
    
    {
      "condition_group": "coupons",
      "status_in": ["granted"],
      "status_not_in": ["used"]
    }
    
    Field Type Required? Descriptiion
    status Object Yes*
    status.value String[] Yes used, granted
    status.operator String Yes One of : in, not_in
    status_in String[] Yes* used, granted
    status_not_in String[] Yes* used, granted
    coupon_ids Object No
    coupon_ids.value Integer[] Yes
    coupon_ids.operator String Yes One of : any
    coupon_type Object No
    coupon_type.value String[] Yes
    coupon_type.operator String Yes One of : in
    store_id Object No
    store_id.value Integer[] Yes
    store_id.operator String Yes One of : in
    auth_type Object No
    auth_type.value String[] Yes qr_scan, none
    auth_type.operator String Yes One of : in
    auth_store_id Object No
    auth_store_id.value String[] Yes
    auth_store_id.operator String Yes One of : in
    date DMP_Date No If passed, can be only a null value (not used due to performance issues)
    count Object No
    count.min Integer No
    count.max Integer No

    geofence_events

    {
      "condition_group": "geofence_events"
    }
    
    {
      "condition_group": "geofence_events",
      "date": { "ago":  5 }
    }
    
    Field Type Required? Descriptiion
    date DMP_Date No

    geo_data

    {
      "condition_group": "geo_data",
      "location_country": {
        "operator": "in",
        "value": [
          "Poland"
        ]
      },
      "location_city": {
        "operator": "in",
        "value": [
          "Warsaw"
        ]
      },
      "location_detail": {
        "operator": "in",
        "value": [
          "Ochota"
        ]
      },
      "within_radius": {
        "latitude": 50.06194,
        "longitude": 19.93834,
        "radius": 1000
      }
    }
    
    Field Type Required? Descriptiion
    location_country Object No
    location_country.value String[] Yes
    location_country.operator String Yes One of : in, not_in
    location_city Object No
    location_city.value String[] Yes
    location_city.operator String Yes One of : in, not_in
    location_detail Object No
    location_detail.value String[] Yes
    location_detail.operator String Yes One of : in, not_in
    within_radius Object No
    within_radius.latitude Float Yes precision: 8, scale: 5
    within_radius.longitude Float Yes precision: 8, scale: 5
    within_radius.radius Integer Yes meters

    gwp_redeem

    {
      "condition_group": "gwp_redeem",
      "date": { "from": "2017-05-29" },
      "count": { "min": 5, "max": 10 }
    }
    
    {
      "condition_group": "gwp_redeem",
      "date": { "ago": 14 }
    }
    
    {
      "condition_group": "gwp_redeem",
      "item_ids": {
        "value": [123],
        "operator": "any"
      }
    }
    
    Field Type Required? Descriptiion
    date DMP_Date No
    count MinMax No
    item_ids Object No
    item_ids.value Integer[] Yes
    item_ids.operator String Yes One of : any, not_any
    campaign_ids Object No
    campaign_ids.value String[] Yes
    campaign_ids.operator String Yes One of : any, not_any
    {
      "condition_group": "links",
      "url": { "operator": "equals", "value": ["http://boostcom.no", "http://placewise.com", "http://bstc.no"] },
      "status": { "operator": "in", "value": ["clicked"] }
    }
    
    Field Type Required? Descriptiion
    url Object Yes
    url.value String[] Yes
    url.operator String Yes One of : equals, not_equals, match, not_match
    status Object Yes
    status.value String[] Yes One of : clicked, delivered, open, sent, seen, used, mandrill_sent, mandrill_spam, mandrill_unsub
    status.operator String Yes One of : in, not_in

    member_activity

    {
      "condition_group": "member_activity",
      "type": "coupon_seen",
      "occurred": {
        "operator": "in",
        "value": 12
      }
    }
    
    {
      "condition_group": "member_activity",
      "type": "coupon",
      "occurred": {
        "operator": "in",
        "value": 30
      }
    }
    
    {
      "condition_group": "member_activity",
      "occurred": {
        "operator": "not_in",
        "value": 730
        "ignore_dmp_profiling_consent": true
      }
    }
    
    Field Type Required? Descriptiion
    type String No One of : coupon_used, coupon_seen, mobile, pos, webform_visited, arcadier_cart, arcadier_order, checkin, checkin_store, coupon, game, gwp, link, member, parking, points, receipt, reward_transaction, sending, spaycial_bank, transaction_points, vending_machine, voucher, webform, wifi
    occurred Object Yes
    occurred.value Integer Yes Indicates number of last days to take into account, e.g. value 5 means time period [5 days ago, now]
    occurred.operator String Yes One of : in, not_in - not_in means to fetch the complement of the audience (e.g. everyone who was not active during last 5 days)
    ignore_dmp_profiling_consent Boolean No

    member_flags

    {
      "condition_group": "member_flags",
      "any": ["a", "b", "c"]
    }
    
    Field Type Required? Descriptiion
    any String[] Yes

    member_properties

    {
      "condition_group": "member_properties",
      "field": "interests",
      "operator": "any",
      "value": ["good_offers"],
      "type": "array"
    }
    
    {
      "condition_group": "member_properties",
      "field": "best_offers",
      "operator": "gt",
      "value": 0.1,
      "type": "number"
    }
    
    {
      "condition_group": "member_properties",
      "field": "members_group_ids",
      "operator": "any",
      "value": [1, 2],
      "type": "array"
    }
    
    Field Type Required? Descriptiion
    field String Yes
    operator String Yes
    value String, Integer, Float, Array No
    min Integer No Must be in range [-180, inf], must be less than max
    max Integer No Must be in range [ -inf, 180]
    day Integer No Must be in range [1, 31]
    month Integer No Must be in range [1, 12]
    year Integer No Must be in range [1, inf]
    dow Integer No Must be in range [0, 6]
    min_day Integer No Must be in range [1, 31], must be less than max_day if min_month == max_month
    max_day Integer No Must be in range [1, 31]
    min_month Integer No Must be in range [1, 12], must be less than or equal max_month
    max_month Integer No Must be in range [1, 12]
    days Integer No
    months Integer No
    years Integer No

    mobile

    {
      "condition_group": "mobile",
      "field": "app_version",
      "ios": {"value": "1.0.1", "operator": "lt" },
      "android": {"value": "1.2.1", "operator": "lte" }
    }
    
    Field Type Required? Descriptiion
    field String Yes
    android Object No
    android.operator String No One of : exists, not_exists, gt, gte, lt, lte, equals, not_equals
    android.value String No Must have version_format if operator is one of : gt, gte, lt, lte, equals, not_equals
    ios Object No
    ios.operator String No One of : exists, not_exists, gt, gte, lt, lte, equals, not_equals
    ios.value String No Must have version_format if operator is one of : gt, gte, lt, lte, equals, not_equals
    no_app_installed String No Can be null or must contain blank_string
    unknown String No Can be null or must contain blank_string

    parking

    {
      "condition_group": "parking",
      "visits": { "between":  {"min":  10, "max":  20} },
      "event_type": "in",
      "dwell_time": { "above":  2000 },
      "date": { "ago": 10, "use_calendar_days": true }
    }
    
    Field Type Required? Descriptiion
    date Object No
    date.from String No Must be in format yyyy-mm-dd, can be null
    date.to String No Must be in format yyyy-mm-dd, can be null
    date.on String No Must be in format yyyy-mm-dd, can be null
    date.later_than String No Must be in format yyyy-mm-dd, can be null
    date.earlier_than String No Must be in format yyyy-mm-dd, can be null
    date.ago Integer No Can be null, can't be present if from or to is present
    date.use_calendar_days Boolean No Can be null
    visits Object No
    visits.between Object No
    visits.between.min Integer No Must be less than visits.between.max
    visits.between.max Integer No
    visits.above Integer No Can be null
    visits.below Integer No Can be null
    visits.equal Integer No Can be null
    event_type String No
    dwell_time Object No
    dwell_time.between Object No
    dwell_time.between.min Integer No
    dwell_time.between.max Integer No
    dwell_time.above Integer No Can be null
    dwell_time.below Integer No Can be null
    dwell_time.equal Integer No Can be null

    point_events

    {
      "condition_group": "point_events",
      "event_description": {"operator": "eq", "value": "purchase_scan"},
      "parameter": [
        {
          "key": "abc",
          "value": "abc",
          "operator": "eq"
        },
        {
          "key": "123",
          "value": "123",
          "operator": "not_eq"
        }
      ],
      "date": {"ago":  20}
    }
    
    Field Type Required? Descriptiion
    event_description Object Yes
    event_description.operator String Yes One of eq, not_eq
    event_description.value String Yes
    parameter Object[] No
    parameter.element Object No
    parameter.element.key String Yes
    parameter.element.value String Yes
    parameter.element.operator String Yes One of eq, not_eq
    date DMP_Date No

    points

    {
      "condition_group": "points",
      "bucket": "foo",
      "points": {"min":  10},
      "expiry_date": {"ago":  20}
    }
    
    Field Type Required? Descriptiion
    bucket String Yes
    points MinMax Yes
    expiry_date DMP_Date No

    pos_items

    {
      "condition_group": "pos_items",
      "amount": { "min": 0 },
      "date": { "from": "2017-05-29" },
      "level": "subcategory_id",
      "ids": ["uuid1", "uuid2"]
    }
    
    {
      "condition_group": "pos_items",
      "date": { "ago": 14 },
      "level": "all"
    }
    
    Field Type Required? Descriptiion
    ids Array No
    amount MinMax No
    date DMP_Date No
    level String Yes One of : all, category_id, subcategory_id, item_id

    pos_loyalty

    {
      "condition_group": "pos_loyalty",
      "stamps": { "min": 1, "max": 6 }
    }
    
    {
      "condition_group": "pos_loyalty",
      "giftcards": { "min": 1 }
    }
    
    Field Type Required? Descriptiion
    stamps MinMax No Can't be empty if set
    giftcards MinMax No Can't be empty if set

    pos_transactions

    {
      "condition_group": "pos_transactions",
      "amount": { "min": 0 },
      "frequency": { "min": 1, "max": 1 },
      "date": { "from": "2017-05-29" },
      "store_ids": { "operator": "any", "value": ["101960", "100550"] },
      "parameter": [
        { "operator": "eq",
          "key": "e_store",
          "value": "12345"
        } 
      ]
    }
    
    Field Type Required? Descriptiion
    amount MinMax No Can't be empty if set
    frequency MinMax No Can't be empty if set
    date DMP_Date No Can't be empty if set
    store_ids Object No
    store_ids.operator String Yes One of : any, not_any
    store_ids.value String[] Yes
    parameter Object[] No
    parameter.element Object No
    parameter.element.key String Yes
    parameter.element.value String No
    parameter.element.operator String Yes One of eq, not_eq

    pos_no_transactions

    {
      "condition_group": "pos_no_transactions",
      "amount": { "min": 0 },
      "frequency": { "min": 1, "max": 1 },
      "date": { "from": "2017-05-29" },
      "store_ids": { "operator": "any", "value": ["101960", "100550"] },
      "parameter": { "operator": "eq", "key": "e_store", "value": "12345" }
    }
    
    Field Type Required? Descriptiion
    amount MinMax No Can't be empty if set
    frequency MinMax No Can't be empty if set
    date DMP_Date No Can't be empty if set
    store_ids Object No
    store_ids.operator String Yes One of : any, not_any
    store_ids.value String[] Yes
    parameter Object[] No
    parameter.element Object No
    parameter.element.key String Yes
    parameter.element.value String No
    parameter.element.operator String Yes One of eq, not_eq

    profile_updates

    {
      "condition_group": "profile_updates",
      "action": "added",
      "field": "email",
      "date": { "from": "2019-01-01" }
    }
    
    Field Type Required? Descriptiion
    action String Yes One of : added, modified, removed
    field String Yes
    date DMP_Date No

    reward_details

    {
      "condition_group": "reward_details",
      "transaction_type": { "operator": "eq", "value": "app_opened" }
    }
    
    {
      "condition_group": "reward_details",
      "transaction_type": { "operator": "not_eq", "value": "app_opened" },
      "details": [
        {
          "key": "foo",
          "value": "fighters",
          "operator": "eq"
        }
      ],
      "reward_id": {
        "values": [1, 2, 3],
        "operator": "in"
      }
    }
    
    Field Type Required? Descriptiion
    transaction_type Object Yes
    transaction_type.operator String Yes
    transaction_type.value String Yes
    achievement_type Object No
    achievement_type.operator String Yes
    achievement_type.value String Yes
    details Object[] No
    details.element Object No
    details.element.key String Yes
    details.element.value String Yes
    details.element.operator String Yes One of eq, not_eq
    event_date DMP_Date No
    amount MinMax No
    reward_id Object No
    reward_id.values Integer[] Yes
    reward_id.operator String Yes One of in, not_in

    reward_transactions

    {
      "condition_group": "reward_transactions",
      "points": { "min": 100, "max": 200 }
    }
    
    Field Type Required? Descriptiion
    points MinMax No Can't be empty if set

    receipt_scans

    {
      "condition_group": "receipt_scans",
      "event_ids": {
        "value": [
          "1",
          "2",
          "3"
        ],
        "operator": "any"
      },
      "amount": {
        "min": 3,
        "max": 5
      },
      "date": {
        "from": "1997-07-07",
        "to": "1997-07-10"
      },
      "currencies": {
        "value": [
          "PLN",
          "EUR"
        ],
        "operator": "in"
      }
    }
    
    {
      "condition_group": "receipt_scans",
      "types_of_activities": {
        "value": [
          "spaycial_banking"
        ],
        "operator": "in"
      },
      "complement": true
    }
    
    Field Type Required? Descriptiion
    amount MinMax No
    sum_amount MinMax No
    avg_amount MinMax No
    frequency MinMax No Can't be empty if set
    date DMP_Date No
    event_ids Object No
    event_ids.value String[] Yes
    event_ids.operator String Yes One of : any, not_any
    store_ids Object No
    store_ids.value String[] Yes
    store_ids.operator String Yes One of : any, not_any
    currencies Object No
    currencies.value String[] Yes
    currencies.operator String Yes One of : any, not_any
    types_of_activities Object No
    types_of_activities.value String[] Yes Allowed values : event workshop pro-sale spaycial_banking spaycial_scanning
    types_of_activities.operator String Yes One of : in, not_in
    complement Boolean No Indicates whether to fetch the complement of the audience (members who don't match specified filters)

    refer_a_friend

    {
      "condition_group": "refer_a_friend",
      "amount": { "min": 0 },
      "referral_date": { "ago": 10, "use_calendar_days": true }
    }
    
    Field Type Required? Descriptiion
    amount MinMax No Can't be empty if set
    referral_date DMP_Date No

    sendings

    {
      "condition_group": "sendings",
      "id": "sending:123",
      "status": ["delivered"],
      "operator": "in"
    }
    
    {
      "condition_group": "sendings",
      "id": "sending:124",
      "status": ["sent", "delivered"],
      "operator": "in",
      "date": { "from": "2017-05-29" },
    }
    
    {
      "condition_group": "sendings",
      "id": "sending:125",
      "status": ["open"],
      "operator": "in",
      "date": { "ago": 1, "interval": "hours" },
    }
    
    Field Type Required? Descriptiion
    id String Yes
    status String[] Yes
    operator String Yes One of : in, not_in
    date DMP_Date No

    spaycial_bank_connections

    {
      "condition_group": "spaycial_bank_connections",
      "joined": true
    }
    
    {
      "condition_group": "spaycial_bank_connections",
      "joined": false
    }
    
    {
      "condition_group": "spaycial_bank_connections",
      "joined": true,
      "connection": {
        "active": true,
        "date": { "ago": 5 }
      }
    }
    
    {
      "condition_group": "spaycial_bank_connections",
      "joined": true,
      "connection": {
        "active": false,
        "date": { "from": "2023-09-01", "to": "2023-09-30" }
      }
    }
    
    Field Type Required? Description
    joined Boolean Yes filter members who has/hasn't joined some/any spaycial program
    connection Object No*
    connection.active Boolean Yes filter active/inactive bank connections
    connection.date DMP_Date Yes time range of bank connection

    *connection must not be present if joined = false

    sending_yearly_count

    {
      "condition_group": "sending_yearly_count",
      "sms": { "min":  20, "max":  50},
      "email": { "min":  20, "max":  50},
      "push": { "min":  20, "max":  50},
      "total": { "min":  20, "max":  100},
    }
    
    {
      "condition_group": "sending_yearly_count",
      "sms": { "min":  20, "max":  50},
      "total": { "min":  20, "max":  100}
    }
    
    {
      "condition_group": "sending_yearly_count",
      "sms": { "min":  20, "max":  50}
    }
    
    Field Type Required? Descriptiion
    sms MinMax No
    email MinMax No
    push MinMax No
    total MinMax No

    tem_roles

    {
      "condition_group": "tem_roles",
      "field": "foo",
      "operator": "in",
      "value": ["a", "b", "c"]
    }
    
    Field Type Required? Descriptiion
    field String Yes
    operator String Yes
    value String[] Yes

    top_members

    {
      "condition_group": "top_members",
      "date": { "value": "2017-09-12", "operator": "eq" },
      "limit": { "value":  5}
    }
    
    Field Type Required? Descriptiion
    date Object Yes
    date.value String Yes Must be in format rrrr-mm-dd
    date.operator String No
    limit Object Yes
    limit.value Integer Yes

    transaction_points

    transaction_points

    {
      "condition_group": "transaction_points",
      "subunit_id": {"operator":  "any", "value":  [1, 2, 3]},
      "earning_date": { "from": "2020-09-01", "to": "2020-09-10" },
      "expiry_date": { "from": "2020-10-01", "to": "2020-12-01" },
      "earning_event_id": "SCAN_RECEIPT",
      "status": "AVAILABLE",
      "points": { "min": 0, "max": 15 }
    }
    
    Field Type Required? Descriptiion
    subunit_id Object No
    subunit_id.operator String Yes One of : any
    subunit_id.value Integer[] Yes
    earning_date DMP_Date No
    expiry_date DMP_Date No
    status String No One of : AVAILABLE, EXPIRED, USED, CANCELED
    earning_event_id String No
    points MinMax No

    vending_machines

    {
      "condition_group": "vending_machines",
      "date": { "from": "2017-05-29" },
      "level": "mall_id",
      "ids": [3, 44]
    }
    
    {
      "condition_group": "vending_machines",
      "date": { "ago": 14 },
      "level": "all",
    }
    
    {
      "condition_group": "vending_machines",
      "date": { "from": "2019-01-01" },
      "level": "external_event_name",
      "names": ["etst event", "yet another event"]
    }
    
    {
      "condition_group": "vending_machines",
      "date": { "from": "2017-05-29" },
      "level": "service_id",
      "ids": [3, 44],
      "operator": "not_in"
    }
    
    Field Type Required?
    date DMP_Date Yes
    level String Yes
    ids Object[] Yes
    names Object[] Yes
    operator String No

    voucher_usage

    {
      "condition_group": "voucher_usage",
      "date": { "from": "2017-05-29" },
      "count": { "min": 5, "max": 10 },
      "store_ids": {"operator":  "any", "value": ["1", "2", "3"]},
      "vouchers_ids": {"operator":  "any", "value": [1, 2, 3]}
    }
    
    {
      "condition_group": "voucher_usage",
      "date": { "ago": 14 }
    }
    
    Field Type Required? Descriptiion
    count MinMax No
    date DMP_Date No
    store_ids Object No
    store_ids.value String[] Yes
    store_ids.operator String Yes One of : any, not_any
    vouchers_ids Object No
    vouchers_ids.value Integer[] Yes
    vouchers_ids.operator String Yes One of : any, not_any

    wifi

    {
      "condition_group": "wifi",
      "operator": "gt",
      "value": "2018-03-03"
    }
    
    {
      "condition_group": "wifi",
      "operator": "in",
      "value": 100
    }
    
    Field Type Required? Descriptiion
    operator String Yes One of : in, not_in, gt, gte, lt, lte
    value String, Integer Yes

    Events API

    Base url for:

    POST /api/1.0/reward/transaction_events

    An endpoint to create a bulk of reward transaction events. It gather all user behaviour data from transactions connected with rewards.

    Example Requests

    POST /api/1.0/reward/transaction_events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "member_id": 1,
          "community_id": 1,
          "transaction_type": "points_granted",
          "achievement_type": "mall_visited",
          "points": 234432,
          "balance_after": 243,
          "event_date": "2018-12-19T10:01:28.839Z"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
        "error": "bulk[0][achievement_type] is missing, bulk[0][balance_after] is missing",
        "success": false
    }
    

    Params

    Field Type Required Description
    member_id Integer true Member identifier
    community_id Integer true Integer from MP platform
    transaction_type String true Type of transaction
    achievement_type String false Type of achievement
    points Integer true Number of points awarded/subtracted
    balance_after Integer true Balance remaining after event
    event_date String datetime true Event occurence date
    reward_id Integer false Unique id of reward connected with this transaction
    product String false From which product event was sent
    platform String false Source of events e.g. webform, ios, android, other
    grant_type String false Type of the grant
    grant_properties Hash false Additional grant information eq. store_id
    details Hash false Additional transaction information

    POST /api/1.0/sendings/events

    An endpoint to create a bulk of sending events. Requires to pass one of optional params: member_ids or msisdns. What is more mobile-deliveries and mobile-events are processed by DMP and written into sending-events index.

    Header

    Field Type Description
    X-Customer-Public-Token String API authentication token

    Parameter

    Field Type Description
    bulk Array A list of sending events params

    bulk

    Field Type Description
    bulk Array A list of sending events params

    POST /api/1.0/sendings

    An endpoint to create sending definition in DMP system before running sms, email, push sendings in Boostcom Loyalty.

    Example Requests

    POST /api/1.0/sending
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "id": "am:828f5ab6-128e-47cd-93b4-f574ed00b1ed",
      "coupons": [
        {
          "id": 14917,
          "collection_id": 500,
          "url": "https://offers.bstcm.no/infinity-mall/offer_collections/1008/offers/14917"
        }
      ],
      "links": [
        "https://webforms.bstcm.no/hageland?m=278fc9v&region=Troms&butikk=HAGELAND%20Solblomsten",
        "https://ekort.bstcm.no/m?n=hageland&m=27azhi"
      ]
    }
    

    Example Response

    200

      {
        "success": "12652a60129abef196223b97"
      }
    

    400

    {
      "error": "msisdn, external_id are missing, exactly one parameter must be provided"
    }
    

    Request body parameters

    Property Type Description
    id datestring Filter posts created greater than the date
    coupons datestring Filter posts created lesser than the date
    links string Order posts based on the field queried. For descending order, prefix with '-'
    string Filter posts based on category

    POST /api/1.0/shortener/events

    An endpoint to create a bulk of shortener events.

    Example Requests

    POST /api/1.0/shortener/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
           "target_url": "noexpiry.no",
           "token": "aaaaa2",
           "visitor_id": "cookie124124124",
           "identifiers": {
              "msisdn": "4742876365"
            },
            "expiry_data": {
              "reasons": ["date"],
              "fallback_url": "http://new.go.there2"
           },
           "created_at": "2018-12-19T10:01:28.839Z"   
        }
      ]
    }
    
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
        "error": "bulk[0][visitor_id] is missing, bulk[0][expiry_data][reasons] does not have a valid value",
        "success": false
    }
    

    Params

    Field Type Required Description
    target_url String true Url target
    token String true Token defining a shortened url
    visitor_id String true Visitor identifier
    identifiers Hash false Hash of identifiers
    expiry_data Hash false Present if link expired, must have "reasons" and "fallback_url" keys
    created_at String datetime false Event creation time

    POST /api/2.0/coupons/events

    An endpoint to create a bulk of coupon events for new Kubon system

    Example Requests

    POST /api/2.0/coupons/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
    
          "coupon_id": "15114",
          "member_id": 99887325,
          "status": "seen",
          "platform": "ios",
          "product": "test",
          "event_date": "2018-12-19T10:01:28.839Z",
          "community_id": 1088
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][id] is missing, bulk[0][id] is empty",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of coupon events params

    Bulk

    Field Type Required Description
    coupon_id Integer true Coupon id in loyalty system
    event_type String true Coupon status/type, possible values: clicked, delivered, mandrill_sent, mandrill_spam, mandrill_unsub, open, seen, sent, used
    platform String true Coupon channel context type eg. ios
    product String true
    event_date String datetime true Event creation time
    member_id Integer true
    community_id Integer true
    campaign_id Integer false Campaign id in loyalty system
    force_processable Boolean false When user confirm consent to use this specific coupon
    competition Boolean false Indicates that coupon is a competition coupon. NOTE: this does not force being processable
    audience_id Integer false
    shops Array[String] false
    tags Array[String] false
    collection_ids Array[Integer] false Ids of collections where coupon belogs. It can belong to no collections
    context Hash false Context where coupon was used / seen / clicked all utm tags etc.

    POST /api/2.0/pos/item/register_events(.json)

    An endpoint to save transaction items

    Example Requests

    POST /api/2.0/pos/item/register_events(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "type": "register",
          "transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7a62",
          "item_id": "1234",
          "id": "1234",
          "price_gross": "100",
          "price_net": "77",
          "value_gross": "100",
          "value_net": "77",
          "tax": "21",
          "value_tax": "23",
          "tax_rate": "0.23",
          "amount": "1",
          "member_id": 1243,
          "store_id": "7261",
          "receipt_id": "2763",
          "event_date": "2017-05-29T08:21:59.379Z",
          "currency": "NOK",
          "ignore_loyalty": false,
          "community_id": 1088
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][id] is missing, bulk[0][id] is empty",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of item tramsacton events

    Bulk

    Field Type Required Description
    type String true Type of item event is it storing or refund of event
    transaction_id String true Unique id for every transaction
    original_transaction_id String false If event is for refunded item, here we have transaction that original item is stored
    item_id String true
    id String true
    original_id String false
    category_id String false Category of stored item
    subcategory_id String false Subcategory of stored item
    price_gross Float true
    price_net Float true
    value_gross Float true
    value_net Float true
    tax Float true
    value_tax Float true
    tax_rate Float true
    amount Integer true Amount of this type of items, default: 1
    store_id String true
    receipt_id String true Unique id for transaction in some external system
    event_date String true When event occured in external system, date time
    currency String true
    ignore_loyalty Boolean true default: false
    community_id Integer true Identifier for Loyalty"s community
    member_id Integer true Unique identifier for member in loyalty
    discount_price_gross Float false
    discount_price_net Float false
    discount_value_gross Float false
    discount_value_net Float false
    price_gross_before_discount Float false
    price_net_before_discount Float false
    value_gross_before_discount Float false
    value_net_before_discount Float false
    item_number String false
    description String false
    properties Hash false

    POST /api/2.0/pos/refund/events(.json)

    An endpoint to save refund events

    Example Requests

    POST /api/2.0/pos/refund/events(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_type": "item",
          "community_id": 1088,
          "transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7a62",
          "refunded_transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7b12",
          "event_date": "2017-05-29T08:21:59.379Z",
          "store_id": "7261",
          "member_id": 123456,
          "value_gros": "100",
          "ignore_loyalty": true
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][id] is missing, bulk[0][id] is empty",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of item tramsacton events

    Bulk

    Field Type Required Description
    event_type String true
    community_id Integer true
    transaction_id String true
    refunded_transaction_id String true
    event_date String true
    store_id String true
    member_id Integer true
    item_id String false
    value_gros Float true
    ignore_loyalty Boolean true

    POST /api/2.0/pos/transaction/register_events(.json)

    An endpoint to save transactions without items

    Example Requests

    POST /api/2.0/pos/transaction/register_events(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "type": "register",
          "transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7a62",
          "store_id": "7126",
          "community_id": 1234,
          "receipt_id": 2322,
          "event_date": "2017-05-29T08:21:59.379Z",
          "member_id": 123456,
          "total_gross": "12.14",
          "total_net": "9.34",
          "tax": "0.23",
          "loyalty_total_gross": "17.8",
          "loyalty_total_net": "10.0",
          "loyalty_tax": 1.78,
          "currency": "NOK",
          "ignore_loyalty": true
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][transaction_id] is missing, bulk[0][transaction_id] is empty, bulk[0][store_id] is missing",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of tramsactons

    Bulk

    Field Type Required Description
    type String true Type of item event is it storing or refund of event
    transaction_id String true Unique id for every stransaction
    original_transaction_id Array[String] false If event is for refunded item, here we have transaction that original item is stored, transaction_id can be taken from multiple transaction
    item_id String true
    id String true
    original_id String false
    category_id String true Category of stored item
    tax Float true
    store_id String true
    receipt_id String true Unique id for transaction in some external system
    event_date String true When event occured in external system, date time with timezone
    currency String true
    ignore_loyalty Boolean true default: false
    community_id Integer true Identifier for Loyalty"s community
    member_id Integer true Unique identifier for member in loyalty
    total_gross Float true
    total_net Float true
    loyalty_total_gross Float true
    loyalty_total_net Float true
    loyalty_tax Float true
    terminal_id String false default: nil
    sales_person String false default: nil
    store_tax_id String false default: nil
    store_msisdn String false default: nil
    contains_discount_for_whole_transaction Boolean false default: false
    discount_for_items Float, false
    discount_for_transaction Float, false
    discount_total Float, false default: 0.0
    discount_percent Float, false
    total_gross_before_discount Float, false
    giftcard_used Boolean, false
    giftcards Array[String] false
    coupons Array[Integer] false
    points Integer false

    POST /api/2.0/voucher/events

    An endpoint to create a bulk of voucher events for iColumn

    Example Requests

    POST /api/2.0/voucher/events
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_date": "2018-12-19T10:01:28.839Z",
          "event_type": "use_evoucher",
          "voucher_dmp_id": "123213-3123123-32423",
          "community_id": 905,
          "member_id": 2,
          "store_id": 743,
          "voucher_id": 222,
          "voucher_name": "Bench free painting",
          "serial_number": "2131-3123-4343"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "bulk[0][event_date] is missing, bulk[0][event_date] is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of voucher event params

    Bulk

    Field Type Required Description
    event_date String datetime true Event creation time
    event_type String true Currently only: use_evoucher
    voucher_dmp_id String true UUID from external system (in first scenario from App Admin)
    community_id Integer true
    member_id Integer true
    store_id Integer true Store id in iColumn system
    voucher_id Integer true Voucher id in iColumn system
    voucher_name String true Voucher id in iColumn system
    serial_number String false

    POST /api/2.0/voucher/update

    An endpoint to create a bulk of voucher update for iColumn

    Example Requests

    POST /api/2.0/voucher/update
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "event_date": "2018-12-19T10:01:28.839Z",
      "event_type": "use_evoucher",
      "voucher_dmp_id": "123213-3123123-32423",
      "community_id": 905,
      "member_id": 2,
      "store_id": 743,
      "voucher_id": 222,
      "voucher_name": "Bench free painting",
      "serial_number": "2131-3123-4343"
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "event_date is missing, event_date is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true Event creation time
    event_type String true Currently only: use_evoucher
    voucher_dmp_id String true UUID from external system (in first scenario from App Admin)
    community_id Integer true
    member_id Integer true
    store_id Integer false Store id in iColumn system
    voucher_id Integer false Voucher id in iColumn system
    voucher_name String false Voucher id in iColumn system
    serial_number String false

    POST /api/2.0/voucher/delete

    An endpoint to delete voucher

    Example Requests

    POST /api/2.0/voucher/delete
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "event_date": "2018-12-19T10:01:28.839Z",
      "voucher_dmp_id": "123213-3123123-32423",
      "member_id": 2
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "event_date is missing, event_date is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true Event creation time
    voucher_dmp_id String true UUID from external system (in first scenario from App Admin)
    member_id Integer true

    POST /api/2.0/gwp/events

    An endpoint to create a bulk of Gift with purchase events for iColumn

    Example Requests

    POST /api/2.0/gwp/events
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_date": "2018-12-19T10:01:28.839Z",
          "event_type": "redeem_gwp",
          "gwp_dmp_id": "123213-3123123-32423",
          "community_id": 905,
          "member_id": 2,
          "campaign_id": '555',
          "campaign_name": "Parks & Recreations",
          "item_id": 222,
          "item_name": "Bench free painting",
          "serial_number": "2131-3123-4343",
          "detail_id": 124,
          "quantity": 2,
          "properties": {"test": 123}
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "bulk[0][event_date] is missing, bulk[0][event_date] is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of voucher event params

    Bulk

    Field Type Required Description
    event_date String datetime true Event creation time
    event_type String true Currently only: use_evoucher
    gwp_dmp_id String true UUID from external system (in first scenario from App Admin)
    community_id Integer true
    member_id Integer true
    campaign_id String true Campaign id in iColumn system
    campaign_name String true Campaign name in iColumn system
    item_id Integer true Voucher id in iColumn system
    item_name String true Voucher id in iColumn system
    detail_id Integer true
    quantity Integer true
    serial_number String false
    properties Hash false

    POST /api/2.0/gwp/update

    An endpoint to create a bulk of Gift with purchase update for iColumn

    Example Requests

    POST /api/2.0/gwp/update
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "event_date": "2018-12-19T10:01:28.839Z",
      "event_type": "redeem_gwp",
      "gwp_dmp_id": "123213-3123123-32423",
      "community_id": 905,
      "member_id": 2,
      "campaign_id": '555',
      "campaign_name": "Parks & Recreations",
      "item_id": 222,
      "item_name": "Bench free painting",
      "serial_number": "2131-3123-4343",
      "detail_id": 1234,
      "quantity": 2,
      "properties": {"test": 123}
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "event_date is missing, event_date is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true Event creation time
    event_type String true Currently only: use_evoucher
    gwp_dmp_id String true UUID from external system (in first scenario from App Admin)
    community_id Integer true
    member_id Integer true
    campaign_id String false Campaign id in iColumn system
    campaign_name String false Campaign name in iColumn system
    item_id Integer false Item id in iColumn system
    item_name String false Item name in iColumn system
    serial_number String false
    detail_id Integer false
    quantity Integer false
    properties Hash false

    POST /api/2.0/gwp/delete

    An endpoint to delete Gift with purchase

    Example Requests

    POST /api/2.0/gwp/delete
    

    Headers

    "X-Customer-Public-Token": "xxxyyy"
    "Content-Type": "application/json"
    

    Body

    {
      "event_date": "2018-12-19T10:01:28.839Z",
      "gwp_dmp_id": "123213-3123123-32423",
      "member_id": 2
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "event_date is missing, event_date is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true Event creation time
    gwp_dmp_id String true UUID from external system (in first scenario from App Admin)
    member_id Integer true

    POST /api/2.0/pos/transaction/update(.json)

    An endpoint to save transaction items

    Example Requests

    POST /api/2.0/pos/transaction/update(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Body

    {
      "type": "register",
      "transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7a62",
      "item_id": "1234",
      "id": "1234",
      "price_gross": "100",
      "price_net": "77",
      "value_gross": "100",
      "value_net": "77",
      "tax": "21",
      "value_tax": "23",
      "tax_rate": "0.23",
      "amount": "1",
      "member_id": 1243,
      "store_id": "7261",
      "receipt_id": "2763",
      "event_date": "2017-05-29T08:21:59.379Z",
      "currency": "NOK",
      "ignore_loyalty": false,
      "community_id": 1088
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "member_id is missing, member_id is empty",
      "success": false
    }
    

    Params

    Field Type Required Description
    type String false Type of item event is it storing or refund of event
    transaction_id String true Unique id for every transaction
    original_transaction_id String false If event is for refunded item, here we have transaction that original item is stored
    item_id String false
    id String false
    original_id String false
    category_id String false Category of stored item
    subcategory_id String false Subcategory of stored item
    price_gross Float false
    price_net Float false
    value_gross Float false
    value_net Float false
    tax Float false
    value_tax Float false
    tax_rate Float false
    amount Integer false Amount of this type of items, default: 1
    store_id String false
    receipt_id String false Unique id for transaction in some external system
    event_date String true When event occured in external system, date time
    currency String false
    ignore_loyalty Boolean false default: false
    community_id Integer true Identifier for Loyalty"s community
    member_id Integer true Unique identifier for member in loyalty
    discount_price_gross Float false
    discount_price_net Float false
    discount_value_gross Float false
    discount_value_net Float false
    price_gross_before_discount Float false
    price_net_before_discount Float false
    value_gross_before_discount Float false
    value_net_before_discount Float false
    item_number String false
    description String false
    properties Hash false

    POST /api/2.0/pos/item/update(.json)

    An endpoint to update items from transaction

    Example Requests

    POST /api/2.0/pos/item/update(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Body

    {
      "type": "register",
      "transaction_id": "4c4e3139-1e2f-4eb3-bae2-cccdc41d7a62",
      "store_id": "7126",
      "community_id": 1234,
      "receipt_id": 2322,
      "event_date": "2017-05-29T08:21:59.379Z",
      "member_id": 123456,
      "total_gross": "12.14",
      "total_net": "9.34",
      "tax": "0.23",
      "id": "4c4e3139-1e2f-4eb3-bae2-jdlksajkls332",
      "loyalty_total_gross": "17.8",
      "loyalty_total_net": "10.0",
      "loyalty_tax": 1.78,
      "currency": "NOK",
      "ignore_loyalty": true
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "transaction_id is missing, transaction_id is empty, store_id is missing",
      "success": false
    }
    

    Params

    Field Type Required Description
    type String false Type of item event is it storing or refund of event
    transaction_id String true Unique id for every stransaction
    original_transaction_id Array[String] false If event is for refunded item, here we have transaction that original item is stored, transaction_id can be taken from multiple transaction
    item_id String false
    id String true
    original_id String false
    category_id String false Category of stored item
    tax Float false
    store_id String false
    receipt_id String false Unique id for transaction in some external system
    event_date String true When event occured in external system, date time with timezone
    currency String false
    ignore_loyalty Boolean false default: false
    community_id Integer true Identifier for Loyalty"s community
    member_id Integer true Unique identifier for member in loyalty
    total_gross Float false
    total_net Float false
    loyalty_total_gross Float false
    loyalty_total_net Float false
    loyalty_tax Float false
    terminal_id String false default: nil
    sales_person String false default: nil
    store_tax_id String false default: nil
    store_msisdn String false default: nil
    contains_discount_for_whole_transaction Boolean false default: false
    discount_for_items Float, false
    discount_for_transaction Float, false
    discount_total Float, false default: 0.0
    discount_percent Float, false
    total_gross_before_discount Float, false
    giftcard_used Boolean, false
    giftcards Array[String] false
    coupons Array[Integer] false
    points Integer false

    DELETE /api/2.0/pos/transaction/:transaction_id

    An endpoint to save transaction items

    Example Requests

    DELETE /api/2.0/pos/transaction/:transaction_id(.json)
    

    Headers

    "X-Customer-Public-Token": "testtoken"
    "Content-Type": "application/json"
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "transaction_id is missing",
      "success": false
    }
    

    Params

    Field Type Required Description
    transaction_id String true Unique id for every transaction

    POST /api/2.0/point/events

    An endpoint to create a bulk of point events. Order of events passed in bulk is important.

    Example Requests

    POST /api/2.0/point/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_date": "2018-12-19T10:01:28.839Z",
          "event_type": "points_granted",
          "member_id": 1,
          "community_id": 1,
          "bucket": "default",
          "bucket_balance_after": 100,
          "event_points": -7,
          "expiry_points_balance": 10,
          "expiry_points_date": "2020-01-31",
          "external_event_id": "12321421",
          "properties": {"test": 123}
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "bulk[0][achievement_type] is missing, bulk[0][balance_after] is missing",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true When in external system events issue, revoke was made
    event_type Sting true Possible values: issue_points, revoke_points, use_points, expire_points
    member_id Integer true Member identifier
    community_id Integer true Integer from MP platform
    bucket String true Wallet, stamps, points, any value is needed to group points (by default)
    bucket_balance_after Integer true Total sum of points in specific bucket: wallet, stamps etc.
    event_points Integer true How many points added or removed due to the action (e.g. -10 or 10).
    expiry_points_balance Integer false How many points is still on this expiry date
    expiry_points_date String date false When points on some date should expire
    receipt_id String false
    store_id String false
    external_event_id String false
    event_description String false
    event_message String false
    properties Hash false

    NOTE: If you need expiration feature, you have to add fields with expiry prefix.

    POST /api/2.0/goingons/events

    An endpoint to create a going ons events

    Example Requests

    POST /api/2.0/goingons/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_id": 15114,
          "community_id": 1088,
          "event_date": "2018-12-19T10:01:28.839Z",
          "member_id": 124,
          "status": "success",
          "action": "checkin",
          "user_id": 827
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][event_id] is missing, bulk[0][event_id] is empty",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of goingons events params

    Bulk

    Field Type Required Description
    event_id Integer true
    event_date String datetime true Event creation time
    member_id Integer true Identifier for member from MCP
    community_id Integer true Integer from MP platform
    action String true
    user_id Integer false

    POST /api/2.0/parking/events (Deprecated!)

    An endpoint to create a parking event To have access to this endpoint permit with 'parking' service is required.

    Example Requests

    POST /api/2.0/parking/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body with member_id

    {
      "event_date": "2017-05-29T08:21:59.379Z",
      "event_type": "in",
      "member_id": 2,
      "community_id": 905,
      "external_event_id": 12312412
    }
    

    Body with lpn (license plate number)

    {
      "event_date": "2017-05-29T08:21:59.379Z",
      "event_type": "in",
      "lpn": "RKR00003",
      "community_id": 905,
      "external_event_id": 12312412
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
      "error": "event_date is missing, event_date is not correct DateTime format, e.g: 2017-05-29T08:21:59.379Z, 2017-05-29T08:21:59.379+00:00, event_date is empty, event_type is missing, event_type does not have a valid value, community_id is missing, community_id is empty, member_id, lpn are missing, at least one parameter must be provided",
      "success": false
    }
    

    Params

    Field Type Required Description
    event_date String datetime true When event occured
    event_type Sting true Possible values: in, out (car went in, car want out)
    community_id Integer *depends Integer from MP platform
    zone_id Integer *depends Integer
    member_id Integer **depends Member identifier
    lpn String **depends Member's license plate number
    external_event_id String false Id of event from external system
    external_attributes Hash false Additional attributes from provider

    NOTE: - * community_id or zone_id is required to send event - ** member_id or lpn is required to send event - To use LPN as identifier in events in Loyalty Club it's needed to have string property called 'lpn' and in this place member's license plate should be provided.

    POST /api/2.0/webhooks/wifi

    Wifi endpoint for Purple Wifi integration

    Example Requests

    POST /api/2.0/webhooks/wifi?token=xyz
    

    Headers

    "Content-Type": "application/json"
    

    Body which is received from Purple

    {
      "client": {
        "mac": "00-01-02-03-04-05",
        "userAgent": "Mozilla/5.0 (X11; Linuxx86_64) Chrome/64.0.3282.85Safari/537.36"
      },
      "company": {
        "id": 999,
        "name": "Your companyname"
      },
      "session": {
        "authenticationTime": "2018-01-18T13:27:08+0000"
      },
      "user": {
        "dateOfBirth": "1970-01-01",
        "email": "webhook@test.com",
        "firstName": "Webhook",
        "gender": "F",
        "id": 888,
        "lastName": "Test",
        "provider": "Facebook",
        "visitCountsForVenues": {
          "888": 7
        }
      },
      "venue": {
        "id": 888,
        "latitude": "53.4857388",
        "longitude": "-2.0999813",
        "name": "Your venue name"
      }
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    POST /api/2.0/eventbrite/events

    Endpoint for receiving eventbrite events integrations

    Example Requests

    POST /api/2.0/eventbrite/events
    

    Headers

    "Content-Type": "application/json"
    "X-Customer-Public-Token": "abcd"
    

    Body which is received from e.g. Airflow integration

    {
      "bulk": [
        {
          "member_id": 1,
          "community_id": 1088,
          "created_at": "2021-09-07T13:48:34.740Z",
          "eventbrite_event_id": 1,
          "event_type": "in"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    Params

    Field Type Required Description
    event_date String datetime true Event creation time
    gwp_dmp_id String true UUID from external system (in first scenario from App Admin)
    member_id Integer true

    POST /api/1.0/vending_machine/events

    An endpoint to create a single vending machine event. It gathers all user behaviour data from vending machines.

    Example Requests

    POST /api/1.0/vending_machine/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
        "member_id": 12,
        "community_id": 2,
        "mall_id": 31,
        "machine_id": 12,
        "service_id": 1,
        "service_type_id": 1,
        "external_event_id": "12",
        "external_event_name": "Black Friday",
        "additional_properties": {
          "test": 124
        },
        "child_id": "Mary",
        "created_at": "2018-12-19T10:01:28.839Z"
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

    {
        "error": "machine_id is missing, machine_id is empty, event_type does not have a valid value",
        "success": false
    }
    

    Params

    Field Type Required Description
    member_id Integer true Member identifier
    community_id Integer true Integer from MP platform
    mall_id Integer true Mall identifier
    machine_id Integer false Machine identifier
    service_id Integer true Service identifier
    service_type_id Integer true Service type identifier
    created_at String datetime true Event creation time
    child_id String false Child identifier
    event_type String false 'check-in' or 'check-out'
    external_event_id String false TBA
    external_event_name String false
    additional_properties Hash false

    POST /api/1.0/webform/events

    An endpoint to create a bulk of webform events. It gather all user behaviour data from webforms.

    Example Requests

    POST /api/1.0/webform/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "event_type": "click",
          "created_at": "2018-12-19T10:01:28.839Z",
          "community_id": 1024,
          "member_id": 735,
          "page": "main",
          "user_agent": "Chrome/51.0.2704.103 Safari/537.36",
          "source": "default",
          "sending_id": "em:123:3145",
          "utm_content": "white-key-17"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    400

        {
            "error": "bulk[0][event_type] is missing, bulk[0][event_type] is empty",
            "success": false
        }
    

    Params

    Field Type Required Description
    bulk Array[Object] true List of webform events params

    Bulk

    Field Type Required Description
    event_type String true Coupon id
    created_at String datetime true Event creation time
    community_id Integer true Integer from MP platform
    page String true Name of page on request was made
    user_agent String true Member's browser user agent
    source String true e.g. webform name
    member_id Integer false Member identifier
    subsource String false
    webform_properties Hash false
    utm_source String false to identify a search engine, newsletter name, or other source. Example: google
    utm_medium String false to identify a medium, such as email or cost-per-click. Example: cpc
    utm_campaign String false Used for keyword analysis. Use utm_campaign to identify a specific product promotion or strategic campaign
    utm_content String false Used for A/B testing and content-targeted ads. Use content to differentiate ads or links that point to the same URL.
    referrer String false which resource requested this webform event
    sending_id String false specific identifier for loyalty clubs sendings

    POST /api/1.0/wifi/events/generic

    An endpoint to register wifi events.

    Example Requests

    POST BASE_URL/api/1.0/wifi/events/generic
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body (for Skylabs provider)

    {
      "timestamp": "1387909800", // 25 December 2013
      "member_id": 123,
      "event": "LOGIN",
      "community_id": 1000150,
      "additional_properties": {"area" : "bookstores"}
    }
    

    Example Response

    200

    {
      "success": "12652a60129abef196223b97"
    }
    

    Request body parameters

    Property Type Required Description
    timestamp UNIX timestamp True Time when event occured
    member_id Integer depends* Explained below
    email String depends* Explained below
    msisdn String depends* Explained below
    event String True Possible event names: LOGIN, LOGOUT, LOGIN_RETURNING
    community_id Integer True Loyalty club id
    additional_properties Hash false Any additional data specific for area of login, or service data

    Attention!*

    POST /api/1.0/wifi/events

    An endpoint to register wifi events. Can be many providers for wifi events, matching is based on params send

    Example Requests

    POST /api/1.0/wifi/events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfa1d"
    "Content-Type": "application/json"
    

    Body (for Skylabs provider)

    {
      "timestamp": "1387909800", // 25 December 2013
      "username": "4742876362",
      "mac": "AA:BB:CC:DD:EE:FF",
      "hotspotid": 35,
      "customerid": 106,
      "event": "LOGIN"
    }
    

    Example Response

    200

      {
        "success": "12652a60129abef196223b97"
      }
    

    Request body parameters (for Skylabs provider)

    Property Type Required Description
    timestamp UNIX timestamp True Time when event occured
    username Integer True Msisdn which is in member base for customer (explained below)
    mac String True Mac address of device
    hotspot Integer True Hotspot from which event went
    customerid Integer True Customer id from Skylabs customers database
    event String True Possible event names: LOGIN, LOGOUT, LOGIN_RETURNING

    For Infinity Mall on staging customerid is 106 For Infinity Mall 2.0 on staging customerid is 99999

    Attention!

    We are not saving events if we do not find it in specific community .e.g If you sent event with username (msisdn) which is in Infinity Mall it will be saved in Elasticsearch

    POST /api/2.0/trigger/message_events

    Endpoint for saving every message sent via triggerer

    Example Requests

    POST /api/2.0/trigger/message_events
    

    Headers

    "X-Customer-Public-Token": "665d7fc248bdc38f5b94f99999fdfaeg"
    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "member_id": 2,
          "rule_id": 3,
          "message_id": 10,
          "message_title": "some sample message title",
          "message_type": "email",
          "campaign_id": 23,
          "campaign_title": "big revenue campaign",
          "event_date": "2018-01-18T13:27:08+0000"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    Params

    Field Type Required Description
    member_id Integer true
    rule_id Integer true
    message_id Integer true
    message_title String true
    message_type String true
    campaign_id Integer true
    campaign_title String true
    event_date String datetime true

    POST /api/2.0/trigger/rule_firing_events

    Endpoint for saving every rule was triggered

    Example Requests

    POST /api/2.0/trigger/rule_firing_events
    

    Headers

    "Content-Type": "application/json"
    

    Body

    {
      "bulk": [
        {
          "member_id": 2,
          "community_id": 1088,
          "event_id": 13,
          "event_date": "2018-01-18T13:27:08+0000",
          "event_source": "webform",
          "triggered_at": "2018-01-18T13:27:01+0000",
          "rule_id": 5,
          "event_type": "test",
          "hook_type": "url"
        }
      ]
    }
    

    Example Response

    200

    {
      "success": "2c12edc69c4f15bb7e6e7e04"
    }
    

    Params

    Field Type Required Description
    member_id Integer true
    community_id Integer true
    event_id Integer true
    event_date String datetime true
    event_source String false
    triggered_at String datetime true
    rule_id Integer true
    event_type String true
    hook_type String true
    hook_delayed_by_seconds Integer false
    options Hash false

    Dmp API

    Fetch transaction items by multiple params

    Example request

    GET /api/2.0/pos/storeitems?member_id=45792078&transaction_id=0cfb192d-7e93-4c6a-9065-b1e227a5324d
    

    Example responses

    200

    {
        "items": [
            {
                "transaction_id": "0cfb192d-7e93-4c6a-9065-b1e227a5324d",
                "member_id": 45792078,
                "store_id": "storeId",
                "receipt_id": "IDIK RECEPTY",
                "item_id": "1",
                "item_number": null,
                "description": null,
                "event_date": "2019-02-02T02:02:02+0000",
                "currency": "NOK",
                "price_gross": 3,
                "value_gross": 3,
                "tax": 11,
                "value_tax": 11,
                "tax_rate": -137.5,
                "amount": 1,
                "properties": null,
                "discount_price_gross": 0,
                "category_id": null,
                "discount_price_net": 5.802197802197802,
                "discount_value_gross": 0,
                "discount_value_net": 5.802197802197802,
                "price_gross_before_discount": 3,
                "price_net_before_discount": -2.197802197802198,
                "value_gross_before_discount": 3,
                "value_net_before_discount": -2.197802197802198,
                "type": null,
                "original_transaction_id": null,
                "original_transaction_item_id": null,
                "original_id": null,
                "community_id": 1088
            }
        ],
        "size": 100,
        "from": 0
    }
    
    

    400

    {
        "error": "store_id is invalid",
        "success": false
    }
    

    HTTP Request

    Headers for all requets:

    "X-Customer-Public-Token": "testesef" "Content-Type": "application/json"

    GET /api/2.0/pos/storeitems(.json)

    Parameters

    Parameter Required Type Description
    type false Array[String]
    original_transaction_id false Array[String]
    original_transaction_item_id false Array[String]
    original_id false String
    transaction_id depends* Array[String]
    store_id depends* String
    receipt_id depends* String
    member_id depends* Integer
    item_id depends* Integer
    ignore_loyalty depends* Boolean
    category_id depends* String

    Fetch transactions by multiple params

    Example request

    GET /api/2.0/pos/transactions?transaction_id=51a1418b-55d6-477f-930c-163b5cb452f8
    

    Example responses

    200

    {
        "items": [
            {
                "transaction_id": "51a1418b-55d6-477f-930c-163b5cb452f8",
                "member_id": 45792078,
                "store_id": "storeId",
                "receipt_id": "c3190f8f-e6b5-4269-b21d-a35f9be7e849",
                "event_date": "2019-02-02T02:02:02+0000",
                "sales_person": null,
                "store_tax_id": null,
                "terminal_id": null,
                "store_msisdn": null,
                "currency": "NOK",
                "total_gross": 120,
                "tax": 0,
                "giftcard_used": false,
                "contains_discount_for_whole_transaction": null,
                "discount_for_transaction": null,
                "discount_for_items": null,
                "discount_total": null,
                "type": "purchase",
                "original_item_id": null,
                "item_id": null,
                "original_transaction_id": null,
                "coupons": null,
                "giftcards": null,
                "points": null,
                "ignore_loyalty": null,
                "loyalty_total_gross": null,
                "discount_percent": null,
                "total_gross_before_discount": null,
                "id": "12312",
                "community_id": 1088
            }
        ],
        "size": 100,
        "from": 0
    }
    
    

    400

    {
        "error": "store_id is invalid",
        "success": false
    }
    

    HTTP Request

    Headers for all requets:

    "X-Customer-Public-Token": "testesef" "Content-Type": "application/json"

    GET /api/2.0/pos/transactions(.json)

    Parameters

    Parameter Required Type Description
    transaction_id depends* String Transacion identifier as uuid
    store_id depends* Array[String] Identifier for store
    receipt_id depends* String Identifier for bill
    member_id depends* Integer Identifier of member which made transaction
    sales_person depends* String Information about which sales person created transaction in most situations it's name
    currency depends* String Name of currency
    original_transaction_id false Array[String]
    original_item_id false String
    item_id false String
    type false Array[String]
    item_id false String
    ignore_loyalty false Boolean
    min_total_gross false String
    max_total_gross false String

    Fetch voucher usages by multiple params

    Example request

    GET /api/2.0/voucher/usage?community_id=905&member_id=45792078
    

    Headers for all requets:

    {
      "X-Customer-Public-Token": "testesef",
      "Content-Type": "application/json"
    }
    

    Example responses

    200

    {
      "usages": [
        {
          "event_date": "2019-02-02T02:02:02+0000",
          "event_type": "use_evoucher",
          "voucher_dmp_id": "0cfb192d-7e93-4c6a-9065-b1e227a5324d",
          "community_id": 905,
          "member_id": 45792078,
          "store_id": 743,
          "voucher_id": 222,
          "voucher_name": "Bench free painting",
          "serial_number": "2131-3123-4343"
        }
      ],
      "size": 100,
      "from": 0
    }
    
    

    400

    {
      "error": "voucher_dmp_id is invalid",
      "success": false
    }
    

    HTTP Request

    GET /api/2.0/voucher/usage(.json)

    Parameters

    Parameter Required Type Description
    community_id true Integer
    voucher_dmp_id depends* String
    member_id depends* Integer
    store_id depends* String
    voucher_id depends* String
    serial_number depends* String

    Fetch gift with purchase redeems events

    Example request

    GET /api/2.0/gwp/redeems?member_id=45792078&community_id=905
    

    Headers for all requets:

    {
      "X-Customer-Public-Token": "testesef",
      "Content-Type": "application/json"
    }
    

    Example responses

    200

    {
      "redeems": [
        {
          "event_date": "2019-02-02T02:02:02+0000",
          "gwp_dmp_id": "123213-3123123-32423",
          "community_id": 905,
          "member_id": 45792078,
          "campaign_id": 555,
          "campaign_name": "Parks & Recreations",
          "item_id": 222,
          "item_name": "Bench free painting",
          "serial_number": "2131-3123-4343",
          "detail_id": 124,
          "quantity": 2
        }
      ],
      "size": 100,
      "from": 0
    }
    
    

    400

    {
        "error": "gwp_dmp_id is invalid",
        "success": false
    }
    

    HTTP Request

    GET /api/2.0/gwp/redeems(.json)

    Parameters

    Parameter Required Type Description
    community_id true Integer
    gwp_dmp_id depends* String
    member_id depends* Integer
    campaign_id depends* Integer
    item_id depends* Integer
    serial_number depends* String

    Fetch point events by multiple params

    Example request

    GET /api/2.0/point/events?member_id=600346&bucket=default
    

    Example responses

    200

    {
        "events": [
            {
            "event_date": "2020-08-07T06:57:33+0000",
            "event_type": "issue_points",
            "member_id": 600346,
            "community_id": 7,
            "bucket": "default",
            "bucket_balance_after": 2960,
            "event_points": 10,
            "event_description": "purchase_scan"
          }
        ],
        "size": 100,
        "from": 0
    }
    
    

    400

    {
        "error": "event_type is invalid",
        "success": false
    }
    

    HTTP Request

    Headers for all requets:

    "X-Customer-Public-Token": "testesef" "Content-Type": "application/json"

    GET /api/2.0/point/events(.json)

    Parameters

    Parameter Type Required Description
    event_type Sting true Possible values: issue_points, revoke_points, use_points, expire_points
    community_id Integer true Integer from MP platform
    member_id Integer false Member identifier
    bucket String false Wallet, stamps, points, any value is needed to group points (by default)
    event_points Integer false How many points added or removed due to the action (e.g. -10 or 10).
    receipt_id String false
    store_id String false
    external_event_id String false
    event_description String false
    event_message String false

    Shortener API

    Create Shorts

    create shorts

    date in utc max bulk size 1k elements

    Example request

    {
      "bulk": [
        {
          "target_url": "http://google.pl?msisdn=12345678",
          "url_schema": "http://google.pl?msisdn=#{msisdn}",
          "fallback_url": "http://google.pl",
          "expiry_date": "2019-02-27 00:00:00",
          "params": {
            "msisdn": "12345678"
          }
        },
        {
          "target_url": "http://onet.pl?msisdn=12345678&first_name=Tata",
          "url_schema": "http://onet.pl?msisdn=#{msisdn}&first_name=#{first_name}",
          "fallback_url": "http://google.pl",
          "number_of_clicks": 7,
          "params": {
            "msisdn": "12345678"
          }
        },
        {
          "target_url": "http://google.pl",
          "url_schema": "http://google.pl",
          "fallback_url": "http://google.pl",
          "expiry_date": "2019-03-03 00:00:00",
          "adform_active": true,
          "params": {
            "member_id": 777
          }
        },
        {
          "target_url": "http://google.pl/test",
          "url_schema": "http://google.pl",
          "fallback_url": "http://google.pl",
          "expiry_date": "2019-03-03 00:00:00",
          "namespace": "app",
          "adform_active": true,
          "params": {
            "member_id": 777
          }
        },
        {
          "target_url": "http://testing_page.pl/test",
          "url_schema": "http://testing_page.pl",
          "fallback_url": "http://google.pl",
          "expiry_date": "2019-03-03 00:00:00",
          "is_https": true,
          "adform_active": true,
          "params": {
            "member_id": 12
          }
        }
      ]
    }
    

    Example responses

    200

    {
        "items": [
            [
                "http://google.pl?msisdn=12345678",
                "http://example.com/aaaaaa"
            ],
            [
                "http://onet.pl?msisdn=12345678&first_name=Tata",
                "http://example.com/bbbbbb"
            ],
            [
                "http://google.pl",
                "http://example.com/cccccc"
            ],
            [
                "http://google.pl/test",
                "http://example.com/app/dddddd"
            ],
            [
                "http://testing_page.pl/test",
                "https://example.com/eeeeee"
            ]
        ]
    }
    
    

    422

    {
        "bulk": {
            "0": {
                "params": {
                    "msisdn": [
                        "must be a string"
                    ]
                }
            }
        }
    }
    

    HTTP Request

    Headers for all requets:

    "X-Customer-Public-Token": "aaaaaaaa" "Content-Type": "application/json"

    POST http://example.com/shortener

    Parameters

    Parameter Required Type Description
    target_url true string Link where should we be redirected
    url_schema true string Url without personal data
    fallback_url true string Url where user will be redirected when short will expire
    expiry_date depends Date When link will expire
    number_of_clicks depends integer After how many clicks link will expire
    adform_active true boolean Cookie drop if member has specific consent set to true
    params true string Possible keys: member_id, msisdn, sending_id etc.
    namespace false string You can namespace shorts insetead of shortener.url/token you can have shortener.url/namespace/token as a shortened link
    is_https false boolean By default value set to false. It will add https to the url after token generation.