Reference

Table Lists


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_lists
INSERT add_list
UPDATE update_list
UPSERT
DELETE delete_list
LOOKUP get_list

Examples

SSIS

Use Mailchimp Connector in API Source component to read data or in API Destination component to read/write data:

Read from Lists table using API Source

API Source - Mailchimp
Read and write Mailchimp data effortlessly. Integrate, manage, and automate campaigns, lists, members, and reports — almost no coding required.
Mailchimp
Lists
Optional Parameters
Created before (Format: 2015-10-21T15:41:36)
Created after (Format: 2015-10-21T15:41:36)
Created before last campaign send date (Format: 2015-10-21T15:41:36)
Created after last campaign send date (Format: 2015-10-21T15:41:36)
Includes email address
Contains active ecommerce store
SSIS API Source - Read from table or endpoint

Read/write to Lists table using API Destination

API Destination - Mailchimp
Read and write Mailchimp data effortlessly. Integrate, manage, and automate campaigns, lists, members, and reports — almost no coding required.
Mailchimp
Lists
Select
Optional Parameters
Created before (Format: 2015-10-21T15:41:36)
Created after (Format: 2015-10-21T15:41:36)
Created before last campaign send date (Format: 2015-10-21T15:41:36)
Created after last campaign send date (Format: 2015-10-21T15:41:36)
Includes email address
Contains active ecommerce store
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Read lists/audiences

<p>Gets all audiences (lists). Pagination is handled automatically.</p>

SELECT * FROM Lists

Read lists/audiences (selected columns)

<p>Gets only the columns you specify from the <code>Lists</code> table. List the columns in the <code>SELECT</code> clause to limit data returned.</p>

SELECT Id, WebId, Name, Company, Address1, Address2, City, State, Zip, Country, Phone, PermissionReminder, UseArchiveBar, CampaignDefaultFromName, CampaignDefaultFromEmail, CampaignDefaultSubject, CampaignDefaultLanguage, NotifyOnSubscribe, NotifyOnUnsubscribe, DateCreated, ListRating, EmailTypeOption, SubscribeUrlShort, SubscribeUrlLong, BeamerAddress, Visibility, DoubleOptin, HasWelcome, MarketingPermissions, Modules, MemberCount, UnsubscribeCount, CleanedCount, MemberCountSinceSend, UnsubscribeCountSinceSend, CleanedCountSinceSend, CampaignCount, CampaignLastSent, MergeFieldCount, AvgSubRate, AvgUnsubRate, TargetSubRate, OpenRate, ClickRate, LastSubDate, LastUnsubDate 
FROM Lists

Read a list by ID

<p>Gets a single list (audience) by its ID. Use <code>WHERE Id='...'</code> with the list ID.</p>

SELECT * FROM Lists 
WHERE Id='e246f7e24d'

Delete list

<p>Deletes a list (audience) by its ID using <code>DELETE FROM Lists WHERE Id='...'</code>. This action cannot be undone.</p>

DELETE FROM Lists 
WHERE Id='e246f7e24d'

Create list

<p>Create a new list (audience) using <code>INSERT INTO Lists</code>. Required columns include <code>Name</code>, <code>Company</code>, <code>Address1</code>, <code>City</code>, <code>Country</code>, <code>PermissionReminder</code>, campaign defaults, <code>EmailTypeOption</code>, and <code>DoubleOptIn</code>.</p>

INSERT INTO Lists
(Name, Company, Address1, Address2, City, State, Zip, Country, Phone, PermissionReminder, UseArchiveBar, CampaignDefaultFromName, CampaignDefaultFromEmail, CampaignDefaultSubject, CampaignDefaultLanguage, NotifyOnSubscribe, NotifyOnUnsubscribe, EmailTypeOption, DoubleOptIn, MarketingPermissions)
VALUES
('The Awesome List', 'My Company Name', '123 Morgan Falls Lane', 'Suite 250','Albany', 'GA', '30114', 'US', '(770) 555-1234', 'Thank you for signing up for these notification emails!', 'false', 'Sales Team', 'salesteam@mycompany.com', 'The best deals are here!', 'en', 'salesteam@mycompany.com', 'salesteam@mycompany.com', 'true', 'false', 'true')

