Open2b versione 7.5

quotes

Returns the customer's quotes given a customer key.

Request

HTTP POST
X-Customer-Key: customer-key
/api/v10/storefront.quotes
{
  "conditions" : { // returns only the quotes …
    "ids" : [ 1167942543, … ], // … with these identifiers - int(1…)
    "status" : [ "New", … ] // … with one of these statuses, can be "New", "Open", "Sent", "Accepted", "Expired" or "Cancelled" - string
  },
  "fields" : [ "id", "number", "status", … ], // returns only these fields - string
  "limit" : 10, // maximum number of quotes to return - int(1…)
  "first" : 0 // index of the first quote to return - int(0…)
}

Response

{
  "status" : "ok",
  "quotes" : [ {
    "id" : 1167942543, // identifier - int(1…)
    "number" : "2020/7301", // number (can be null) - string(0…32)
    "status" : "Sent", // status, can be "New", "Open", "Sent", "Accepted", "Expired" or "Cancelled" - string
    "creationTime": "2020-10-02 18:31:58", // creation time - datetime
    "creationTime": "2020-10-03 11:19:37", // update time - datetime
    "dueDate" : "2020-11-02", // due date (can be null) - date
    "referenceType" : "Order", // reference type, can be "Order", "Quote", "Invoice", "ShippingInvoice", "Proforma", "CreditNote", "Receipt" or "PackingSlip" (can be null) - string
    "referenceNumber" : "90471", // reference number - string(0…32)
    "token" : "2cca8d0160a82b52a61d36d6ea4e8002", // token - string(32)
    "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)
    "items" : [ { // items
      "sku" : "A927TP", // SKU - string(0…40)
      "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…)
      "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)
    }, … ],
    "prediscountSubtotal" : 69.54, // prediscount subtotal (can be null) - decimal[10,2]
    "taxedPrediscountSubtotal" : 110.89, // prediscount subtotal, tax included (can be null) - decimal[10,2]
    "discounts" : [ { // discounts, up to 5 (can be null)
      "type" : "PercentOff", // type, can be "PercentOff" or "AmountOff" - string
      "value" : 20.000 // value, must be greater than zero and if percentage must be less than or equal to 100 - decimal[8,3](0…)
    }, {
      "type" : "AmountOff",
      "value" : 10.450
    }, … ],
    "discountsIncludeTaxes" : false, // indicates if discounts include taxes (can be null) - bool
    "subtotal" : 69.54, // subtotal (can be null) - decimal[10,2]
    "taxedSubtotal" : 110.89, // subtotal, taxes included (can be null) - decimal[10,2]
    "shippingMethod" : { // shipping method (can be null)
      "id" : 14, // identifier (can be null) - int(1…)
      "name" : "FedEx", // name - string(0…80)
      "cost" : 8.572, // cost - decimal[8,3](0…)
      "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 (can be null) - int(1…)
      "name" : "Credit Card", // name - string(0…80)
      "cost" : 1.200, // cost (fee) - decimal[8,3](0…)
      "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…)
    },
    "taxes" : [ { // taxes for each tax class (can be null)
      "code" : "VAT", // tax class code - string(0…32)
      "name" : "Generic", // tax class name - string(0…60)
      "rate" : 19.00, // percent tax - decimal[4,2](0…)
      "taxableTotal" : 89.23, // taxable total - decimal[10,2]
      "amount" : 31.25 // tax amount - decimal[10,2]
    }, … ],
    "taxAmount" : 31.25, // tax amount (can be null) - decimal[10,2]
    "total" : 89.23, // total (can be null) - decimal[10,2]
    "taxedTotal" : 120.48, // total, tax included (can be null) - decimal[10,2]
    "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 (can be null) - string(0…65535)
  }, … ],
  "count" : 7 // total number of quotes that meet the given conditions - int(0…)
}