Delete multiple Profile List Recipients
post
/rest/api/v1.3/lists/{listName}/members
Request
Path Parameters
-
listName: string
List Name
Query Parameters
-
action: string
**action** should have the value **delete**(action=delete).
Request Body
Root Schema : Delete List Recipients
Type:
object
Title:
Show Source
Delete List Recipients
-
ids:
array ids
Array of values corresponding to the queryAttribute.
-
queryAttribute:
string
Query attribute can be either r (RIID_), e( EMAIL_ADDRESS_), m (MOBILE_NUMBER_), or c (CUSTOMER_ID_). The corresponding value passed must match what is in the parent Profile List.
Nested Schema : ids
Type:
array
Array of values corresponding to the queryAttribute.
Show Source
-
Array of:
array items
Field values for the recipient in the Profile List, used to locate records to delete.
Nested Schema : items
Type:
array
Field values for the recipient in the Profile List, used to locate records to delete.
Show Source
Response
Supported Media Types
- application/json
Default Response
Root Schema : Profile List Recipients
Type:
object
Title:
Show Source
Profile List Recipients
-
mergeRule:
object mergeRule
Merge rule used to merge recipient records in a Profile List. Only used during the merge operation.
-
recordData:
object recordData
Record data that represents Field Names and corresponding values for the recipient.
Nested Schema : mergeRule
Type:
object
Merge rule used to merge recipient records in a Profile List. Only used during the merge operation.
Show Source
-
defaultPermissionStatus(optional):
string
Allowed Values:
[ "OPTIN", "OPTOUT" ]
This value must be specified as either OPTIN or OPTOUT and would be applied to all of the records contained in the API call. If this value is not explicitly specified, then it is set to OPTOUT. -
htmlValue(optional):
string
Value of incoming preferred email format data. For example, 'H' may represent a preference for HTML formatted email.
-
insertOnNoMatch(optional):
boolean
Indicates what should be done for records where a match is not found (true = insert / false = no insert).
-
matchColumnName1(optional):
string
Allowed Values:
[ "RIID_", "CUSTOMER_ID_", "EMAIL_ADDRESS_", "MOBILE_NUMBER_", "EMAIL_MD5_HASH_", "EMAIL_SHA256_HASH_" ]
First match column for determining whether an insert or update should occur. -
matchColumnName2(optional):
string
Allowed Values:
[ "RIID_", "CUSTOMER_ID_", "EMAIL_ADDRESS_", "MOBILE_NUMBER_", "EMAIL_MD5_HASH_", "EMAIL_SHA256_HASH_" ]
Second match column for determining whether an insert or update should occur. (optional). -
matchOperator(optional):
string
Allowed Values:
[ "NONE", "AND" ]
Operator to join match column names -
optinValue(optional):
string
Value of incoming opt-in status data that represents an opt-in status. For example, 'I' may represent an opt-in status.
-
optoutValue(optional):
string
Value of incoming opt-out status data that represents an optout status. For example, '0' may represent an opt-out status.
-
rejectRecordIfChannelEmpty(optional):
string
String containing comma-separated channel codes that if specified will result in record rejection when the channel address field is null. Channel codes are 'E' (Email), 'M' (Mobile), 'P' (Postal Code). For example 'E,M' would indicate that a record that has a null for Email or Mobile Number value should be rejected. This parameter can also be set to null or to an empty string, which will cause the validation to not be performed for any channel, except if the matchColumnName1 parameter is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_. When matchColumnName1 is set to EMAIL_ADDRESS_ or MOBILE_NUMBER_, then the null or empty string setting is effectively ignored for that channel.
-
textValue(optional):
string
Value of incoming preferred email format data. For example, 'T' may represent a preference for Text formatted email.
-
updateOnMatch(optional):
string
Allowed Values:
[ "REPLACE_ALL", "NO_UPDATE" ]
Controls how the existing record should be updated.
Nested Schema : recordData
Type:
object
Record data that represents Field Names and corresponding values for the recipient.
Show Source
-
fieldNames:
array fieldNames
Field Names in the Profile List
-
mapTemplateName(optional):
string
The Map Template in CX Audience 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.
Nested Schema : records
Type:
array
Array of values corresponding to the fieldNames. Each element in the array represents a single recipient.
Show Source
-
Array of:
array items
Field Values for the recipient in the Profile List
Examples
Your client application can delete multiple profile list records in a single batch request by using the query attribute action=delete
and by passing a list of IDs.
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Content-Type | application/json |
REQUEST NOTES
- For this request to work, your endpoint must include the query attribute
action=delete
. - Note that the request method for this API is
POST
, because you pass the query attribute and the IDs to delete in the request body. - You can send up to 200 IDs in the request body, and each ID must be 500 characters or fewer.
- Values passed in the
ids
array must correspond to the query attribute. For example, if you specifyc
for yourqueryAttribute
, the system expects theids
array to contain the customer ID values for the records you want to delete.
Sample Request
When Responsys receives the following sample endpoint and request, the system will attempt to delete two records from the profile list MyExampleProfileList
for people whose email addresses are recipient1@example.com
and recipient2@example.com
.
Sample request endpoint: POST /rest/api/v1.3/lists/MyExampleProfileList/members?action=delete Sample request body: { "queryAttribute" : "e", "ids" : ["recipient1@example.com", "recipient2@example.com"] }
RESPONSE NOTES
- When the system successfully deletes records for a given ID (up to 10 records), then the ID is returned in the response.
- In a successful delete, the system deletes matching records for a given ID, including seed/proof records, up to the maximum of 10 records. If the system finds more than 10 records matching an ID, then the system will delete only the 10 most recent records. To ensure that all records associated with a given ID are deleted, re-run the request until all of the requested IDs return a DELETEFAILED: No records found message in the response.
- Other attributes in the response like
mapTemplateName
andmergeRule
will have default values of null/false.
Sample Response: Success
The following response shows that the delete succeeded for recipient1@example.com
. However, the delete failed for recipient2@example.com
because the list did not contain any records with that email address.
HTTPS response status code: 200 OK { "recordData": {"fieldNames": ["EMAIL_ADDRESS_"], "records": [ ["recipient1@example.com "], ["DELETEFAILED: No Records found for EMAIL_ADDRESS_ = recipient2@example.com"] ], "mapTemplateName": null }, "mergeRule": {"textValue": null, "htmlValue": null, "optinValue": null, "insertOnNoMatch": false, "updateOnMatch": null, "matchColumnName1": null, "matchColumnName2": null, "matchOperator": null, "optoutValue": null, "rejectRecordIfChannelEmpty": null, "defaultPermissionStatus": null, "matchColumnName3": null }, "links": [ { "rel": "self", "href": "/rest/api/v1.3/lists/MyExampleProfileList/members?action=delete", "method": "POST" }, { "rel": "retrieveMultipleListRecipients", "href": "/rest/api/v1.3/lists/MyExampleProfileList/members", "method": "POST" }, { "rel": "mergeListRecipients", "href": "/rest/api/v1.3/lists/MyExampleProfileList/members", "method": "POST" } ] }
Troubleshooting error responses
Individual list member errors when the HTTPS response is 200 OK: When the system has successfully received a request to delete multiple list members, it will return a successful HTTPS status code of
200 OK
. However, the batch delete might have mixed results. The response payload contains an array of messages about the success or failure for each individual member. Some examples of DELETEFAILED messages:
- When the system could not find any records corresponding to the ID, it returns an error message of DELETEFAILED: No Records found.
- When an invalid value is sent for the ID, the system returns a DELETEFAILED error for that ID. For example, if test is sent as one of the values in the ids array when the
queryAttribute
isr
, then the system returns the following message for that ID: DELETEFAILED: ERROR: The value test is not valid for an integer field\n\n.
Record limit exceeded: The 200-record limit is exceeded (that is, more than 200 query ID values are sent). A
400 bad request error is returned with the following error response body.
{ "type": "", "title": "Record limit exceeded", "errorCode": "RECORD_LIMIT_EXCEEDED", "detail": "Record limit exceeded, maximum of 200 records are allowed per each api call", "errorDetails": [] }
Invalid parameter: The
queryAttribute
value is not valid. A
400 bad request error is returned with the following error response body:
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Query Attribute Must be either r, e, c or m", "errorDetails": [] }
API limit exceed: When the client application exceeds the throttling limit for this API, a
401 Unauthorized error is returned with the following error response body:
{ "type": "", "title": "", "errorCode": "API_LIMIT_EXCEEDED", "detail": "", "errorDetails": [] }
List not found: The system could not find the Profile List specified in the request endpoint. A
404 not found error is returned with the following error response body:
{ "type": "", "title": "List not found", "errorCode": "LIST_NOT_FOUND", "detail": " MyOtherExampleProfileList List Not Found", "errorDetails": [] }