Returns the return reasons that meet the given conditions.
Admin SDKAdmin.api('commerce.return-reasons.find', request, function(response) { … });
HTTP POST/api/v10/commerce.return-reasons.find
{
"conditions" : { // return only the reasons …
"after" : 6 // … with identifier after this value - int(0…)
}
}
{
"status" : "ok",
"reasons" : [ {
"id" : 7, // identifier - int(1…)
"description" : { // description - string(2) -> string(0…120)
"en" : "Item is defective",
"it" : "Prodotto difettoso"
}
}, … ]
}
Returns a return reason given its identifier.
Admin SDKAdmin.api('commerce.return-reasons.get', request, function(response) { … });
HTTP POST/api/v10/commerce.return-reasons.get
{
"id" : 7 // identifier (required) - int(1…)
}
{
"status" : "ok",
"reason" : { // (can be null)
"id" : 7, // identifier - int(1…)
"description" : { // description - string(2) -> string(0…120)
"en" : "Item is defective",
"it" : "Prodotto difettoso"
}
}
}
Number of return reasons that meet the given conditions.
Admin SDKAdmin.api('commerce.return-reasons.count', request, function(response) { … });
HTTP POST/api/v10/commerce.return-reasons.count
{
"conditions" : { // counts the reasons …
"after" : 6 // … with identifier after this value - int(0…)
}
}
{
"status" : "ok",
"count" : 12 // number of reasons - int(0…)
}
Creates a new return reason.
Admin SDKAdmin.api('commerce.return-reasons.create', request, function(response) { … });
HTTP POST/api/5/commerce.return-reasons.create
{
"reason" : { // reason to create (required)
"description" : { // description - string(2) -> string(0…120)
"en" : "Item is defective",
"it" : "Prodotto difettoso"
}
}
}
{
"status" : "ok",
"id" : 7 // identifier of the new return reason - int(1…)
}
Updates a return reason. Any fields left out of the request will remain unchanged.
Admin SDKAdmin.api('commerce.return-reasons.update', request, function(response) { … });
HTTP POST/api/v10/commerce.return-reasons.update
{
"id" : 7, // identifier of the reason to update (required) - int(1…)
"reason" : { // reason's fields to update (required)
"description" : { // description (required) - string(2) -> string(0…120)
"en" : "Item is defective",
"it" : "Prodotto difettoso"
}
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
id | NotFound | Return reason <id> does not exist |
update | NotAvailable | Return reasons are not available for this installation |
Deletes one or more reasons.
Admin SDKAdmin.api('commerce.return-reasons.delete', request, function(response) { … });
HTTP POST/api/v10/commerce.return-reasons.delete
{
"ids" : [ 7, 12, … ] // identifiers of the return reasons to delete (required) - int(1…)
}
{
"status" : "ok"
}