orders

orders.find

Returns the orders that meet the given conditions.

JS
CR.api('commerce.orders.find', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.find

request

{
  "conditions" : { // returns only the orders …
    "ids" : [ "7610463981035642981", … ], // … with these identifiers - bigint(1…)
    "status" : [ "New", … ], // … with these statuses, a status can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "isPaidFor" : true, // … paid for or not paid for - bool
    "fromNumber" : "7890", // … with a number greater or equal to this - string(1…32)
    "toNumber" : "8152", // … with a number lower or equal to this - string(1…32)
    "fromCreationTime" : "2013-09-01 12:00:00", // … with creation time equal or next to this - datetime
    "toCreationTime" : "2013-12-31 23:59:59", // … with creation time equal or previous to this - datetime
    "fromUpdateTime" : "2013-07-01 12:00:00", // … with last update time equal or previous to this - datetime
    "toUpdateTime" : "2013-08-31 23:59:59", // … with last update time equal or next to this - datetime
    "customer" : 4907, // … of this customer (id) - int(1…)
    "address" : "Baker Street" // … with this phrase in the address  - string(1…30)
  },
  "fields" : [ "id", "number", "status", … ], // returns only these fields - string
  "order" : [ "creationTime" ], // sort order of returned orders, can contain "id", "-id", "number", "-number", "status", "-status",
                                // "creationTime", "-creationTime", "updateTime", "-updateTime", "total", "-total",
                                // "taxedTotal", "-taxedTotal", "isPaidFor", "-isPaidFor", "customerName" and "-customerName" - string
  "limit" : 10, // maximum number of orders to return - int(1…100)
  "first" : 0 // index of the first order to return - int(0…)
}

response

{
  "status" : "ok",
  "orders" : [ {
    "id" : "7610463981035642981", // identifier - bigint(1…)
    "number" : "90471", // number - string(0…32)
    "status" : "Open", // status, can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "creationTime": "2013-09-01 13:13:47", // creation time - datetime
    "updateTime" : "2013-09-02 16:08:11", // last update time - datetime
    "referenceNumber" : "700251", // reference number - string(0…32)
    "customer" : 4907, // customer (id) (can be null) - int(1…)
    "rounding" : { // rounding
      "mode" : "HalfUp", // mode, can be "Down", "HalfDown", "HalfEven" or "HalfUp" - string
      "rule" : "PerItem" // rule, can be "PerItem", "PerLine" or "Total" - string
    },
    "locale" : "en-GB", // locale (ISO code) of the customer, region is not mandatory - string(2…5)
    "taxArea" : 7, // tax area (id) used for tax calculations - int(1…)
    "items" : [ { // items
      "sku" : "A927TP", // SKU - string(0…32)
      "name" : "Shirt", // name - string(0…255)
      "quantity" : 3.00, // quantity - decimal[8,2](0…)
      "price" : 56.330, // price (excluded taxes) - decimal[10,3]
      "totalPrice" : 168.99, // total price (excluded taxes) - decimal[10,2]
      "weight" : 0.450, // weight - decimal[8,3](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "VAT", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 112.66, // tax amount - decimal[10,2]
      "requests" : "..." // customer requests - string(0…255)
    }, … ],
    "coupon" : "PROMO", // coupon code - string(0…32)
    "prediscountSubtotal" : 69.54, // prediscount subtotal - decimal[10,2]
    "taxedPrediscountSubtotal" : 110.89, // prediscount subtotal, tax included - decimal[10,2]
    "discountAmount" : 0.000, // discount amount - decimal[8,3](0…)
    "discountPercent" : 15.340, // discount percent - decimal[5,3](0…)
    "subtotal" : 69.54, // subtotal - decimal[10,2]
    "taxedSubtotal" : 110.89, // subtotal, tax included - decimal[10,2]
    "shippingMethod" : { // shipping method (can be null)
      "id" : 14, // identifier - int(1…)
      "name" : "FedEx", // name - string(0…80)
      "cost" : 8.57, // cost - decimal[8,2](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "TVA", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 1.63 // tax amount - decimal[8,2](0…)
    },
    "paymentMethod" : { // payment method (can be null)
      "id" : 3, // identifier - int(1…)
      "name" : "Credit Card", // name - string(0…80)
      "cost" : 1.20, // cost (fee) - decimal[8,2](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "TVA", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 0.23 // tax amount - decimal[8,2](0…)
    },
    "taxAmount" : 31.25, // tax amount - decimal[10,2]
    "total" : 89.23, // total - decimal[10,2]
    "taxedTotal" : 120.48, // total, tax included - decimal[10,2]
    "isPaidFor" : true, // indicates if it is paid for - bool
    "quantity" : 7.00, // total number of items quantity - decimal[10,2](0…)
    "weight" : 1.351, // total weight of items - decimal[8,3](0…)
    "customerName" : "Investigations Inc", // customer's name - string(1…100)
    "billingAddress" : { // billing address
      "firstName" : "Sherlock", // first name - string(1…25)
      "lastName" : "Holmes", // last name - string(1…25)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "companyCode2" : "7J BA3 006", // second company code number - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(1…25)
      "postalCode" : "NW1 6XE", // postal code - string(1…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(3…120)
    },
    "shippingAddress" : { // shipping address (can be null)
      "name" : "John", // recipient name - string(1…100)
      "street1" : "221b Baker Street", // street, first row - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(1…25)
      "postalCode" : "NW1 6XE", // postal code - string(1…20)
      "stateProv" : "LND", // province, state or county - string(0…3)
      "country" : "GB" // country (ISO code) - string(2)
    },
    "sellerAddress" : { // seller address
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(0…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(0…25)
      "postalCode" : "NW1 6XE", // postal code - string(0…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(0…2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(0…120)
    },
    "requests" : "", // Customer requests - string(0…65535)
    "terms" : "" // Terms and conditions - string(0…65535)
  }, … ]
}

orders.get

Returns an order given its identifier.

JS
CR.api('commerce.orders.get', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.get

request

{
  "id" : "7610463981035642981", // identifier (required) - bigint(1…)
  "fields" : [ "id", "number", "status", … ] // fields to return - string
}

response

{
  "status" : "ok",
  "order"  : { // (can be null)
    "id" : "7610463981035642981", // identifier - bigint(1…)
    "number" : "90471", // number - string(0…32)
    "status" : "Open", // status, can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "creationTime": "2013-09-01 13:13:47", // creation time - datetime
    "updateTime" : "2013-09-02 16:08:11", // last update time - datetime
    "referenceNumber" : "700251", // reference number - string(0…32)
    "customer" : 4907, // customer (id) (can be null) - int(1…)
    "rounding" : { // rounding
      "mode" : "HalfUp", // mode, can be "Down", "HalfDown", "HalfEven" or "HalfUp" - string
      "rule" : "PerItem" // rule, can be "PerItem", "PerLine" or "Total" - string
    },
    "locale" : "en-GB", // locale (ISO code) of the customer, region is not mandatory - string(2…5)
    "taxArea" : 7, // tax area (id) used for tax calculations - int(1…)
    "items" : [ { // items
      "sku" : "A927TP", // SKU - string(0…32)
      "name" : "Shirt", // name - string(0…255)
      "quantity" : 3.00, // quantity - decimal[8,2](0…)
      "price" : 56.330, // price (excluded taxes) - decimal[10,3]
      "totalPrice" : 168.99, // total price (excluded taxes) - decimal[10,2]
      "weight" : 0.450, // weight - decimal[8,3](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "VAT", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 112.66, // tax amount - decimal[10,2]
      "requests" : "..." // customer requests - string(0…255)
    }, … ],
    "coupon" : "PROMO", // coupon code - string(0…32)
    "prediscountSubtotal" : 69.54, // prediscount subtotal - decimal[10,2]
    "taxedPrediscountSubtotal" : 110.89, // prediscount subtotal, tax included - decimal[10,2]
    "discountAmount" : 0.000, // discount amount - decimal[8,3](0…)
    "discountPercent" : 15.340, // discount percent - decimal[5,3](0…)
    "subtotal" : 69.54, // subtotal - decimal[10,2]
    "taxedSubtotal" : 110.89, // subtotal, tax included - decimal[10,2]
    "shippingMethod" : { // shipping method (can be null)
      "id" : 14, // identifier - int(1…)
      "name" : "FedEx", // name - string(0…80)
      "cost" : 8.57, // cost - decimal[8,2](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "TVA", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 1.63 // tax amount - decimal[8,2](0…)
    },
    "paymentMethod" : { // payment method (can be null)
      "id" : 3, // identifier - int(1…)
      "name" : "Credit Card", // name - string(0…80)
      "cost" : 1.20, // cost (fee) - decimal[8,2](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "taxCode" : "TVA", // tax code - string(0…32)
      "taxRate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxAmount" : 0.23 // tax amount - decimal[8,2](0…)
    },
    "taxAmount" : 31.25, // tax amount - decimal[10,2]
    "total" : 89.23, // total - decimal[10,2]
    "taxedTotal" : 120.48, // total, tax included - decimal[10,2]
    "isPaidFor" : true, // indicates if it is paid for - bool
    "quantity" : 7.00, // total number of items quantity - decimal[10,2](0…)
    "weight" : 1.351, // total weight of items - decimal[8,3](0…)
    "customerName" : "Investigations Inc", // customer's name - string(1…100)
    "billingAddress" : { // billing address
      "firstName" : "Sherlock", // first name - string(1…25)
      "lastName" : "Holmes", // last name - string(1…25)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "companyCode2" : "7J BA3 006", // second company code number - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(1…25)
      "postalCode" : "NW1 6XE", // postal code - string(1…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(3…120)
    },
    "shippingAddress" : { // shipping address (can be null)
      "name" : "John", // recipient name - string(1…100)
      "street1" : "221b Baker Street", // street, first row - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(1…25)
      "postalCode" : "NW1 6XE", // postal code - string(1…20)
      "stateProv" : "LND", // province, state or county - string(0…3)
      "country" : "GB" // country (ISO code) - string(2)
    },
    "sellerAddress" : { // seller address
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(0…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(0…25)
      "postalCode" : "NW1 6XE", // postal code - string(0…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(0…2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(0…120)
    },
    "requests" : "", // Customer requests - string(0…65535)
    "terms" : "" // Terms and conditions - string(0…65535)
  }
}

orders.count

Number of orders that meet the given conditions.

JS
CR.api('commerce.orders.count', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.count

request

{
  "conditions" : { // counts the orders …
    "ids" : [ "7610463981035642981", … ], // … with these identifiers - bigint(1…)
    "status" : [ "New", … ], // … with these statuses, a status can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "isPaidFor" : true, // … paid for or not paid for - bool
    "fromNumber" : "7890", // … with a number greater or equal to this - string(1…32)
    "toNumber" : "8152", // … with a number lower or equal to this - string(1…32)
    "fromCreationTime" : "2013-09-01 12:00:00", // … with creation time equal or next to this - datetime
    "toCreationTime" : "2013-12-31 23:59:59", // … with creation time equal or previous to this - datetime
    "fromUpdateTime" : "2013-07-01 12:00:00", // … with last update time equal or previous to this - datetime
    "toUpdateTime" : "2013-08-31 23:59:59", // … with last update time equal or next to this - datetime
    "customer" : 4907, // … of this customer (id) - int(1…)
    "address" : "Baker Street" // … with this phrase in the address  - string(1…30)
  }
}

response

{
  "status" : "ok",
  "count"  : 5470 // number of orders - int(0…)
}

orders.create

Creates a new order.

JS
CR.api('commerce.orders.create', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.create

request

{
  "order" : { // order to create (required)
    "number" : "2011/5613", // number, if empty it takes the next order number - string(1…32)
    "status" : "Open", // status, can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "creationTime" : "2013-09-01 12:00:00", // creation time, if empty it takes the current time - datetime
    "referenceNumber" : "2013/7301", // reference number - string(0…32)
    "customer" : 4907, // customer (id) (can be null) - int(1…)
    "rounding" : { // rounding
      "mode" : "HalfUp", // mode, can be "Down", "HalfDown", "HalfEven" or "HalfUp" - string
      "rule" : "PerItem" // rule, can be "PerItem", "PerLine" or "Total" - string
    },
    "locale" : "en-GB", // locale (ISO code) of the customer, region is not mandatory - string(2…5)
    "coupon" : "PROMO", // coupon code - string(0…32)
    "items" : [ { // items
      "sku" : "A927TP", // SKU - string(0…32)
      "name" : "Shirt", // name - string(0…255)
      "quantity" : 3.00, // quantity - decimal[8,2](0…)
      "price" : 56.330, // price (excluded taxes) - decimal[10,3]
      "weight" : 0.450, // weight - decimal[8,3](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "requests" : "…" // customer requests - string(0…255)
    }, … ],
    "discountAmount" : 0.000, // discount amount - decimal[8,3](0…) 
    "discountPercent" : 5.200, // discount percent - decimal[5,3](0…)
    "shippingMethod" : 3, // shipping method (id) (can be null) - int(1…)
    "paymentMethod" : 8, // payment method (id) (can be null) - int(1…)
    "isPaidFor" : true, // indicates if it is paid for - bool
    "billingAddress" : { // billing address (required)
      "firstName" : "Sherlock", // first name (required) - string(1…25)
      "lastName" : "Holmes", // last name (required) - string(1…25)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "companyCode2" : "7J BA3 006", // second company code number - string(0…20)
      "street1" : "221b Baker Street", // street, first row (required) - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city  (required) - string(1…25)
      "postalCode" : "NW1 6XE", // postal code (required) - string(1…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) (required) - string(2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address (required) - string(3…120)
    },
    "shippingAddress" : { // shipping address (can be null)
      "name" : "John", // recipient name (required) - string(1…100)
      "street1" : "221b Baker Street", // street, first row (required) - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city (required) - string(1…25)
      "postalCode" : "NW1 6XE", // postal code (required) - string(1…20)
      "stateProv" : "LND", // province, state or county - string(0…3)
      "country" : "GB" // country (ISO code) (required) - string(2)
    },
    "sellerAddress" : { // seller address
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(0…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(0…25)
      "postalCode" : "NW1 6XE", // postal code - string(0…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(0…2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(0…120)
    },
    "requests" : "…", // customer requests - string(0…65535)
    "terms" : "…" // terms and conditions - string(0…65535)    
  }
}

response

{
  "status" : "ok",
  "id" : "7610463981035642981" // identifier of the new order - bigint(1…)
}

Errors

Field Type Description
country InvalidValue No tax areas for country '<country>'
creationTime InvalidValue Creation time '<creationTime>' is in the future
customer NotFound Customer <customer> does not exist
discountAmount InvalidCombination Discount amount and percent can not both be positive
discountAmount InvalidValue Discount amount must be greater than or equal to prediscount subtotal
discountAmount InvalidValue No discount can be applied if total is negative
discountPercent InvalidValue No discount can be applied if total is negative
locale Malformed '<locale>' is not a valid locale code
paymentMethod InvalidValue No payment methods can be used if total is zero or negative
paymentMethod NotFound Payment method <paymentMethod> does not exist
paymentMethod InvalidValue Payment method <paymentMethod> can not be used in combination with shipping method <shippingMethod>
paymentMethod InvalidValue Payment method <paymentMethod> is not suitable for this order
shippingMethod NotFound Shipping method <shippingMethod> does not exist
shippingMethod InvalidValue Shipping method <shippingMethod> is not suitable for this order
shippingMethod MissingCombination Shipping method is required because the payment method is on delivery
taxClass NotFound Tax class <taxClass> does not exist

Notes

orders.update

Updates an order. Any fields left out of the request will remain unchanged.

JS
CR.api('commerce.orders.update', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.update

request

{
  "id" : "7610463981035642981", // identifier of the order to update (required) - bigint(1…)
  "order" : { // order's fields to update (required)
    "number" : "2013/5613", // number - string(1…32)
    "status" : "Open", // status, can be "New", "Open", "Ready", "Shipped", "Delivered", "Completed" or "Cancelled" - string
    "referenceNumber" : "2013/7301", // Reference number - string(0…32)
    "customer" : 4907, // customer (id) (can be null) - int(1…)
    "rounding" : { // rounding
      "mode" : "HalfUp",  // mode, can be "Down", "HalfDown", "HalfEven" or "HalfUp" - string
      "rule" : "PerItem"  // rule, can be "PerItem", "PerLine" or "Total" - string
    },
    "locale" : "en-GB", // locale (ISO code) of the customer, region is not mandatory - string(2…5)
    "coupon" : "PROMO", // coupon code - string(0…32)
    "items" : [ { // items
      "sku" : "A927TP", // SKU - string(0…32)
      "name" : "Shirt", // name - string(0…255)
      "quantity" : 3.00, // quantity - decimal[8,2](0…)
      "price" : 56.330, // price (excluded taxes) - decimal[10,3]
      "weight" : 0.450, // weight - decimal[8,3](0…)
      "taxClass" : 2, // tax class (id) (can be null) - int(1…)
      "requests" : "…" // customer requests - string(0…255)
    }, … ],
    "discountAmount" : 0.000, // discount amount - decimal[8,3](0…)
    "discountPercent" : 15.340, // discount percent - decimal[5,3](0…)
    "shippingMethod" : 5, // shipping method (id) (can be null) - int(1…)
    "paymentMethod" : 3, // payment method (id) (can be null) - int(1…)
    "isPaidFor" : true, // indicates if it is paid for - bool
    "billingAddress" : { // billing address
      "firstName" : "Sherlock", // first name (required) - string(1…25)
      "lastName" : "Holmes", // last name (required) - string(1…25)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "companyCode2" : "7J BA3 006", // second company code number - string(0…20)
      "street1" : "221b Baker Street", // street, first row (required) - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city  (required) - string(1…25)
      "postalCode" : "NW1 6XE", // postal code (required) - string(1…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) (required) - string(2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address (required) - string(3…120)
    },
    "shippingAddress" : { // shipping address (can be null)
      "name" : "John", // recipient name (required) - string(1…100)
      "street1" : "221b Baker Street", // street, first row (required) - string(1…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city (required) - string(1…25)
      "postalCode" : "NW1 6XE", // postal code (required) - string(1…20)
      "stateProv" : "LND", // province, state or county - string(0…3)
      "country" : "GB" // country (ISO code) (required) - string(2)
    },
    "sellerAddress" : { // seller address
      "companyName" : "Investigations Inc", // company name - string(0…100)
      "companyCode" : "INV8403MC1", // company code number - string(0…20)
      "personalCode" : "SH239IBA", // personal code - string(0…20)
      "street1" : "221b Baker Street", // street, first row - string(0…60)
      "street2" : "", // street, second row - string(0…60)
      "city" : "London", // city - string(0…25)
      "postalCode" : "NW1 6XE", // postal code - string(0…20)
      "stateProv" : "LND", // state, province or county - string(0…3)
      "country" : "GB", // country (ISO code) - string(0…2)
      "phoneNumber" : "+44+207 2243688", // phone number - string(0…15)
      "mobileNumber" : "", // mobile number - string(0…15)
      "faxNumber" : "", // fax number - string(0…15)
      "email" : "holmes@inv-london.com" // email address - string(0…120)
    },
    "requests" : "…", // customer requests - string(0…65535)
    "terms" : "…" // terms and conditions - string(0…65535)
  }
}

response

{
  "status" : "ok"
}

Errors

Field Type Description
country InvalidValue No tax areas for country '<country>'
creationTime InvalidValue Creation time '<creationTime>' is in the future
customer NotFound Customer <customer> does not exist
discountAmount InvalidCombination Discount amount and percent can not both be positive
discountAmount InvalidValue Discount amount must be greater than or equal to prediscount subtotal
discountAmount InvalidValue No discount can be applied if total is negative
discountPercent InvalidValue No discount can be applied if total is negative
id NotFound Order <id> does not exist
locale Malformed '<locale>' is not a valid locale code
paymentMethod InvalidValue No payment methods can be used if total is zero or negative
paymentMethod NotFound Payment method <paymentMethod> does not exist
paymentMethod InvalidValue Payment method <paymentMethod> can not be used in combination with shipping method <shippingMethod>
paymentMethod InvalidValue Payment method <paymentMethod> is not suitable for this order
shippingMethod NotFound Shipping method <shippingMethod> does not exist
shippingMethod InvalidValue Shipping method <shippingMethod> is not suitable for this order
shippingMethod MissingCombination Shipping method is required because the payment method is on delivery
taxClass NotFound Tax class <taxClass> does not exist

orders.delete

Deletes one or more orders.

JS
CR.api('commerce.orders.delete', request, function(response) { … });
HTTP
POST /open2b/api/v3/commerce.orders.delete

request

{
  "ids" : [ "7610463981035642981", … ] // identifiers of the orders to delete (required) - bigint(1…)
}

response

{
  "status" : "ok"
}