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
Parameters
| Parameter | Required | Options | 
|---|---|---|
| 
                    Name:
                     Label: List Id The ID of the list for which you like to perform this operation. | 
                YES | |
| 
                    Name:
                     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
                 | 
                
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | 
|---|---|---|---|---|
| Id | 
                    DT_WSTR
                 | 
                
                    nvarchar(4000)
                 | 
                4000 | 
Examples
SSIS
Use Mailchimp Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
| Required Parameters | |
|---|---|
| List Id | Fill-in the parameter... | 
| Member Id | Fill-in the parameter... | 
| Optional Parameters | |
| RawOutputDataRowTemplate | {} | 
| EnableRawOutputModeSingleRow | True | 
| ContineOnErrorForStatusCode | True | 
| ErrorStatusCodeToMatchRegex | 404|405 | 
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:
| Required Parameters | |
|---|---|
| List Id | Fill-in the parameter... | 
| Member Id | Fill-in the parameter... | 
| Optional Parameters | |
| RawOutputDataRowTemplate | {} | 
| EnableRawOutputModeSingleRow | True | 
| ContineOnErrorForStatusCode | True | 
| ErrorStatusCodeToMatchRegex | 404|405 | 
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).