Update list (e.g. footer address for SPAM compliance)

<p>Updates an existing list (audience). Use <code>UPDATE Lists SET ... WHERE Id='...'</code>. Commonly used to update contact/footer address for SPAM compliance.</p>

UPDATE Lists SET Address1='123 Main Street', Address2 = 'Suite 52',  City = 'Chicago'
WHERE Id='e246f7e24d'

SQL Server

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

Read lists/audiences

<p>Gets all audiences (lists). Pagination is handled automatically.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Lists';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Read lists/audiences (selected columns)

<p>Gets only the columns you specify from the <code>Lists</code> table. List the columns in the <code>SELECT</code> clause to limit data returned.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT Id, WebId, Name, Company, Address1, Address2, City, State, Zip, Country, Phone, PermissionReminder, UseArchiveBar, CampaignDefaultFromName, CampaignDefaultFromEmail, CampaignDefaultSubject, CampaignDefaultLanguage, NotifyOnSubscribe, NotifyOnUnsubscribe, DateCreated, ListRating, EmailTypeOption, SubscribeUrlShort, SubscribeUrlLong, BeamerAddress, Visibility, DoubleOptin, HasWelcome, MarketingPermissions, Modules, MemberCount, UnsubscribeCount, CleanedCount, MemberCountSinceSend, UnsubscribeCountSinceSend, CleanedCountSinceSend, CampaignCount, CampaignLastSent, MergeFieldCount, AvgSubRate, AvgUnsubRate, TargetSubRate, OpenRate, ClickRate, LastSubDate, LastUnsubDate 
FROM Lists';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Read a list by ID

<p>Gets a single list (audience) by its ID. Use <code>WHERE Id='...'</code> with the list ID.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Lists 
WHERE Id=''e246f7e24d''';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Delete list

<p>Deletes a list (audience) by its ID using <code>DELETE FROM Lists WHERE Id='...'</code>. This action cannot be undone.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Lists 
WHERE Id=''e246f7e24d''';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Create list

<p>Create a new list (audience) using <code>INSERT INTO Lists</code>. Required columns include <code>Name</code>, <code>Company</code>, <code>Address1</code>, <code>City</code>, <code>Country</code>, <code>PermissionReminder</code>, campaign defaults, <code>EmailTypeOption</code>, and <code>DoubleOptIn</code>.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Lists
(Name, Company, Address1, Address2, City, State, Zip, Country, Phone, PermissionReminder, UseArchiveBar, CampaignDefaultFromName, CampaignDefaultFromEmail, CampaignDefaultSubject, CampaignDefaultLanguage, NotifyOnSubscribe, NotifyOnUnsubscribe, EmailTypeOption, DoubleOptIn, MarketingPermissions)
VALUES
(''The Awesome List'', ''My Company Name'', ''123 Morgan Falls Lane'', ''Suite 250'',''Albany'', ''GA'', ''30114'', ''US'', ''(770) 555-1234'', ''Thank you for signing up for these notification emails!'', ''false'', ''Sales Team'', ''salesteam@mycompany.com'', ''The best deals are here!'', ''en'', ''salesteam@mycompany.com'', ''salesteam@mycompany.com'', ''true'', ''false'', ''true'')';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Update list (e.g. footer address for SPAM compliance)

<p>Updates an existing list (audience). Use <code>UPDATE Lists SET ... WHERE Id='...'</code>. Commonly used to update contact/footer address for SPAM compliance.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Lists SET Address1=''123 Main Street'', Address2 = ''Suite 52'',  City = ''Chicago''
WHERE Id=''e246f7e24d''';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];