Segmentation API

Note: Every call made to the API’s must be made via the signed URL process. Any request without a valid signature will be rejected.

Add Consumer to Segment

This method is used to add a consumer to a segment within the Koupon Media system. The segment name is included within the path of the URL and the actual consumer that is to be included in the segment are included within the consumerId. The consumerId is the Koupon Media consumerId that is in the Create Consumer API response.

It is highly recommended that you are registering consumers within a segment under their “primary” identifier, as other identifiers are not guaranteed to be unique.

Posthttp://consumer.kouponmedia.com/v1/consumerId/segments/segmentName

Example Response


{
  "code": 200,
  "message": "success",
  "version": "2",
}
    

Get Active Consumer Segments.

To retrieve all recorded segments that a consumer is currently included in.

Gethttp://consumer.kouponmedia.com/v1/consumerId/segments

Example Response

 
{
  "version": "1",
  "segments": [
{
"name": String
}...
]
}

Get All Active Account Segments

NOTE: This API occurs on the management.kouponmedia.com subdomain.

This method allows for the retrieval of all segments that are created on the account. 

Gethttp://management.kouponmedia.com/v1/segments

Example Response

{
  "version": "1",
  "segments": [
{
"name": String
}...
]
}

Deleting consumers within a segment

To delete a consumer from a segment you will use this method. This method must only be used for deleting consumers within a segment, and the addition of consumers must occur through the POST resource

DELETEhttp://consumer.kouponmedia.com/v1/consumerId/segments/segmentName

Example Response


{
  "code": 200,
  "message": "success",
  "version": "2",
}