Reference

Endpoint Delete List Member (Archive)


Name

delete_list_member

Description

Archive a list member. To permanently delete, use the delete_list_member_permanent endpoint. [API reference]

Related Tables

ListMembers , ListMembersBulk

Parameters

Parameter Required Options
Name: ListId

Label: List Id

The ID of the list for which you like to perform this operation.
YES
Name: Id

Label: Member Id

The ID of the list member for which data should be deleted.
YES

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(4000) 4000
ListId DT_WSTR nvarchar(4000) 4000
Status DT_WSTR nvarchar(4000) 4000
StatusCode DT_I4 int
If the column you are looking for is missing, consider customizing Mailchimp Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(4000) 4000
Required columns that you need to supply are bolded.

Examples

SSIS

Use Mailchimp Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
Delete List Member (Archive)
Required Parameters
List Id Fill-in the parameter...
Member Id Fill-in the parameter...
Optional Parameters
RawOutputDataRowTemplate {}
EnableRawOutputModeSingleRow True
ContineOnErrorForStatusCode True
ErrorStatusCodeToMatchRegex 404|405
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the ListMembers table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to delete list member:

API Destination - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
ListMembers
Delete
Required Parameters
List Id Fill-in the parameter...
Member Id Fill-in the parameter...
Optional Parameters
RawOutputDataRowTemplate {}
EnableRawOutputModeSingleRow True
ContineOnErrorForStatusCode True
ErrorStatusCodeToMatchRegex 404|405
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Delete a list member (archive) from a Mailchimp List

Delete List Member by Id and archive it. To delete permanently use delete_list_member_permanent endpoint. Archived / bounced record cannot be resubscribed. To resubscribe you must call delete_list_member_permanent

DELETE FROM ListMembers 
WHERE Id='170a0722daae03855d6434eb3a5959fb' 
WITH (ListId='e246f7e24d')

delete_list_member endpoint belongs to ListMembers , ListMembersBulk table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Delete a list member (archive) from a Mailchimp List

Delete List Member by Id and archive it. To delete permanently use delete_list_member_permanent endpoint. Archived / bounced record cannot be resubscribed. To resubscribe you must call delete_list_member_permanent

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM ListMembers 
WHERE Id=''170a0722daae03855d6434eb3a5959fb'' 
WITH (ListId=''e246f7e24d'')';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

delete_list_member endpoint belongs to ListMembers , ListMembersBulk table(s), and can therefore be used via those table(s).