Asynchronous Delete Supplemental Table Members API

This asynchronous API enables you to delete multiple supplemental table members in a single request. Use the Polling API endpoint to retrieve data about your request.

Note: The Asynchronous API is generally available for all Responsys customers.

Service URL:

/rest/asyncApi/v1.3/folders/{folderName}/suppData/{tableName}/members/members?action=delete

Required Path Parameters:

  • folderName - Name of the folder where the supplemental table is found.

  • tableName - Name of the supplemental table.

Query Parameters:

  • action - Name of the action to perform. Must be set to delete.

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Request Body - Required Properties:

  • recordData - Record data that represents field names and corresponding record values for the members.

    • fieldNames - Name of the primary key to match supplemental table members.

    • records - Values corresponding to the fieldNames specified.

Sample Request Body:

{
  "recordData": {
    "fieldNames": [
      "CUST_NO",
      "EMAIL_ADDRESS"
    ],
    "records": [
      [
        "100",
        "api.user100@oracle.com"
      ],
      [
        "200",
        "api.user200@oracle.com"
      ],
      [
        "300"
      ]
    ]
  }
}

Response Notes:

  • The system validates the request payload syntax to ensure that the payload is well-formed JSON. However, it does not validate correctness of the values. For example, it does not validate if the campaign object exists or not, nor does it validate whether the payload uses the correct property names. Subsequently, you must poll for results to learn whether the request succeeded or failed due to other reasons.
  • A successful response for the asynchronous API returns an HTTPS status code of 202 Accepted.
  • The response body contains the information you need to analyze the response that you would get from the Polling API.
    • requestId: Unique identifier of the API request. The value is alphanumeric.
    • apiName: Name of the API request that you triggered. Always asyncMultipleDeleteTableRecords for this API request’s response.
    • status: When successful, the status value is REQUEST_ACCEPTED. This means that the payload syntax was well-formed JSON and that the request was placed in the system queue for processing. You must poll for the final result; for more information, see Polling API endpoint.
  • See Common error responses for the Asynchronous API for details about the error responses.

Sample Successful Response:

{
  "requestId": "OUZkeTFlOjoxNTY1NzAxNjY0",
  "apiName": "asyncMultipleDeleteTableRecords",
  "status": "REQUEST_ACCEPTED",
  "links": [
    {
      "rel": "self",
      "href": "/rest/asyncApi/v1.3/folders/{folderName}/suppData/{tableName}/members/members?action=delete",
      "method": "POST"
    },
    {
      "rel": "asyncResponse",
      "href": "/rest/asyncApi/v1.3/requests/OUZkeTFlOjoxNTY1NzAxNjY0",
      "method": "GET"
    }
  ]
}

Sample Successful Response from the Polling API:

{
  "response": {
    "recordData": {
      "fieldNames": [
        "CUST_NO",
        "EMAIL_ADDRESS"
      ],
      "records": [
        [
          {
            "Ids": [
              "118",
              "api.user@oracle.com"
            ],
            "success": true
          }
        ]
      ]
    }
  },
  "requestId": "WmVFSGZqOjoxNjE0NjA0MTUx",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "Pacific Standard Time",
  "requestTime": "2021-03-01T05:09:11.192",
  "requestProcessedTime": "2021-03-01T05:09:11.493",
  "status": "SUCCESS"
}

Sample Error Responses

Folder name invalid or not found. The following example shows a sample error response when the folder name specified is invalid or not found. The response is a 404 Not Found error.

{
 "type": "",
 "title": "Folder not found",
 "errorCode": "FOLDER_NOT_FOUND",
 "detail": "Folder Not Found",
 "errorDetails": []
}

Supplemental table not found. The following example shows a sample error response when the supplemental table name specified is invalid or not found. The response is a 404 Not Found error.

{
  "type": "",
  "title": "Table not found",
  "errorCode": "TABLE_NOT_FOUND",
  "detail": "SupplementalTable1 Table Not Found",
  "errorDetails": []
}

Invalid supplemental table name. The following example shows a sample error response when the supplemental table name specified contains invalid characters. The response is a 400 Bad Request error.

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

Supplemental table name exceeds 100 characters. The following example shows a sample error response when the supplemental table name specified exceeds 100 characters. The response is a 400 Bad Request error.

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

No matching records found. The following example shows a sample error response for the Polling API endpoint – in this case, the records object contains the error JSON, which tells us that the records we tried to delete, did not exist. A response code of 200 OK is shown, however, because the polling request itself completed successfully.

{
  "response": {
    "recordData": {
      "fieldNames": [
        "EMAIL_ADDRESS_"
      ],
      "records": [
        [
          {
            "Ids": [
              "api.user@oracle.com"
            ],
            "success": false,
            "errorCode": "RECORD_NOT_FOUND",
            "errorMessage": "No records found in the table for the given ids"
          }
        ],
        [
          {
            "Ids": [
              "api.user2@oracle.com"
            ],
            "success": false,
            "errorCode": "RECORD_NOT_FOUND",
            "errorMessage": "No records found in the table for the given ids"
          }
        ]
      ]
    }
  },
  "requestId": "M0d0S2RrOjoxNjE0ODM0NTM1",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "India Standard Time",
  "requestTime": "2021-03-04T10:38:55.744",
  "requestProcessedTime": "2021-03-04T10:38:56.066",
  "status": "SUCCESS"
}

