Reference

Endpoint Get List of Campaigns


Name

get_campaigns

Description

Get all campaigns in an account. [API reference]

Related Tables

Campaigns

Parameters

Parameter Required Options
Name: type

Label: Campaign type

The campaign type. Possible values: regular, plaintext, absplit, rss, or variate.
Option Value
regular regular
plaintext plaintext
absplit absplit
rss rss
variate variate
Name: status

Label: Status of the campaign

The status of the campaign. Possible values: save, paused, schedule, sending, or sent.
Option Value
save save
paused paused
schedule schedule
sending sending
sent sent
Name: before_send_time

Label: Campaign sent before (Format: 2015-10-21T15:41:36)

Restrict the response to campaigns sent before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: since_send_time

Label: Campaign sent after (Format: 2015-10-21T15:41:36)

Restrict the response to campaigns sent after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: before_create_time

Label: Campaign created before (Format: 2015-10-21T15:41:36)

Restrict the response to campaigns created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: since_create_time

Label: Campaign created after (Format: 2015-10-21T15:41:36)

Restrict the response to campaigns created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
Option Value
today today
yesterday yesterday
monthstart monthstart
monthend monthend
yearstart yearstart
yearend yearend
weekstart weekstart
weekend weekend
yearstart-1y yearstart-1y
yearend-1y yearend-1y
monthstart-1d monthstart-1d
monthend+1d monthend+1d
Name: list_id

Label: Using list Id

The unique id for the list.
Name: folder_id

Label: Using folder Id

The unique folder id.
Name: member_id

Label: To customer

Retrieve campaigns sent to a particular list member. Member ID is The MD5 hash of the lowercase version of the list member’s email address.

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(100) 100
WebId DT_I4 int
Type DT_WSTR nvarchar(100) 100
CreateTime DT_DBTIMESTAMP datetime
ArchiveUrl DT_WSTR nvarchar(500) 500
LongArchiveUrl DT_WSTR nvarchar(1024) 1024
Status DT_WSTR nvarchar(100) 100
EmailsSent DT_I4 int
SendTime DT_WSTR nvarchar(500) 500
ContentType DT_WSTR nvarchar(100) 100
NeedsBlockRefresh DT_BOOL bit
Resendable DT_BOOL bit
RecipientsListId DT_WSTR nvarchar(100) 100
RecipientsListIsActive DT_BOOL bit
RecipientsListName DT_WSTR nvarchar(500) 500
RecipientsSegmentText DT_WSTR nvarchar(4000) 4000
RecipientsRecipientCount DT_I4 int
SettingsSubjectLine DT_WSTR nvarchar(1000) 1000
SettingsTitle DT_WSTR nvarchar(1000) 1000
SettingsFromName DT_WSTR nvarchar(500) 500
SettingsReplyTo DT_WSTR nvarchar(500) 500
SettingsUseConversation DT_BOOL bit
SettingsToName DT_WSTR nvarchar(500) 500
SettingsFolderId DT_WSTR nvarchar(500) 500
SettingsAuthenticate DT_BOOL bit
SettingsAutoFooter DT_BOOL bit
SettingsInlineCss DT_BOOL bit
SettingsAutoTweet DT_BOOL bit
SettingsFbComments DT_BOOL bit
SettingsTimeWarp DT_BOOL bit
SettingsTemplateId DT_I4 int
SettingsDragAndDrop DT_BOOL bit
TrackingOpens DT_BOOL bit
TrackingHtmlClicks DT_BOOL bit
TrackingTextClicks DT_BOOL bit
TrackingGoalTracking DT_BOOL bit
TrackingEcomm360 DT_BOOL bit
TrackingGoogleAnalytics DT_WSTR nvarchar(4000) 4000
TrackingClicktale DT_WSTR nvarchar(4000) 4000
DeliveryStatusEnabled DT_BOOL bit
If the column you are looking for is missing, consider customizing Mailchimp Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime.

Examples

SSIS

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

API Source

This Endpoint belongs to the Campaigns table, therefore it is better to use it, instead of accessing the endpoint directly:

API Source - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
Campaigns
Optional Parameters
Campaign type
Status of the campaign
Campaign sent before (Format: 2015-10-21T15:41:36)
Campaign sent after (Format: 2015-10-21T15:41:36)
Campaign created before (Format: 2015-10-21T15:41:36)
Campaign created after (Format: 2015-10-21T15:41:36)
Using list Id
Using folder Id
To customer
ContineOnErrorForStatusCode True
ErrorStatusCodeToMatchRegex 404|405
SSIS API Source - Read from table or endpoint

API Destination

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

API Destination - Mailchimp
Read / write MailChimp Campaigns, Lists, Members, Reports and more in without coding.
Mailchimp
Campaigns
Select
Optional Parameters
Campaign type
Status of the campaign
Campaign sent before (Format: 2015-10-21T15:41:36)
Campaign sent after (Format: 2015-10-21T15:41:36)
Campaign created before (Format: 2015-10-21T15:41:36)
Campaign created after (Format: 2015-10-21T15:41:36)
Using list Id
Using folder Id
To customer
ContineOnErrorForStatusCode True
ErrorStatusCodeToMatchRegex 404|405
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Get a list of campaigns in your Mailchimp account

SELECT * FROM Campaigns

Get specific columns in list of campaigns in your Mailchimp account

SELECT Id, WebId, Type, CreateTime, ArchiveUrl, LongArchiveUrl, Status, EmailsSent, SendTime, ContentType, NeedsBlockRefresh, Resendable, RecipientsListId, RecipientsListIsActive, RecipientsListName, RecipientsSegmentText, RecipientsRecipientCount, SettingsSubjectLine, SettingsTitle, SettingsFromName, SettingsReplyTo, SettingsUseConversation, SettingsToName, SettingsFolderId, SettingsAuthenticate, SettingsAutoFooter, SettingsInlineCss, SettingsAutoTweet, SettingsFbComments, SettingsTimeWarp, SettingsTemplateId, SettingsDragAndDrop, TrackingOpens, TrackingHtmlClicks, TrackingTextClicks, TrackingGoalTracking, TrackingEcomm360, TrackingGoogleAnalytics, TrackingClicktale, DeliveryStatusEnabled 
FROM Campaigns

get_campaigns endpoint belongs to Campaigns 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:

Get a list of campaigns in your Mailchimp account

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

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

Get specific columns in list of campaigns in your Mailchimp account

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT Id, WebId, Type, CreateTime, ArchiveUrl, LongArchiveUrl, Status, EmailsSent, SendTime, ContentType, NeedsBlockRefresh, Resendable, RecipientsListId, RecipientsListIsActive, RecipientsListName, RecipientsSegmentText, RecipientsRecipientCount, SettingsSubjectLine, SettingsTitle, SettingsFromName, SettingsReplyTo, SettingsUseConversation, SettingsToName, SettingsFolderId, SettingsAuthenticate, SettingsAutoFooter, SettingsInlineCss, SettingsAutoTweet, SettingsFbComments, SettingsTimeWarp, SettingsTemplateId, SettingsDragAndDrop, TrackingOpens, TrackingHtmlClicks, TrackingTextClicks, TrackingGoalTracking, TrackingEcomm360, TrackingGoogleAnalytics, TrackingClicktale, DeliveryStatusEnabled 
FROM Campaigns';

EXEC (@MyQuery) AT [LS_TO_MAILCHIMP_IN_GATEWAY];

get_campaigns endpoint belongs to Campaigns table(s), and can therefore be used via those table(s).