Class: MailchimpMarketing::ReportsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpMarketing/api/reports_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ ReportsApi

Returns a new instance of ReportsApi.



19
20
21
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 19

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_all_campaign_reports(opts = {}) ⇒ CampaignReports1

Get campaign reports Get campaign reports.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :type (String)

    The campaign type.

  • :before_send_time (DateTime)

    Restrict the response to campaigns sent before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_send_time (DateTime)

    Restrict the response to campaigns sent after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (CampaignReports1)


33
34
35
36
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 33

def get_all_campaign_reports(opts = {})
  data, _status_code, _headers = get_all_campaign_reports_with_http_info(opts)
  data
end

#get_all_campaign_reports_with_http_info(opts = {}) ⇒ Array<(CampaignReports1, Fixnum, Hash)>

Get campaign reports Get campaign reports.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :type (String)

    The campaign type.

  • :before_send_time (DateTime)

    Restrict the response to campaigns sent before the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_send_time (DateTime)

    Restrict the response to campaigns sent after the set time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (Array<(CampaignReports1, Fixnum, Hash)>)

    CampaignReports1 data, response status code and response headers



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 49

def get_all_campaign_reports_with_http_info(opts = {})
  # resource path
  local_var_path = '/reports'

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
  query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CampaignReports1')
  return data, status_code, headers
end

#get_campaign_abuse_report(campaign_id = {}, report_id = {}, opts = {}) ⇒ AbuseComplaint1

Get information about a specific abuse report Get information about a specific abuse report for a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • report_id (defaults to: {})

    The id for the abuse report.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (AbuseComplaint1)


193
194
195
196
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 193

def get_campaign_abuse_report(campaign_id = {}, report_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_abuse_report_with_http_info(campaign_id, report_id, opts)
  data
end

#get_campaign_abuse_report_with_http_info(campaign_id, report_id, opts = {}) ⇒ Array<(AbuseComplaint1, Fixnum, Hash)>

Get information about a specific abuse report Get information about a specific abuse report for a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • report_id

    The id for the abuse report.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(AbuseComplaint1, Fixnum, Hash)>)

    AbuseComplaint1 data, response status code and response headers



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 206

