We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I am trying to get campaign ID from newsletter to retrieve statistics. But newsletter data does not include campaign ID.
How can I get campaign ID? Am I missing something?
Thanks!
Here is my code :
create_newsletter_param = { Locale: "ja_JP", Sender: "Me", SenderEmail: "test@mydomain.com", Subject: "test mail", ContactsListID: 1234, Title: "Test campaign" } newsletter = Mailjet::Newsletter.create(create_newsletter_param) => #<Mailjet::Newsletter:0x007f6e1cd36170 @attributes= {"persisted"=>false, "Locale"=>"ja_JP", "Sender"=>"Me", "SenderEmail"=>"test@mydomain.com", "Subject"=>"test mail", "ContactsListID"=>1234, "Title"=>"Test campaign", "ax_fraction"=>0, "ax_fraction_name"=>"", "callback"=>"", "contacts_list_id"=>1234, "created_at"=>Tue, 19 Apr 2016 04:46:36 +0000, "delivered_at"=>"", "edit_mode"=>"tool", "edit_type"=>"full", "footer"=>"default", "footer_address"=>"", "footer_wysiwyg_type"=>0, "header_filename"=>"", "header_link"=>"", "header_text"=>"", "header_url"=>"", "id"=>20045, "ip"=>"", "is_handled"=>false, "is_starred"=>false, "is_text_part_included"=>false, "locale"=>"ja_JP", "modified_at"=>"", "permalink"=>"default", "permalink_host"=>"", "permalink_wysiwyg_type"=>0, "politeness_mode"=>0, "sender"=>"Me", "sender_email"=>"test@mydomain.com", "sender_name"=>"", "status"=>0, "subject"=>"test mail", "test_address"=>"", "title"=>"Test campaign", "url"=>""}, @persisted=true>
The text was updated successfully, but these errors were encountered:
Hey @hirokipf !
You can get a campaignID associated with the newsletter by making a GET campaign/mj.nl=<newsletter id> call.
GET campaign/mj.nl=<newsletter id>
With this ruby client, you will have to do it like this for instance:
campaign = Mailjet::Campaign.find('mj.nl=20160') p campaign
Sorry, something went wrong.
It worked!! Thanks for the quick reply!
No branches or pull requests
Hello,
I am trying to get campaign ID from newsletter to retrieve statistics.
But newsletter data does not include campaign ID.
How can I get campaign ID?
Am I missing something?
Thanks!
Here is my code :
The text was updated successfully, but these errors were encountered: