Skip to content
New issue

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

There is no way to create email campaigns with current endpoints #19

Open
nestorvc opened this issue Jul 6, 2015 · 1 comment
Open

Comments

@nestorvc
Copy link

nestorvc commented Jul 6, 2015

Right now there is no easy way to achieve creating custom email campaigns as described on the official Emarsys docs: https://dev.emarsys.com/suite/emails/email_create.html This is pretty helpful in many ways, such as creating custom content for dynamic newsletters.

I think it can be resolved as simple as this on the following file /api/endpoints/email/index.js adding this code:

/**
 * new
 * Creates a new email campaign with custom data
 * customerId<String>: the customer id
 * options<Object>: as seen on https://dev.emarsys.com/suite/emails/email_create.html
 * returns: <Object>
 * Example:
 * {
 *  "replyCode": 0,
 *  "replyText": "OK",
 *  "data":
 *  {
 *    "id": 2140
 *  }
 *}
 */
Email.prototype.new = function(customerId, options) {
  logger.log('email_new');
  return this._request.post(customerId, '/email', options);
};
@gergelyke
Copy link
Contributor

Hi @nestorvc,

currently we are working on the v3 of the sdk, and will be done with that in a couple of days. After that feel free to fork the project and add this functionality. We are happy to merge it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants