Delete Profile List Recipients using query attribute

delete

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

Deletes profile list recipients for a profile list using query attributes. Using the query parameters specify a query attribute type to identify recipients, and the corresponding value. The response indicates how many matching records were deleted.
Up to 10 profile list recipients can be deleted in a single request.

Request

Path Parameters
Query Parameters
  • ID corresponding to the query attribute
  • Query Attribute. Can be either 'r' (RIID_), 'e' (EMAIL_ADDRESS_), 'c' (CUSTOMER_ID_), or 'm' (MOBILE_NUMBER_).
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Delete List Recipients Using Query Attributes
Type: object
Title: Delete List Recipients Using Query Attributes
Show Source
Nested Schema : recordData
Type: object
Record data that represents Field Names and corresponding values for the recipient.
Show Source
Nested Schema : fieldNames
Type: array
Field Names in the Profile List
Show Source
Nested Schema : records
Type: array
Array of values corresponding to the fieldNames. Each element in the array represents a single recipient.
Show Source
Nested Schema : items
Type: array
Field Values for the recipient in the Profile List
Show Source
Back to Top

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": []
}
	
Back to Top