newsletter-members

newsletter-members.find

Returns the members that meet the given conditions.

JS
CR.api('site.newsletter-members.find', request, function(response) { … });
HTTP
POST /open2b/api/v3/site.newsletter-members.find

request


  {
  "conditions" : { // returns the members …
    "list" : 5, // … of this newsletter list (id) - int(1…)
    "email" : "info@acme.com", // … with this email - string(3…100)
    "domain" : "acme.com", // … with this domain name - string(1…98)
    "ip" : "172.16.254.1" // … with this IP address - string(7…15)
  },
  "fields" : [ "list", "email", … ], // fields to return - string
  "order" : [ "name" ], // sort order of returned newsletter members, can contain "list", "-list", "email", "-email", "ip", "-ip",
                        // "creationTime" and "-creationTime" - string
  "limit" : 10, // maximum number of newsletter members to return - int(1…100)
  "first" : 30 // index of the first newsletter member to return - int(0…)
}

response

{
  "status" : "ok",
  "members" : [ {
    "list" : 5, // newsletter list (id) - int(1…)
    "email" : "info@acme.com", // email address - string(3…100)
    "ip" : "172.16.254.1", // IP address (can be null) - string(7…15)
    "creationTime" : "2013-09-14 09:29:12" // creation time - datetime
  }, … ]
}

newsletter-members.count

Number of members that meet the given conditions.

JS
CR.api('site.newsletter-members.count', request, function(response) { … });
HTTP
POST /open2b/api/v3/site.newsletter-members.count

request

{
  "conditions" : { // counts the members …
    "list" : 5, // … of this newsletter list (id) - int(1…)
    "email" : "info@acme.com", // … with this email - string(3…100)
    "domain" : "acme.com", // … with this domain name - string(1…98)
    "ip" : "172.16.254.1" // … with this IP address - string(7…15)
  }
}

response

{
  "status" : "ok",
  "count" : 349056 // number of members - int(0…)
}

newsletter-members.create

Creates one o more members in one or more lists.

JS
CR.api('site.newsletter-members.create', request, function(response) { … });
HTTP
POST /open2b/api/v3/site.newsletter-members.create

request

{
  "members" : [ { // members to create (required)
    "email" : "info@acme.com", // email address (required) - string(3…100)
    "ip" : "172.16.254.1" // IP address (can be null) - string(7…15)
  }, … ],
  "lists" : [ 5, 9, … ] // newsletter lists (id) in which create the members (required) - int(1…)
}

response

{
  "status" : "ok"
}

Errors

Field Type Description
emails InvalidValue '<email>' is not a well formed email address
lists NotFound Newsletter list <list> does not exist

newsletter-members.delete

Deletes one o more members from one or more lists.

JS
CR.api('site.newsletter-members.delete', request, function(response) { … });
HTTP
POST /open2b/api/v3/site.newsletter-members.delete

request

{
  "emails" : [ "info@acme.com", … ], // emails of the members to delete (required) - string(3…100)
  "lists" : [ 5, 9, … ] // newsletter lists (id) from which delete the members (required) - int(1…)
}

response

{
  "status" : "ok"
}

Errors

Field Type Description
emails InvalidValue '<email>' is not a well formed email address
lists NotFound Newsletter list <list> does not exist