Skip to content
  • Get record count and sample of consumers

    Request

    This endpoint allows API users to retrieve a count and 10 record sample of the results to preview before purchasing a file version of the full dataset.

    Headers
    Acceptstringrequired

    Format of the response.

    Enum:"application/json""*/*"
    Example:application/json
    Content-Typestringrequired

    Format of the request.

    Value:"application/json"
    Bodyapplication/jsonrequired
    CustomerIDstringrequired

    The License Key issued by Melissa.

    Includesobjectrequired

    Any parameter you would like to include in the query.

    Requires at least one from:

    • Zips
    • Cities
    • Radius
    • ShapeWKTs
    Excludesobject

    Any parameter you would like to exclude in the query.

    ColumnsArray of stringsrequired

    All Consumer Columns you want returned.

    Items Enum:"MelissaAddressKey""BaseMelissaAddressKey""TitlePrefixInd""FirstName""MiddleNameInitial""LastName""FullName""NameSuffix""AddressLine""Suite"
    OrderByArray of objects

    Specify the desired column to order the responses by.

    POST
    /Consumer/getCount
    curl -i -X POST \
      https://dataretriever.melissadata.net/web/V1/Consumer/getCount \
      -H 'Accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
        "CustomerID": "{REPLACE-WITH-YOUR-LICENSE-KEY}",
        "Includes": {
          "Zips": [
            {
              "Zip": "92688",
              "CarrierRoute": "C057"
            }
          ]
        },
        "Excludes": {
          "AddressStreetName": [
            {
              "ZipCode": "92688",
              "Street": "Arado"
            }
          ]
        },
        "Columns": [
          "MelissaAddressKey",
          "AddressLine",
          "RBDI"
        ]
      }'

    Responses

    Successful response

    Bodyapplication/json
    JobIdstring

    The JobId to be used to purchase and access the full dataset.

    Countinteger

    Number of records returned by the query.

    ResultCodestring

    Success or Error codes based on the response/request.

    Messagestring

    Success or Error message associated with the result code.

    SampleArray of objects

    A 10 record sample response.

    Response
    { "JobId": "returned_job_id", "Count": 606, "ResultCode": "LS01", "Message": "Success - Results found", "Sample": [ {}, {} ] }