Returns the movement that meet the given conditions.
Admin SDKAdmin.api('commerce.movements.find', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.find
{
"conditions" : { // returns only the movements …
"sku" : "A927TP", // … with this item SKU - string(1…40)
"fromCreationTime" : "2020-11-01 12:00:00", // … created after this date - datetime
"toCreationTime" : "2020-01-31 23:59:59", // … created before this date - datetime
"keywords" : "shirt", // … with these exact keywords - string(1…100)
"after" : 58913 // … with identifier after this value - int(0…)
},
"fields" : [ "id", "sku", … ], // fields to return - string
"order" : [ "name" ], // sort order of returned movements, can contain "id", "-id", "sku", "-sku", "adjustment", "-adjustment",
// "creationTime", "-creationTime", "description", "-description" - string
"limit" : 10, // maximum number of movements to return - int(1…)
"first" : 0 // index of the first movement to return - int(0…)
}
{
"status" : "ok",
"movements" : [ {
"id" : 58913, // identifier - int(1…)
"sku" : "A927TP", // item SKU - string(1…40)
"adjustment" : "-5.00", // adjustment of the quantity in stock - decimal[11,2]
"creationTime" : "2020-08-01 12:34:50", // creation time - datetime
"description" : "order number 3819" // description - string(0…255)
}, … ]
}
Returns a movement given its identifier.
Admin SDKAdmin.api('commerce.movements.get', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.get
{
"id" : 58913, // identifier of the movement (required) - int(1…)
"fields" : [ "id", "sku", … ] // fields to return - string
}
{
"status" : "ok",
"movement" : { // (can be null)
"id" : 58913, // identifier - int(1…)
"sku" : "A927TP", // item SKU - string(1…40)
"adjustment" : "-5.00", // adjustment of the quantity in stock - decimal[11,2]
"creationTime" : "2020-08-01 12:34:50", // creation time - datetime
"description" : "order number 3819" // description - string(0…255)
}
}
Number of movements that meet the specified conditions.
Admin SDKAdmin.api('commerce.movements.count', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.count
{
"conditions" : { // counts only the movements …
"sku" : "A927TP", // … with this item SKU - string(1…40)
"fromCreationTime" : "2020-11-01 12:00:00", // … created after this date - datetime
"toCreationTime" : "2020-01-31 23:59:59", // … created before this date - datetime
"keywords" : "shirt", // … with these keywords - string(1…100)
"after" : 58913 // … with identifier after this value - int(0…)
}
}
{
"status" : "ok",
"count" : 83028 // number of movements - int(0…)
}
Creates a new movement.
Admin SDKAdmin.api('commerce.movements.create', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.create
{
"movement" : { // movement to create (required)
"sku" : "A927TP", // item SKU (required) - string(1…40)
"adjustment" : "-5.00", // adjustment of the quantity in stock (required) - decimal[11,2]
"description" : "order number 3819" // description - string(0…255)
}
{
{
"status" : "ok",
"id" : 58913 // identifier of the new movement - int(1…)
}
Field | Type | Description |
---|---|---|
sku | NotFound | Item '<sku> ' does not exist |
adjustment | InvalidValue | Adjustment <adjustment> is out of range |
Updates a movement. Any fields left out of the request will remain unchanged.
Admin SDKAdmin.api('commerce.movements.update', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.update
{
"id" : 58913, // identifier of the movement to update (required) - int(1…)
"movement" : { // movement's fields to update (required)
"description" : "order number 3819" // movement's properties to update - string(1…255)
}
}
{
"status" : "ok"
}
Field | Type | Description |
---|---|---|
id | NotFound | Movement <id> does not exist |
Deletes one or more movements.
Admin SDKAdmin.api('commerce.movements.delete', request, function(response) { … });
HTTP POST/api/v10/commerce.movements.delete
{
"ids" : [ 4903, 4097, … ] // identifiers of the movements to delete (required) - int(1…)
}
{
"status" : "ok"
}