Retrieve profile list recipient count using query attribute

This endpoint retrieves a count of profile list recipients in a profile list. You can use query attributes to filter the results by specifying a query attribute type and values. If no query attributes are specified, the total count of profile list recipients is returned.

The count property in the response determines the amount of matching profile list recipients.

Service URL:

/rest/api/v1.3/lists/{listName}/members/count

Required Path Parameters:

listName - Name of the profile list to retrieve fields.

Query Parameters:

id - ID corresponding to the query attribute

qa - Query Attribute. Can be either 'r' (RIID_), 'e' (EMAIL_ADDRESS_), 'c' (CUSTOMER_ID_), or 'm' (MOBILE_NUMBER_), 'e_md5' (EMAIL_MD5_HASH_), 'e_sha256' (EMAIL_SHA256_HASH_).

Request Method:

GET

Request Header:

Authorization=<AUTH_TOKEN>

Request Body:

None

Sample Request URL:

Retrieve all profile list recipients within the DemoNewsLetterList profile list with the email address example@oracle.com.

/rest/api/v1.3/lists/DemoNewsLetterList/members/count?qa=e&id=example@oracle.com

Sample Response in case of success:

The count indicates there are 3 profile list recipients in this list with the email address example@oracle.com.

{
  "count": 3,
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members/count?qa=e&id=example@oracle.com.com",
      "method": "GET"
    },
    {
      "rel": "mergeListRecipients",
      "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members",
      "method": "POST"
    },
    {
      "rel": "retrieveListRecipients",
      "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members?&qa=e&id=example@oracle.com.com",
      "method": "GET"
    }
  ]
}

Sample Request URL:

Retrieve a count of all profile list recipients within the DemoNewsLetterList profile list.

/rest/api/v1.3/lists/DemoNewsLetterList/members/count

Sample Response in case of success:

The count indicates there are 100 profle list recipients in the profile list DemoNewsLetterList.

{
  "count": 100,
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members/count",
      "method": "GET"
    },
    {
      "rel": "mergeListRecipients",
      "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members",
      "method": "POST"
    }
  ]
}

Sample Response in case of failure:

404 Not Found Errors

No records found in the given list: Requests fail when no query attribute is specified and the count of profile list recipients in the list is 0. The error resembles:

{
  "type": "",
  "title": "Record not found",
  "errorCode": "RECORD_NOT_FOUND",
  "detail": "No records found in the given List",
  "errorDetails": []
}

No records found for the given id: Requests fail when no records are found in the list for the id specified. The error resembles:

{
  "type": "",
  "title": "Record not found",
  "errorCode": "RECORD_NOT_FOUND",
  "detail": "No records found in the list for given id",
  "errorDetails": []
}

List not found: Requests fail if the specified profile list is not found. The error resembles:

{
  "type": "",
  "title": "List not found",
  "errorCode": "LIST_NOT_FOUND",
  "detail": "Profile_List_1 List Not Found",
  "errorDetails": []
}

400 Bad Request Errors

Invalid value for the specified id data type: Requests fail when an invalid id value is provided. For example, if a string value is provided for riid, when the value should be an integer. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "The value example@oracle.com is not valid for an integer field",
  "errorDetails": []
}

Invalid e_SHA256 is specified: Requests fail when the query attribute specified is e_sha256, and an invalid email SHA256 hash id is provided. Email SHA256 hashes are 64 characters. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "The value [ 12345 ] is not a valid SHA256 Hash value.",
  "errorDetails": []
}

Invalid e_md5 is specified: Requests fail when the query attribute specified is e_md5, and an invalid email md5 hash id is provided. Email md5 hashes are 32 characters. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "The value [ 12345678 ] is not a valid MD5 Hash value.",
  "errorDetails": []
}

Invalid query attribute: Requests fail if an invalid query attribute is specified. Query Attribute must be either r, e, c, m, e_md5 or e_sha256. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Query Attribute Must be either r, e, c, m, e_md5, or e_sha256.",
  "errorDetails": []
}

Too many query attributes specified: Requests fail if more than one query attribute is specified. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "This query supports only one id",
  "errorDetails": []
}

A query attribute was not specified: Requests fail if no query attribute is specified. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Query Attribute is null OR empty",
  "errorDetails": []
}

No identifier specified: Requests fail if no id is specified. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "IdToRetrieve is null OR empty",
  "errorDetails": []
}

Invalid profile list name length: Requests fail if the length of the profile list name exceeds 100 characters. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Max Length of listName allowed: 100",
  "errorDetails": []
}

Profile list name contains invalid characters: Requests fail if the profile list name contains invalid characters. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Invalid characters in the List Name",
  "errorDetails": []
}