Saltar al contenido principal

Customer

customer: Nullable<Customer>

Details about the customer, including identification, contact information, and address. This property may be null depending on the page it is accessed from.

PropertyTypeAlways presentDescription
idnumber or nullNoUnique identifier for the customer.
contactobjectYesCustomer contact information (see below).
shipping_addressShippingAddressYesCustomer's shipping address.
billing_addressBillingAddressYesCustomer's billing address.

Customer contact (customer.contact):

PropertyTypeAlways presentDescription
emailstring or nullNoCustomer's email address.
namestring or nullNoCustomer's full name.
phonestring or nullNoCustomer's phone number.
accepts_marketingboolean or nullNoWhether the customer accepts marketing communications.
accepts_marketing_updated_atstring or nullNoTimestamp of when marketing preferences were last updated.

Address (base shape for both customer.shipping_address and customer.billing_address):

PropertyTypeAlways presentDescription
zipcodestringYesPostal code of the address.
first_namestring or nullNoFirst name of the address owner.
last_namestring or nullNoLast name of the address owner.
addressstring or nullNoStreet address.
numberstring or nullNoStreet number.
floorstring or nullNoFloor or apartment number.
localitystring or nullNoLocality or neighborhood.
citystring or nullNoCity name.
statestring or nullNoState or province.
countrystring or nullNoCountry name.
phonestring or nullNoPhone number associated with the address.

ShippingAddress extends Address and adds:

PropertyTypeAlways presentDescription
between_streetstring or nullNoAdditional address information between streets.
referencestring or nullNoReference points or additional address information.

BillingAddress extends Address and adds:

PropertyTypeAlways presentDescription
id_numberstring or nullNoTax identification number.
customer_typestring or nullNoType of customer (individual or business).
business_namestring or nullNoLegal business name.
trade_namestring or nullNoTrade name or commercial name.
state_registrationstring or nullNoState registration number.
fiscal_regimestring or nullNoFiscal regime classification.
invoice_usestring or nullNoInvoice usage classification.
document_typestring or nullNoType of identification document.
business_activitystring or nullNoBusiness activity or industry.

For the exact TypeScript definitions, use the types from @tiendanube/nube-sdk-types (e.g. Customer, ShippingAddress, BillingAddress, Address).