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 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.
1. Authentication
Authentication is not required.
2. Request
GET: https://cdp.{{CLIENT_INSTANCE_NAME}}.meiro.io/wbs?attribute=&value={&segment,parameter_1,parameter_2,...}
2.1 Parameters
Parameter |
Data type |
Description |
||||||
attribute (required) |
text |
ID of the attribute used for profile stitching, example:
|
||||||
value (required) |
text |
Value of defined profile 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 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 maximum length of 128 characters for the input parameter value. |
2.23 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
2.33.1 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 profile stitching attribute in the Meiro database.
|
50x
(Internal server error)
Internal server error. Contact administrator. |
3.4. Custom Queries
3.4.1 Valid request example
GET: https://cdp.CLIENT_INSTANCE_NAME.meiro.io/wbs?attribute=ps_meiro_user_id&value=29f3aec1-1111-4294-b940-019698f4ac25&product_id=1234
3.4.2 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 profile 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 profile stitching attribute in the Meiro database and no custom queries were available to be executed.
|
50x (internal server error)
Internal server error. Contact administrator. |