Delete Profile List Recipients using query attribute
/rest/api/v1.3/lists/{listName}/members
Up to 10 profile list recipients can be deleted in a single request.
Request
-
listName: string
List Name
-
id: string
ID corresponding to the query attribute
-
qa: string
Query Attribute. Can be either 'r' (RIID_), 'e' (EMAIL_ADDRESS_), 'c' (CUSTOMER_ID_), or 'm' (MOBILE_NUMBER_).
Response
- application/json
Default Response
object
Delete List Recipients Using Query Attributes
-
hasMoreRecords:
boolean
True if the remainingRecordCount is not 0 or False if the remainingRecordCount is 0
-
links:
object links
link URLs that represents next link table APIs
-
recordData:
object recordData
Record data that represents Field Names and corresponding values for the recipient.
-
remainingRecordCount:
integer
Remaining Records count after the deletion. Maximum of 10 records are deleted for the matched query attribute value passed
-
totalMatchedRecords:
integer
Total Count of Records that matches the query attribute value passed
object
-
href(optional):
string
URI of link table API
-
method(optional):
string
request method type
-
rel(optional):
string
link table API name
object
-
fieldNames:
array fieldNames
Field Names in the Profile List
-
mapTemplateName(optional):
string
The Map Template in Responsys that can be used to map Field Names of the Profile List to Column Names.
-
records:
array records
Array of values corresponding to the fieldNames. Each element in the array represents a single recipient.
array
-
Array of:
array items
Field Values for the recipient in the Profile List
Examples
This API is used to delete multiple profile list recipients using query attributes. Up to 10 records can be deleted in a single request.
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
FIELDS | DESCRIPTION |
---|---|
id | ID corresponding to the query attribute |
qa | Can be either r (RIID), e (EMAIL_ADDRESS), c (CUSTOMER_ID), m (MOBILE_NUMBER), e_md5 (EMAIL_MD5_HASH_consisting of 32 characters), or e_sha256 (EMAIL_SHA256_HASH_ consisting of 64 characters). If an e_md5 and e_sha256 are both provided in the same request, the e_sha256 is ignored. |
Sample Request URL:
Delete all profile list recipients in the DemoNewsLetterList with the email address example@oracle.com:
/rest/api/v1.3/lists/DemoNewsLetterList/members?qa=e&id=example@oracle.com
Sample Response:Success
{ "recordData": { "fieldNames": [ "EMAIL_ADDRESS" ], "records": [ [ "example@oracle.com" ] ], "mapTemplateName": null }, "totalMatchedRecords": 1, "remainingRecordCount": 0, "hasMoreRecords": false, "links": [ { "rel": "self", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members?qa=e&id=example@oracle.com", "method": "DELETE" }, { "rel": "mergeListRecipients", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members", "method": "POST" }, { "rel": "retrieveListRecipients", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members", "method": "GET" } ] }
Sample Response:Success
This API deletes up to 10 matching records per request. If more than 10 records are found, the hasMoreRecords
property will be true
, indicating more matching records exist in the list. The remainingRecordCount
property will indicate how many more records exist. The response will resemble:
{ "recordData": { "fieldNames": [ "EMAIL_ADDRESS_" ], "records": [ [ "example@oracle.com" ] ], "mapTemplateName": null }, "totalMatchedRecords": 115, "remainingRecordCount": 105, "hasMoreRecords": true, "links": [ { "rel": "self", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members?qa=e&id=example@oracle.com", "method": "DELETE" }, { "rel": "mergeListRecipients", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members", "method": "POST" }, { "rel": "retrieveListRecipients", "href": "/rest/api/v1.3/lists/DemoNewsLetterList/members", "method": "GET" } ] }
Example Response Failures
404 Not Found Errors
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 a id
is not 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": [] }