Open2b versione 7.5

customer

Returns the customer's data given a customer key.

Request

HTTP POST
X-Customer-Key: customer-key
/api/v10/storefront.customer
{
  "fields" : [ "cart", "billingAddress", … ] // fields to return
}

Response

{
  "status" : "ok",
  "customer" : {
    "cart" : "ebe766e73af1128d13217f1bcea6b9d9", // cart (token) (can be null) - string(32)
    "invoiceRecipient" : "AB7TR6K", // invoice recipient -- string(0…256)
    "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)
    },
    "wishList" : [ 340, 981, 18, … ], // products (id) on her wish list - int(1…)
    "newsletterLists" : [ 5, 7, … ], // newsletter lists (id) to which she is subscribed - int(1…)
    "privacyConsents" : { // privacy consents that has been or can be given
      "processing" : 12, // processing (ID) - int(1…255)
      "processingTitle" : "Terms and Conditions", // processing title - string(0…60)
      "processingDescription" : "", // processing description - string(0…1000)
      "detailsPage" : 12, // Details page (ID) (can be null) - int(1…)
      "lawfulBase" : "Consent", // lawful base, can be "Consent", "Contract", "LegalObligation", "LegitimateInterest" or "Other"
      "isConsentRequired" : true, // indicates if the consent for this processing is required  - bool
      "hasBeenGiven" : true // indicates if the consent has been given - bool
    }
  }
}