newsletter-lists

newsletter-lists.find

Returns all the newsletter lists.

Request

Admin SDK
Admin.api('site.newsletter-lists.find', request, function(response) { … });
HTTP POST
/api/v7/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…)
}

Response

{
  "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"
    }
  }, … ]
}

newsletter-lists.get

Returns a newsletter list given its identifier.

Request

Admin SDK
Admin.api('site.newsletter-lists.get', request, function(response) { … });
HTTP POST
/api/v7/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
}

Response

{
  "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"
    }
  }
}

newsletter-lists.count

Total number of newsletter lists.

Request

Admin SDK
Admin.api('site.newsletter-lists.count', request, function(response) { … });
HTTP POST
/api/v7/site.newsletter-lists.count

Response

{
  "status" : "ok",
  "count" : 7 // number of newsletter lists - int(0…)
}

newsletter-lists.create

Creates a new newsletter list.

Request

Admin SDK
Admin.api('site.newsletter-lists.create', request, function(response) { … });
HTTP POST
/api/v7/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"
    }
  }
}

Response

{
  "status" : "ok",
  "id" : 12 // identifier of the new newsletter list - int(1…)
}

newsletter-lists.update

Updates a newsletter list. Any fields left out of the request will remain unchanged.

Request

Admin SDK
Admin.api('site.newsletter-lists.update', request, function(response) { … });
HTTP POST
/api/v7/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"
    }
  }
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
id NotFound Newsletter list <id> does not exist

newsletter-lists.delete

Deletes one o more newsletter lists.

Request

Admin SDK
Admin.api('site.newsletter-lists.delete', request, function(response) { … });
HTTP POST
/api/v7/site.newsletter-lists.delete
{
  "ids" : [ 12, 7, … ] // identifiers of the newsletter lists to delete (required) - int(1…)
}

Response

{
  "status" : "ok"
}
Quanto ti è stata utile questa pagina?

Grazie per averci aiutato a migliorare questa pagina