ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Meiro Audience API

The API endpoint is developed to check if a customer entity belongs to a defined segment in Meiro Business Explorer. 

API returns 200 response along with predefined attributes when the customer entity belongs to a defined segment. Attributes of the customer entity are not returned by default. 

Customers' attributes to be returned by the successful API call must be defined in the configuration of the WBS container (for safety reasons). Any customer entity attribute might be returned.

Warning: contact Meiro team/ administrator to set needed attributes.

Authentication

 Authentication is not required.

Request

GET: https://cdp.{{CLIENT_INSTANCE_NAME}}.meiro.io/wbs?attribute=&value=&segment=

Parameters

Parameter

Data type

Description

attribute (required)

text

ID of the attribute used for Profile Stitching (PS),

example:

ps_meiro_user_id Meiro user ID
ps_email_address Email address
etc depends on client's use case

 

value (required)

text

Value of defined PS attribute,

example:

29f3aec1-1111-4294-b940-019698f4ac25 Meiro user ID tracked from client website where Meiro SDK is deployed
john@doe.com email address example

 

segment (required)

integer

The ID of the segment in CDP BE segment builder where the presence of the customer entity should be checked.

Valid request example

GET: https://cdp.CLIENT_INSTANCE_NAME.meiro.io/wbs?attribute=ps_meiro_user_id&value=29f3aec1-1111-4294-b940-019698f4ac25&segment=42

Response examples

200

Customer entity belongs to a defined segment:

json
{
  "status": "ok",
  "returned_attributes": {
    "customer_entity_id": "0000000071e3908f5aaaf022aa842b45",
    "modified": "2000-01-01 00:00:00",
    "attribute_first_name": ["John"],
    "attribute_last_name": ["Doe"],
    "attribute_total_order_value": null
  }
}

customer_entity_id (default)

Internal ID of customer entity.

modified (default) Timestamp of last update of customer entity's attributes.
Returned attributes

attribute_first_name,

attribute_last_name,

attribute_total_order_value must be defined specifically for the client's use case in the configuration of `WBS` container.

404 (Customer not in segment)

Customer entity defined in the API call is known in the CDP database but does not belong to the defined segment ID.

json
{
  "status": "error",
  "message": "customer not in segment"
}

404 (Customer not found)

There is no customer entity with a defined value of profile stitchin attribute attribute in the CDP database.

json
{
  "status": "error",
  "message": "customer not found"
}

50x (Internal server error)

 Internal server error. Contact administrator.