Delete multiple Profile Extension Recipients
post
                    /rest/api/v1.3/lists/{listName}/listExtensions/{petName}/members
Delete multiple Profile Extension Table (PET) recipient records
                Request
Path Parameters
                - 
                    listName: string
                    
                    List name
- 
                    petName: string
                    
                    Profile Extension Table (PET) name
Query Parameters
                - 
                        action: string
                        
                        **action** must have the value **delete**(action=delete).
Request body
                
                
                
                Root Schema : Delete List Recipients
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Delete List Recipients- 
            ids: 
            array  ids
            
            Array of values corresponding to the fieldNames.
- 
            queryAttribute: 
            string
            Query Attribute based on which records will be deleted. Can have the values r(RIID),e(email address),m(mobile number),c(customer id)
Nested Schema : ids
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayArray of values corresponding to the fieldNames.
    
    
    
    
    
        Show Source
        - 
            Array of: 
                array  items
            
            Field Values for the recipient in the Profile List
Response
Supported Media Types
                - application/json
Default Response
Root Schema : Profile Extension Recipients
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Profile Extension Recipients- 
            insertOnNoMatch: 
            boolean
            Specifies whether a recipient record should be inserted into the Profile Extension if it does not already exist. Only used during the merge operation.
- 
            matchColumn: 
            
            Allowed Values:[ "RIID", "CUSTOMER_ID", "EMAIL_ADDRESS", "MOBILE_NUMBER", "EMAIL_MD5_HASH", "EMAIL_SHA256_HASH" ]The column name to be used to match the recipient record to the Profile Extension records. Only used during the merge operation.
- 
            recordData: 
            object  recordData
            
            Record data that represents field names and corresponding values for the recipient.
- 
            updateOnMatch: 
            
            Allowed Values:[ "REPLACE_ALL", "NO_UPDATE" ]Specifies whether a recipient record should be updated in the Profile Extension if it already exists. Only used during the merge operation.
Nested Schema : recordData
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectRecord data that represents field names and corresponding values for the recipient.
    
    
    
    
        Show Source
        - 
            fieldNames: 
            array  fieldNames
            
            Field names of the Profile List. Must contain contain at least one of the merge key fields from 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.
Nested Schema : fieldNames
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayField names of the Profile List. Must contain contain at least one of the merge key fields from the Profile List.
    
    
    
    
    
        Show Source
        
        
    
    
    
    
    
    
Nested Schema : records
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayArray 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 extension table (PET) records in a single batch request by using the query attribute action=delete and by passing a list of IDs. 
   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.
- The service URL requires the names of both the Profile List and the Profile Extension Table.
- You can pass up to 200 IDs in the request, and each ID must be 500 characters or fewer.
- Values passed in the idsarray must correspond to the query attribute. For example, if you specifycfor yourqueryAttribute, the system expects theidsarray to contain the customer ID values for the records you want to delete.
- For queryAttribute, all query attributes correspond to the PET's parent profile list fields. The system uses the query attribute to look up the profile list record, and then deletes the corresponding PET record.
A successful request requires the following headers:
| FIELDS | DESCRIPTION | 
|---|---|
| Authorization | <AUTH_TOKEN> | 
| Content-Type | application/json | 
Sample Request
   When Responsys receives the following sample endpoint and request, the system will attempt to delete records from the profile extension table 
   
 
  MyExamplePET that correspond to records in the profile list 
   MyExampleProfileList. 
   - Because the query attribute is rand the IDs are63036487and63027514, the system searchesMyExampleProfileListfor those RIIDs.
- Next, the system locates the MyExamplePETrecords associated with the profile list records that it located.
- Finally, the system deletes the PET records that it found.
Sample request endpoint:
POST /rest/api/v1.3/lists/MyExampleProfileList/listExtensions/MyExamplePET/members?action=delete
Sample request body:
{ 
  "queryAttribute" : "r",
  "ids" : ["63036487", "63027514"] 
}
 
  
   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, 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 mapTemplateNameandmergeRulewill have default values of null/false.
Sample Response: Success
   The following response shows that the delete succeeded for records with RIID values of 63036487 and 63027514. 
   
 
  
HTTPS response status code: 200 OK
 
{
  "recordData":
    {"fieldNames": ["RIID_"],
    "records": [ 
      ["63036487"],
      ["63027514"]
    ], 
    "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/listExtensions/MyExamplePET/members?action=delete",
      "method": "POST" },
    { "rel": "mergeProfileExtensionRecipients", 
      "href": "/rest/api/v1.3/lists/MyExampleProfileList/listExtensions/MyExamplePET/members",
      "method": "POST" },
    { "rel": "retrieveProfileExtensionRecipients", 
      "href": "/rest/api/v1.3/lists/MyExampleProfileList/listExtensions/MyExamplePET/members", 
      "method": "GET" }
  ]
}
 
  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 queryAttributeisr, 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": [] } 
	 
  
   PET not found: The system could not find the PET specified in the request endpoint. A 
   404 not found error is returned with the following error response body: 
   
 
 
	{ "type": "",
       "title": "Profile list extension not found",
       "errorCode": "PROFILE_EXTENSION_NOT_FOUND",
       "detail": " MyOtherExamplePET Profile Extension Not Found",
       "errorDetails": [] }