Open2b versione 7.5

order-returns

Returns the order returns given a customer key.

Request

HTTP POST
X-Customer-Key: customer-key
/api/v10/storefront.order-returns
{
  "conditions" : { // returns only the order returns …
    "ids" : [ 2204819357, … ], // … with these identifiers - int(1…)
    "after" : 1279205610 // … with identifier after this value - int(0…)
  },
  "fields" : [ "id", "number", "status", … ], // returns only these fields - string
  "limit" : 10, // maximum number of order returns to return - int(1…)
  "first" : 0 // index of the first order return to return - int(0…)
}

Response

{
  "status" : "ok",
  "orderReturns" : {
    "id" : 2204819357, // identifier - int(1…)
    "number" : "2020/5613", // number - string(0…32)
    "status" : "Pending", // status, can be "Pending", "Approved", "PartiallyApproved", "Rejected" or "Cancelled" - string
    "creationTime" : "2020-10-03 18:34:53", // creation time - datetime
    "updateTime" : "2020-10-04 09:22:18", // update time - datetime
    "locale" : "en-GB", // locale (ISO code) of the customer, region is not mandatory - string(2…5)
    "items" : { // returned items
      "order" : { // item's order
        "id" : 1771949227, // identifier - int(1…)
        "number" : "90471", // number - string(0…32)
        "creationTime" : "2020-09-26 11:54:26", // creation time - datetime
        "roundingMode" : "HalfUp" // rounding mode, can be "Down", "HalfDown", "HalfEven" or "HalfUp" - string
      },
      "approval" : "Pending", // approval status, can be "Pending", "Approved", "Rejected" or "Cancelled" - "Pending"
      "comments" : "Size is too small", // customer comments - string(0…200)
      "reason" : "The size is wrong", // return reason - string(0…120)
      "name" : "Shirt", // item's name - string(0…255)
      "price" : 56.330, // item's original price - decimal[10,3]
      "quantity" : 3.00, // returned quantity - decimal[8,2](0…)
      "sku" : "A927TP", // item's SKU - string(0…40)
      "taxCode" : "VAT", // tax code - string(0…32)
      "taxRate" : 19.00 // tax rate - decimal[4,2](0…)
    }
  }, … ],
  "count" : 2 // total number of order returns that meet the given conditions - int(0…)
}