Remove a row from an offline event table. Some offline event tables may have more than one row for an email address, so deleting a row based only on the email address will not work. Instead provide the unique ID. The RecipientDetails API will provide the unique ID field.
Delete
/API/Rest/OfflineEvents/Recipient/Remove
offlineEvent
emailAddress
uniqueId
PopulateOfflineEvent
No Permission
Invalid offline event name
Invalid email address
Row not found
Too many API calls
Database error
Unknown error
Row deleted.
Remove an offline event row.
using System;
using System.Net.Http;
string url = "https://example.com/API/Rest/OfflineEvents/Recipient/Remove?accountName=acme&login=ApiUser&offlineEvent=whitepaper%20download&emailAddress=joe@example.com&uniqueId=362354";
// Reuse HttpClient for multiple requests in production code.
using (var client = new HttpClient())
using (var request = new HttpRequestMessage(HttpMethod.Delete, url))
{
request.Headers.Add("Password", "YOUR_PASSWORD");
using (HttpResponseMessage response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
# encoding: utf-8
require 'rest-client'
require 'json'
url = 'https://example.com/API/Rest/OfflineEvents/Recipient/Remove?accountName=acme&login=ApiUser&offlineEvent=whitepaper%20download&emailAddress=joe@example.com&uniqueId=362354'
response = RestClient.delete(url, {:Password => "YOUR_PASSWORD"})
puts response
import requests
url = "https://example.com/API/Rest/OfflineEvents/Recipient/Remove?accountName=acme&login=ApiUser&offlineEvent=whitepaper%20download&emailAddress=joe@example.com&uniqueId=362354"
headers = {'password':'YOUR_PASSWORD'}
resp = requests.delete(url, headers=headers)
if resp.status_code == 200:
print(resp.text)
curl --request DELETE --header "Password: YOUR_PASSWORD" "https://example.com/API/Rest/OfflineEvents/Recipient/Remove?accountName=acme&login=ApiUser&offlineEvent=whitepaper%20download&emailAddress=joe@example.com&uniqueId=362354"