GET reference-data/{dataset}/records

Overview

The Reference-Data API permits interaction with existing custom data tables associated with your company. You can use the API's GET /v2/reference-data/{dataset}/records call to return specified data loaded from other processes for targeting and personalization.

Resource URI

GEThttps://api.yesmail.com/v2/reference-data/{dataset}/records

Call Description

The GET /v2/reference-data/{dataset}/records call returns the reference data from the specified {dataset}.

Parameter

Parameter Required Description
limit  Optional The number of records to be returned with the request.  Valid values are integers 0-100.  The default is 25.
offset  Optional The number of rows to be bypassed by the request.  Valid values are 0-any positive integer.  The default is 0.
columnname  Optional Valid values are the display names of any column in the dataset.These are filters on the set of records in the result set.  For example, GET /reference-data/{dataset}/records?firstname=John&postalcode=12345 returns all records where the value of the firstName column is “John” and the value of the postalCode column is “12345”.
dataset

 Yes

The specific {dataset} from which data is to be returned.

 

HTTP Return Codes

Code

Description

200 OK

The request has succeeded.

400 Bad Request

The request could not be understood by the server due to malformed syntax.  For example, incorrect syntax of parameters, invalid parameter values, subscriber attribute does not exist, missing email address for new subscriber, or subscriber email address fails superficial validation.

401 Unauthorized

The request requires user authentication.  Invalid Api-User and/or Api-Key header value.

404 Not Found

The specified dataset does not exist.

 

Response Payload: 
{
    "offset": 1000,                   
    "limit": 100,                    
    "count": 8,                       
    "total": 1008,
    "dataset": “dataset_name”,
    "uniqueKey": [
        "primarycolumnname1", 
        "primarycolumnname2", 
        "primarycolumnname3"
     ],                    
     "records": [
        {
            "primarycolumnname1": "value1",
            "primarycolumnname2": "value2",
            "primarycolumnname3": "value3",
            "columnname4": "value4",
            "columnname5": "value5",
             …all additional column names for the dataset, and values for the specified record
        },
        {
            "primarycolumnname1": "value6",
            "primarycolumnname2": "value7",
            "primarycolumnname3": "value8",
            "columnname4": "value9",
            "columnname5": "value10",
            …all additional column names for the dataset, and values for the specified records
        },
        …additional records…
    ]
}