Invalid field name. The following example shows a sample error response when the specified field (EMAIL_ADDRESS) is not found in the supplemental table.

{
  "response": {
    "errorCode": "INVALID_FIELD_NAME",
    "detail": "Column(s) [EMAIL_ADDRESS] not found in the table",
    "type": "",
    "title": "Invalid field name",
    "errorDetails": "[]"
  },
  "requestId": "eklTb2o0OjoxNjE0MDgwMzE5",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "Pacific Standard Time",
  "requestTime": "2021-02-23T03:38:39.219",
  "requestProcessedTime": "2021-02-23T03:38:39.657",
  "status": "ERROR"
}

Invalid field name. The following example shows a sample error response when not all the primary keys of a supplemental table are specified.

{
  "response": {
    "errorCode": "INVALID_PARAMETER",
    "detail": "All and Only the Primary Keys in the Table [EMAIL_ADDRESS_, INTEGER_FIELD, NUMBER_FIELD, FIELD_DELETE] must be specified as Query Columns.",
    "type": "",
    "title": "Invalid request parameters",
    "errorDetails": "[]"
  },
  "requestId": "UnNLY3lWOjoxNjE0NTM0MTEy",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "India Standard Time",
  "requestTime": "2021-02-28T23:11:52.993",
  "requestProcessedTime": "2021-02-28T23:11:53.240",
  "status": "ERROR"
}

Record limit exceeded. The following example shows a sample error response when more than 200 records are specified in the request. The response is a 400 Bad Request error.

{
  "type": "",
  "title": "Record limit exceeded",
  "errorCode": "RECORD_LIMIT_EXCEEDED",
  "detail": "Record limit exceeded, maximum of 200 records are allowed per each api call",
  "errorDetails": []
}

Records is null or empty. The following example shows a sample error response when no field values are specified in the request payload. The response is a 400 Bad Request error.

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Record(s) is null or empty ",
  "errorDetails": []
}

Empty or null passed for field values. The following example shows a sample error response when null or empty field values are specified in the request payload. The response is a 400 Bad Request error.

{
  "response": {
    "recordData": {
      "fieldNames": [
        "EMAIL_ADDRESS_"
      ],
      "records": [
        [
          {
            "Ids": [
              ""
            ],
            "success": false,
            "errorCode": "INVALID_PARAMETER",
            "errorMessage": "ERROR: Column EMAIL_ADDRESS_ value cannot be empty\n\n"
          }
        ],
        [
          {
            "Ids": [
              null
            ],
            "success": false,
            "errorCode": "INVALID_PARAMETER",
            "errorMessage": "ERROR: Column EMAIL_ADDRESS_ value cannot be empty\n\n"
          }
        ]
      ]
    }
  },
  "requestId": "RmJCTWhEOjoxNjE0ODM0NzQz",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "India Standard Time",
  "requestTime": "2021-03-04T10:42:23.925",
  "requestProcessedTime": "2021-03-04T10:42:24.239",
  "status": "SUCCESS"
}

Field names are null or empty. The following example shows a sample error response when field names are either null or empty.

{
  "response": {
    "errorCode": "INVALID_FIELD_NAME",
    "detail": "One of the field names is null OR empty",
    "type": "",
    "title": "Invalid field name",
    "errorDetails": "[]"
  },
  "requestId": "NU1JbUM1OjoxNjE0MDgwMzY0",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "Pacific Standard Time",
  "requestTime": "2021-02-23T03:39:24.570",
  "requestProcessedTime": "2021-02-23T03:39:24.632",
  "status": "ERROR"
}

Not all primary keys have been specified. The following example shows a sample error response.

{
  "response": {
    "errorCode": "INVALID_PARAMETER",
    "detail": "All and Only the Primary Keys in the Table [EMAIL_ADDRESS, CUST_NO] must be specified as Query Columns.",
    "type": "",
    "title": "Invalid request parameters",
    "errorDetails": "[]"
  },
  "requestId": "SWxsRkpIOjoxNjE0MDgwNDE2",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "Pacific Standard Time",
  "requestTime": "2021-02-23T03:40:16.371",
  "requestProcessedTime": "2021-02-23T03:40:16.404",
  "status": "ERROR"
}

Non-primary key specified. The following example shows a sample error response.

{
  "response": {
    "errorCode": "INVALID_FIELD_NAME",
    "detail": "Column(s) [FIRST_NAME] is not Primary Key(s)",
    "type": "",
    "title": "Invalid field name",
    "errorDetails": "[]"
  },
  "requestId": "Sm5ORFBTOjoxNjE0MDgwOTM3",
  "apiName": "asyncMultipleDeleteTableRecords",
  "timeZone": "Pacific Standard Time",
  "requestTime": "2021-02-23T03:48:57.764",
  "requestProcessedTime": "2021-02-23T03:48:57.825",
  "status": "ERROR"
}

Learn more

Common error responses for the Asynchronous API

Delete content library folder