def get_campaign_abuse_report_with_http_info(campaign_id, report_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/abuse-reports/{report_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AbuseComplaint1')
  return data, status_code, headers
end

#get_campaign_abuse_reports(campaign_id = {}, opts = {}) ⇒ AbuseComplaints1

Get abuse complaints for a campaign Get a list of [abuse complaints](mailchimp.com/help/about-abuse-complaints/) for a specific campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (AbuseComplaints1)


142
143
144
145
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 142

def get_campaign_abuse_reports(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_abuse_reports_with_http_info(campaign_id, opts)
  data
end

#get_campaign_abuse_reports_with_http_info(campaign_id, opts = {}) ⇒ Array<(AbuseComplaints1, Fixnum, Hash)>

Get abuse complaints for a campaign Get a list of [abuse complaints](mailchimp.com/help/about-abuse-complaints/) for a specific campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(AbuseComplaints1, Fixnum, Hash)>)

    AbuseComplaints1 data, response status code and response headers



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 154

def get_campaign_abuse_reports_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/abuse-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AbuseComplaints1')
  return data, status_code, headers
end

#get_campaign_advice(campaign_id = {}, opts = {}) ⇒ CampaignAdviceReport

Get campaign feedback Get feedback based on a campaign’s statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (CampaignAdviceReport)


244
245
246
247
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 244

def get_campaign_advice(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_advice_with_http_info(campaign_id, opts)
  data
end

#get_campaign_advice_with_http_info(campaign_id, opts = {}) ⇒ Array<(CampaignAdviceReport, Fixnum, Hash)>

Get campaign feedback Get feedback based on a campaign&#39;s statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(CampaignAdviceReport, Fixnum, Hash)>)

    CampaignAdviceReport data, response status code and response headers



256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 256

def get_campaign_advice_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/advice'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CampaignAdviceReport')
  return data, status_code, headers
end

#get_campaign_click_details(campaign_id = {}, opts = {}) ⇒ ClickDetailReport

Get campaign click details Get information about [clicks](mailchimp.com/help/enable-and-view-click-tracking/) on specific links in your Mailchimp campaigns.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (ClickDetailReport)


296
297
298
299
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 296

def get_campaign_click_details(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_click_details_with_http_info(campaign_id, opts)
  data
end

Get click details for a specific link Get click details for a specific link in a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • link_id (defaults to: {})

    The id for the link.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (ClickDetailReport)


351
352
353
354
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 351

def get_campaign_click_details_for_link(campaign_id = {}, link_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_click_details_for_link_with_http_info(campaign_id, link_id, opts)
  data
end

Get click details for a specific link Get click details for a specific link in a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • link_id

    The id for the link.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(ClickDetailReport, Fixnum, Hash)>)

    ClickDetailReport data, response status code and response headers



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 364

def get_campaign_click_details_for_link_with_http_info(campaign_id, link_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/click-details/{link_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClickDetailReport')
  return data, status_code, headers
end

#get_campaign_click_details_with_http_info(campaign_id, opts = {}) ⇒ Array<(ClickDetailReport, Fixnum, Hash)>

Get campaign click details Get information about [clicks](mailchimp.com/help/enable-and-view-click-tracking/) on specific links in your Mailchimp campaigns.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

  • (Array<(ClickDetailReport, Fixnum, Hash)>)

    ClickDetailReport data, response status code and response headers



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 310

def get_campaign_click_details_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/click-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClickDetailReport')
  return data, status_code, headers
end

#get_campaign_open_details(campaign_id = {}, opts = {}) ⇒ OpenDetailReport

Get campaign Open details Get detailed information about any campaign emails that were opened by a list member.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :since (String)

    Restrict results to campaign open events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (OpenDetailReport)


846
847
848
849
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 846

def get_campaign_open_details(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_open_details_with_http_info(campaign_id, opts)
  data
end

#get_campaign_open_details_with_http_info(campaign_id, opts = {}) ⇒ Array<(OpenDetailReport, Fixnum, Hash)>

Get campaign Open details Get detailed information about any campaign emails that were opened by a list member.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :since (String)

    Restrict results to campaign open events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (Array<(OpenDetailReport, Fixnum, Hash)>)

    OpenDetailReport data, response status code and response headers



861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 861

def get_campaign_open_details_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/open-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OpenDetailReport')
  return data, status_code, headers
end

#get_campaign_recipient(campaign_id = {}, subscriber_hash = {}, opts = {}) ⇒ SentTo

Get information about a specific campaign recipient Get information about a specific campaign recipient.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (SentTo)


1011
1012
1013
1014
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1011

def get_campaign_recipient(campaign_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_campaign_recipient_with_http_info(campaign_id, subscriber_hash, opts)
  data
end

#get_campaign_recipient_with_http_info(campaign_id, subscriber_hash, opts = {}) ⇒ Array<(SentTo, Fixnum, Hash)>

Get information about a specific campaign recipient Get information about a specific campaign recipient.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(SentTo, Fixnum, Hash)>)

    SentTo data, response status code and response headers



1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1024

def get_campaign_recipient_with_http_info(campaign_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/sent-to/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SentTo')
  return data, status_code, headers
end

#get_campaign_recipients(campaign_id = {}, opts = {}) ⇒ SentTo

Get information about campaign recipients Get information about campaign recipients.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (SentTo)


956
957
958
959
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 956

def get_campaign_recipients(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_recipients_with_http_info(campaign_id, opts)
  data
end

#get_campaign_recipients_with_http_info(campaign_id, opts = {}) ⇒ Array<(SentTo, Fixnum, Hash)>

Get information about campaign recipients Get information about campaign recipients.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

  • (Array<(SentTo, Fixnum, Hash)>)

    SentTo data, response status code and response headers



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 970

def get_campaign_recipients_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/sent-to'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SentTo')
  return data, status_code, headers
end

#get_campaign_report(campaign_id = {}, opts = {}) ⇒ CampaignReport

Get a specific campaign report Get report details for a specific sent campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (CampaignReport)


92
93
94
95
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 92

def get_campaign_report(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_campaign_report_with_http_info(campaign_id, opts)
  data
end

#get_campaign_report_with_http_info(campaign_id, opts = {}) ⇒ Array<(CampaignReport, Fixnum, Hash)>

Get a specific campaign report Get report details for a specific sent campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(CampaignReport, Fixnum, Hash)>)

    CampaignReport data, response status code and response headers



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 104

def get_campaign_report_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CampaignReport')
  return data, status_code, headers
end

#get_domain_performance_for_campaign(campaign_id = {}, opts = {}) ⇒ DomainPerformance

Get domain performance stats Get statistics for the top-performing email domains in a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (DomainPerformance)


514
515
516
517
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 514

def get_domain_performance_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_domain_performance_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_domain_performance_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(DomainPerformance, Fixnum, Hash)>

Get domain performance stats Get statistics for the top-performing email domains in a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(DomainPerformance, Fixnum, Hash)>)

    DomainPerformance data, response status code and response headers



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 526

def get_domain_performance_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/domain-performance'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DomainPerformance')
  return data, status_code, headers
end

#get_ecommerce_product_activity_for_campaign(campaign_id = {}, opts = {}) ⇒ InlineResponse2008

__summary__ Get breakdown of product activity for a campaign

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :sort_field (String)

    Returns files sorted by the specified field.

Returns:

  • (InlineResponse2008)


567
568
569
570
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 567

def get_ecommerce_product_activity_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_ecommerce_product_activity_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_ecommerce_product_activity_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(InlineResponse2008, Fixnum, Hash)>

__summary__ Get breakdown of product activity for a campaign

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :sort_field (String)

    Returns files sorted by the specified field.

Returns:

  • (Array<(InlineResponse2008, Fixnum, Hash)>)

    InlineResponse2008 data, response status code and response headers



582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 582

def get_ecommerce_product_activity_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/ecommerce-product-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InlineResponse2008')
  return data, status_code, headers
end

#get_eepurl_activity_for_campaign(campaign_id = {}, opts = {}) ⇒ EepurlActivity

Get Eepurl activity Get a summary of social activity for the campaign, tracked by EepURL.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (EepurlActivity)


623
624
625
626
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 623

def get_eepurl_activity_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_eepurl_activity_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_eepurl_activity_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(EepurlActivity, Fixnum, Hash)>

Get Eepurl activity Get a summary of social activity for the campaign, tracked by EepURL.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(EepurlActivity, Fixnum, Hash)>)

    EepurlActivity data, response status code and response headers



635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 635

def get_eepurl_activity_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/eepurl'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EepurlActivity')
  return data, status_code, headers
end

#get_email_activity_for_campaign(campaign_id = {}, opts = {}) ⇒ EmailActivity

Get email activity Get a list of member’s subscriber activity in a specific campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :since (String)

    Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (EmailActivity)


676
677
678
679
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 676

def get_email_activity_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_email_activity_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_email_activity_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(EmailActivity, Fixnum, Hash)>

Get email activity Get a list of member&#39;s subscriber activity in a specific campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :since (String)

    Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (Array<(EmailActivity, Fixnum, Hash)>)

    EmailActivity data, response status code and response headers



691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 691

def get_email_activity_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/email-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailActivity')
  return data, status_code, headers
end

#get_email_activity_for_subscriber(campaign_id = {}, subscriber_hash = {}, opts = {}) ⇒ EmailActivity

Get email activity for a specific subscriber Get a specific list member’s activity in a campaign including opens, clicks, and bounces.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :since (String)

    Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (EmailActivity)


734
735
736
737
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 734

def get_email_activity_for_subscriber(campaign_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_email_activity_for_subscriber_with_http_info(campaign_id, subscriber_hash, opts)
  data
end

#get_email_activity_for_subscriber_with_http_info(campaign_id, subscriber_hash, opts = {}) ⇒ Array<(EmailActivity, Fixnum, Hash)>

Get email activity for a specific subscriber Get a specific list member&#39;s activity in a campaign including opens, clicks, and bounces.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :since (String)

    Restrict results to email activity events that occur after a specific time. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (Array<(EmailActivity, Fixnum, Hash)>)

    EmailActivity data, response status code and response headers



748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 748

def get_email_activity_for_subscriber_with_http_info(campaign_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/email-activity/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailActivity')
  return data, status_code, headers
end

#get_locations_for_campaign(campaign_id = {}, opts = {}) ⇒ OpenLocations

Get top open locations Get top open locations for a specific campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (OpenLocations)


789
790
791
792
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 789

def get_locations_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_locations_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_locations_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(OpenLocations, Fixnum, Hash)>

Get top open locations Get top open locations for a specific campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

  • (Array<(OpenLocations, Fixnum, Hash)>)

    OpenLocations data, response status code and response headers



803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 803

def get_locations_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/locations'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OpenLocations')
  return data, status_code, headers
end

#get_sub_reports_for_campaign(campaign_id = {}, opts = {}) ⇒ CampaignSubReports

Get reports for child campaigns Get a list of reports with child campaigns for a specific parent campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (CampaignSubReports)


1062
1063
1064
1065
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1062

def get_sub_reports_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_sub_reports_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_sub_reports_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(CampaignSubReports, Fixnum, Hash)>

Get reports for child campaigns Get a list of reports with child campaigns for a specific parent campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(CampaignSubReports, Fixnum, Hash)>)

    CampaignSubReports data, response status code and response headers



1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1074

def get_sub_reports_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/sub-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CampaignSubReports')
  return data, status_code, headers
end

#get_subscriber_info(campaign_id = {}, link_id = {}, subscriber_hash = {}, opts = {}) ⇒ ClickDetailMember

Get information about a specific subscriber who clicked a link Get information about a specific subscriber who clicked a link in a specific campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • link_id (defaults to: {})

    The id for the link.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (ClickDetailMember)


462
463
464
465
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 462

def get_subscriber_info(campaign_id = {}, link_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_subscriber_info_with_http_info(campaign_id, link_id, subscriber_hash, opts)
  data
end

#get_subscriber_info_for_opened_campaign(campaign_id = {}, subscriber_hash = {}, opts = {}) ⇒ OpenActivity

Get information about a specific subscriber who opened a campaign Get information about a specific subscriber who opened a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (OpenActivity)


903
904
905
906
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 903

def get_subscriber_info_for_opened_campaign(campaign_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_subscriber_info_for_opened_campaign_with_http_info(campaign_id, subscriber_hash, opts)
  data
end

#get_subscriber_info_for_opened_campaign_with_http_info(campaign_id, subscriber_hash, opts = {}) ⇒ Array<(OpenActivity, Fixnum, Hash)>

Get information about a specific subscriber who opened a campaign Get information about a specific subscriber who opened a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(OpenActivity, Fixnum, Hash)>)

    OpenActivity data, response status code and response headers



916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 916

def get_subscriber_info_for_opened_campaign_with_http_info(campaign_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/open-details/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OpenActivity')
  return data, status_code, headers
end

#get_subscriber_info_with_http_info(campaign_id, link_id, subscriber_hash, opts = {}) ⇒ Array<(ClickDetailMember, Fixnum, Hash)>

Get information about a specific subscriber who clicked a link Get information about a specific subscriber who clicked a link in a specific campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • link_id

    The id for the link.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(ClickDetailMember, Fixnum, Hash)>)

    ClickDetailMember data, response status code and response headers



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 476

def get_subscriber_info_with_http_info(campaign_id, link_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClickDetailMember')
  return data, status_code, headers
end

#get_subscribers_info(campaign_id = {}, link_id = {}, opts = {}) ⇒ ClickDetailMembers

Get information about subscribers who clicked a link Get information about list members who clicked on a specific link in a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • link_id (defaults to: {})

    The id for the link.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (ClickDetailMembers)


405
406
407
408
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 405

def get_subscribers_info(campaign_id = {}, link_id = {}, opts = {})
  data, _status_code, _headers = get_subscribers_info_with_http_info(campaign_id, link_id, opts)
  data
end

#get_subscribers_info_with_http_info(campaign_id, link_id, opts = {}) ⇒ Array<(ClickDetailMembers, Fixnum, Hash)>

Get information about subscribers who clicked a link Get information about list members who clicked on a specific link in a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • link_id

    The id for the link.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

  • (Array<(ClickDetailMembers, Fixnum, Hash)>)

    ClickDetailMembers data, response status code and response headers



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 420

def get_subscribers_info_with_http_info(campaign_id, link_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ClickDetailMembers')
  return data, status_code, headers
end

#get_unsubscribed_list_for_campaign(campaign_id = {}, opts = {}) ⇒ Unsubscribes

Get unsubscribed list members Get information about members who have unsubscribed from a specific campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (Unsubscribes)


1114
1115
1116
1117
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1114

def get_unsubscribed_list_for_campaign(campaign_id = {}, opts = {})
  data, _status_code, _headers = get_unsubscribed_list_for_campaign_with_http_info(campaign_id, opts)
  data
end

#get_unsubscribed_list_for_campaign_with_http_info(campaign_id, opts = {}) ⇒ Array<(Unsubscribes, Fixnum, Hash)>

Get unsubscribed list members Get information about members who have unsubscribed from a specific campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

  • (Array<(Unsubscribes, Fixnum, Hash)>)

    Unsubscribes data, response status code and response headers



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1128

def get_unsubscribed_list_for_campaign_with_http_info(campaign_id, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/unsubscribed'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Unsubscribes')
  return data, status_code, headers
end

#get_unsubscribed_list_member(campaign_id = {}, subscriber_hash = {}, opts = {}) ⇒ Unsubscribes

Get information about a specific list member who unsubscribed Get information about a specific list member who unsubscribed from a campaign.

Parameters:

  • campaign_id (defaults to: {})

    The unique id for the campaign.

  • subscriber_hash (defaults to: {})

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Unsubscribes)


1169
1170
1171
1172
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1169

def get_unsubscribed_list_member(campaign_id = {}, subscriber_hash = {}, opts = {})
  data, _status_code, _headers = get_unsubscribed_list_member_with_http_info(campaign_id, subscriber_hash, opts)
  data
end

#get_unsubscribed_list_member_with_http_info(campaign_id, subscriber_hash, opts = {}) ⇒ Array<(Unsubscribes, Fixnum, Hash)>

Get information about a specific list member who unsubscribed Get information about a specific list member who unsubscribed from a campaign.

Parameters:

  • campaign_id

    The unique id for the campaign.

  • subscriber_hash

    The MD5 hash of the lowercase version of the list member&#39;s email address.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (Array<(Unsubscribes, Fixnum, Hash)>)

    Unsubscribes data, response status code and response headers



1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/MailchimpMarketing/api/reports_api.rb', line 1182

def get_unsubscribed_list_member_with_http_info(campaign_id, subscriber_hash, opts = {})
  # resource path
  local_var_path = '/reports/{campaign_id}/unsubscribed/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Unsubscribes')
  return data, status_code, headers
end