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
responses 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 the Meiro team/ administrator to set the attributes.
Custom Queries
Meiro Audience API also offers the capability to run custom SQL queries and return their results for both known and unknown customers.
The queries to be run by the successful API call must be defined in the configuration of the WBS container (for safety reasons).
Parameters to these queries are provided via optional URL query parameters - only queries for which all required parameters are provided are executed.
Warning: contact the Meiro team/ administrator to define the custom queries.
Segment IDs
Meiro Audience API allows checking whether a customer belongs to a segment against all available segments, with the possibility to filter the segments by tags.
The number of segments to check against is limited to 10 by default for performance reasons but it might be overridden in the configuration of the WBS container.
Tag names are provided to the segment IDs API endpoint via an optional URL query parameter.
Warning: contact the Meiro team/ administrator to change the number of segments to check against.
Authentication
Authentication is not required.
Request
GET:https://cdp.{{CLIENT_INSTANCE_NAME}}.meiro.io/wbs?attribute=&value={&segment,parameter_1,parameter_2,...}
Parameters
Parameter |
Data type |
Description |
||||||
attribute (required) |
text |
ID of the attribute used for identity stitching, example:
|
||||||
value (required) |
text |
Value of defined identity stitching attribute, example:
|
||||||
segment (optional) |
integer |
The ID of the segment in Meiro Business Explorer segment builder where the presence of the customer entity should be checked. If the segment parameter is missing, any defined custom queries are executed and their results are returned in the response. |
||||||
Custom queries’ parameters (optional) |
text |
Input parameters and their values to be used in the custom queries. Maximum 10 input parameters are allowed with a maximum length of 128 characters for the input parameter value. |
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:
|
404
(Customer not in the segment)
The customer entity defined in the API call is known in the Meiro database but does not belong to the defined segment ID.
|
404
(Customer not found)
There is no customer entity with a defined value of identity stitching attribute in the Meiro database.
|
50x
(Internal server error)
Internal server error. Contact administrator.
Valid request example - Custom Queries
GET: https://cdp.CLIENT_INSTANCE_NAME.meiro.io/wbs?attribute=ps_meiro_user_id&value=29f3aec1-1111-4294-b940-019698f4ac25&product_id=1234
Response examples
200
Customer entity was found and custom queries were executed:
|
200
Customer entity was found but no custom queries were available to be executed:
|
200
There is no customer entity with a defined value of identity stitching attribute in the Meiro database but custom queries were available to be executed:
|
404
(custom queries not defined)
There is no customer entity with a defined value of identity stitching attribute in the Meiro database and no custom queries were available to be executed.
|
50x
(internal server error)
Internal server error. Contact administrator.
Request - Customer Segment IDs
GET: https://cdp.{{CLIENT_INSTANCE_NAME}}.meiro.io/wbs/segments?attribute=&value={&tags,tags,...}
Parameters
Parameter |
Data type |
Description |
||||||
attribute (required) |
text |
ID of the attribute used for identity stitching, example:
|
||||||
value (required) |
text |
Value of defined identity stitching attribute, example:
|
||||||
tags (optional) |
text |
List of tags to be used for filtering segments to check the customer against. |
Valid request example - No tags provided
GET: https://cdp.CLIENT_INSTANCE_NAME.meiro.io/wbs/segments?attribute=ps_meiro_user_id&value=29f3aec1-1111-4294-b940-019698f4ac25
Response examples
200
Customer entity belongs to the segments with the following IDs:
|
404
(No segments found for the customer)
The customer entity defined in the API call is known in the Meiro database but does not belong to any available segments.
|
404
(Customer not found)
There is no customer entity with a defined value of identity stitching attribute in the Meiro database.
50x
(Internal server error)
Internal server error. Contact administrator.
Valid request example - Tags provided
GET: https://cdp.CLIENT_INSTANCE_NAME.meiro.io/wbs/segments?attribute=ps_meiro_user_id&value=29f3aec1-1111-4294-b940-019698f4ac25&tags=Drama&tags=Sport
Response examples
200
Customer entity belongs to the segments with tags “Drama” or “Sport” with the following IDs:
|
FAQ
What protection is in place to prevent scraping of the /wbs endpoint? |
There is endpoint rate limiting based on IP addresses. Custom restrictions may be added, but regular users access through devices and frontends, making it impossible to use tokens or credentials as they are considered public and always present in the frontend. Strict measures are in place to limit the use of identifiers in the API, allowing only anonymous cookies and identifiers, not email or phone numbers. The information returned in the response is also limited to non-personally identifiable information such as recommended products, last viewed products, and next best offers. All of the above help to minimize the potential impact of any scraping attempts. |
No Comments