Returns all the newsletter lists.
Admin SDKAdmin.api('site.newsletter-lists.find', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.find
{
"conditions" : {
"after" : 10 // … with identifier after this value - int(0…)
},
"language" : "en", // language ( ISO code ) of the texts to return - string(2)
"fields" : [ "id", "name", … ], // fields to return - string
"order" : [ "name" ], // sort order of returned newsletter lists, can contain "id", "-id", "name" and "-name" - string
"limit" : 10, // maximum number of newsletter lists to return - int(1…)
"first" : 30 // index of the first newsletter list to return - int(0…)
}
{
"status" : "ok",
"lists" : [ {
"id" : 5, // identifier - int(1…)
"name" : { // name - string(2) -> string(0…80)
"en" : "Special offers",
"it" : "Offerte speciali"
},
"description" : { // description - string(2) -> string(0…255)
"en" : "All the special offers of the week",
"it" : "Tutte le offerte speciali della settimana"
}
}, … ]
}
Returns a newsletter list given its identifier.
Admin SDKAdmin.api('site.newsletter-lists.get', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.get
{
"id" : 5, // identifier of the newsletter list (required) - int(1…)
"language" : "en", // language ( ISO code ) of the texts to return - string(2)
"fields" : [ "id", "name", … ] // fields to return - string
}
{
"status" : "ok",
"list" : { // (can be null)
"id" : 5, // identifier - int(1…)
"name" : { // name - string(2) -> string(0…80)
"en" : "Special offers",
"it" : "Offerte speciali"
},
"description" : { // description - string(2) -> string(0…255)
"en" : "All the special offers of the week",
"it" : "Tutte le offerte speciali della settimana"
}
}
}
Total number of newsletter lists.
Admin SDKAdmin.api('site.newsletter-lists.count', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.count
{
"status" : "ok",
"count" : 7 // number of newsletter lists - int(0…)
}
Creates a new newsletter list.
Admin SDKAdmin.api('site.newsletter-lists.create', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.create
{
"list" : {
"name" : { // name - string(2) -> string(0…80)
"en" : "Special offers",
"it" : "Offerte speciali"
},
"description" : { // description - string(2) -> string(0…255)
"en" : "All the special offers of the week",
"it" : "Tutte le offerte speciali della settimana"
}
}
}
{
"status" : "ok",
"id" : 12 // identifier of the new newsletter list - int(1…)
}
Updates a newsletter list. Any fields left out of the request will remain unchanged.
Admin SDKAdmin.api('site.newsletter-lists.update', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.update
{
"id" : 12, // identifier of the newsletter list to update
"list" : {
"name" : { // name - string(2) -> string(0…80)
"en" : "Special offers",
"it" : "Offerte speciali"
},
"description" : { // description - string(2) -> string(0…255)
"en" : "All the special offers of the week",
"it" : "Tutte le offerte speciali della settimana"
}
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
id | NotFound | Newsletter list <id> does not exist |
Deletes one o more newsletter lists.
Admin SDKAdmin.api('site.newsletter-lists.delete', request, function(response) { … });
HTTP POST/api/v10/site.newsletter-lists.delete
{
"ids" : [ 12, 7, … ] // identifiers of the newsletter lists to delete (required) - int(1…)
}
{
"status" : "ok"
}