Returns all the producers.
Admin SDKAdmin.api('commerce.producers.find', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.find
{
"conditions" : { // returns only the producers …
"ids" : [ 91, 27, … ], // … with these identifiers - int(1…)
"after" : 39 // … with identifier after this - int(0…)
},
"language" : "en", // language ( ISO code ) of the texts to return - string(2)
"fields" : [ "id", "code", … ], // fields to return - string
"order" : [ "name" ], // sort order of returned producers, can contain "id", "-id", "code", "-code", "name" and "-name" - string
"limit" : 10, // maximum number of producers to return - int(1…)
"first" : 30 // index of the first producer to return - int(0…)
}
{
"status" : "ok",
"producers" : [ {
"id" : 39, // identifier - int(1…)
"code" : "NIKE", // code - string(0…32)
"name" : "Nike", // name - string(0…60)
"description" : { // description - string(2) -> string(0…65535)
"en" : "…",
"it" : "…",
…
},
"seoTitle" : { // title for SEO - string(2) -> string(0…255)
"en" : "…",
"it" : "…",
…
},
"seoDescription" : { // description for SEO - string(2) -> string(0…255)
"en" : "…",
"it" : "…",
…
},
"canonicalURL" : { // canonical URL - string(2) -> string(10…)
"en" : "https://www.site.com/acme",
"it" : "https://www.site.com/it/acme",
…
},
"productsLayout" : { // products layout on the producer page
"products" : 12, // number of products per page, can be 0, 12, 24, 36, 48 or 72 - int
"columns" : 4, // columns, can be 1, 2, 3, 4 or 6 - int
"sortOrder" : "-Price", // sort order, can be "Position", "Name", "-Name", "Price", "-Price" or "Date" - string
"imageSize" : "Optimal", // image size, can be "Optimal", Small", "Medium" or "Large" - string
"showDescription" : false // indicates if the description is displayed - bool
},
"logo" : { // logo (can be null)
"url" : "https://...", // url - string(14…)
"width" : 260, // width in pixel - int(1…2500)
"height" : 190 // height in pixel - int(1…2500)
}
}, … ]
}
Returns a producer given its identifier.
Admin SDKAdmin.api('commerce.producers.get', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.get
{
"id" : 39, // identifier of the producer (required) - int(1…)
"language" : "en", // language ( ISO code ) of the texts to return - string(2)
"fields" : [ "id", "code", … ] // fields to return - string
}
{
"status" : "ok",
"producer" : { // (can be null)
"id" : 39, // identifier - int(1…)
"code" : "NIKE", // code - string(0…32)
"name" : "Nike", // name - string(0…60)
"description" : { // description - string(2) -> string(0…65535)
"en" : "…",
"it" : "…",
…
},
"seoTitle" : { // title for SEO - string(2) -> string(0…255)
"en" : "…",
"it" : "…",
…
},
"seoDescription" : { // description for SEO - string(2) -> string(0…255)
"en" : "…",
"it" : "…",
…
},
"canonicalURL" : { // canonical URL - string(2) -> string(10…)
"en" : "https://www.site.com/acme",
"it" : "https://www.site.com/it/acme",
…
},
"productsLayout" : { // products layout on the producer page
"products" : 12, // number of products per page, can be 0, 12, 24, 36, 48 or 72 - int
"columns" : 4, // columns, can be 1, 2, 3, 4 or 6 - int
"sortOrder" : "-Price", // sort order, can be "Position", "Name", "-Name", "Price", "-Price" or "Date" - string
"imageSize" : "Optimal", // image size, can be "Optimal", Small", "Medium" or "Large" - string
"showDescription" : false // indicates if the description is displayed - bool
},
"logo" : { // logo (can be null)
"url" : "https://...", // url - string(14…)
"width" : 260, // width in pixel - int(1…2500)
"height" : 190 // height in pixel - int(1…2500)
}
}
}
Number of producers that meet the given conditions.
Admin SDKAdmin.api('commerce.producers.count', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.count
{
"conditions" : { // counts only the producers …
"ids" : [ 91, 27, … ], // … with these identifiers - int(1…)
"after" : 39 // … with identifier after this - int(0…)
}
}
{
"status" : "ok",
"count" : 73 // number of producers - int(0…)
}
Creates a new producer.
Admin SDKAdmin.api('commerce.producers.create', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.create
{
"producer" : { // producer to create (required)
"code" : "NIKE", // code - string(1…32)
"name" : "Nike", // name - string(0…60)
"productsLayout" : { // products layout on the producer page
"products" : 12, // number of products per page, can be 0, 12, 24, 36, 48 or 72 - int
"columns" : 4, // columns, can be 1, 2, 3, 4 or 6 - int
"sortOrder" : "-Price", // sort order, can be "Position", "Name", "-Name", "Price", "-Price" or "Date" - string
"imageSize" : "Optimal", // image size, can be "Optimal", Small", "Medium" or "Large" - string
"showDescription" : false // indicates if the description is displayed - bool
},
"logo" : { // logo (can be null)
"name": "nike.png", // file name - string(1…255)
"content" : "N3R…zaA==" // content (JPEG, PNG or GIF) encoded in Base64 - string
}
}
}
{
"status" : "ok",
"id" : 39 // identifier of the new producer - int(1…)
}
Field | Type | Description |
---|---|---|
logo | Malformed | File format is not a valid or supported format |
logo | Malformed | Image width and height must be less than 2500 pixels |
Updates a producer. Any fields left out of the request will remain unchanged.
Admin SDKAdmin.api('commerce.producers.update', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.update
{
"id" : 91, // identifier of the producer to update (required)
"producer" : { // producer's fields to update (required)
"code" : "NIKE", // code - string(1…32)
"name" : "Nike", // name - string(0…60)
"productsLayout" : { // products layout on the producer page
"products" : 12, // number of products per page, can be 0, 12, 24, 36, 48 or 72 - int
"columns" : 4, // columns, can be 1, 2, 3, 4 or 6 - int
"sortOrder" : "-Price", // sort order, can be "Position", "Name", "-Name", "Price", "-Price" or "Date" - string
"imageSize" : "Optimal", // image size, can be "Optimal", Small", "Medium" or "Large" - string
"showDescription" : false // indicates if the description is displayed - bool
},
"logo" : { // logo (can be null)
"name": "nike.png", // file name - string(1…255)
"content" : "N3R…zaA==" // content (JPEG, PNG or GIF) encoded in Base64 - string
}
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
id | NotFound | Producer <id> does not exist |
logo | Malformed | File format is not a valid or supported format |
logo | Malformed | Image width and height must be less than 2500 pixels |
Deletes one or more producers.
Admin SDKAdmin.api('commerce.producers.delete', request, function(response) { … });
HTTP POST/api/v10/commerce.producers.delete
{
"ids" : [ 91, 27, … ] // identifiers of the producers to delete (required) - int(1…)
}
{
"status" : "ok"
}