CData JDBC Driver for Magento 2019 - Online Help
Questions / Feedback?

CustomerAddresses

CData JDBC Driver for Magento 2019 - Build 19.0.7354

Create, update, delete, and query the available customer addresses in Magento.

Select

The driver will use the Magento API to filter the results by the EntityId and CustomerId columns while the rest of the filter is executed client side within the driver.

You can turn off client-side execution by setting SupportEnhancedSQL to false, in which case any search criteria that refer to columns other than EntityId and CustomerId will cause an error.

For example, the following queries are processed server side:

SELECT * FROM CustomerAddresses WHERE CustomerId = 25
SELECT * FROM CustomerAddresses WHERE EntityId = 19

Insert

To add a customer address, specify the FirstName, LastName, City, CountryId, Region, Telephone, Postcode, Street, and CustomerId fields.

INSERT INTO CustomerAddresses(FirstName,LastName,Street,City,CountryId,Region,Postcode,Telephone, CustomerId) VALUES ('John','Doe','10441 Jefferson Blvd, Suite 200','Culver City','US','California','90232','888-888-8888',25)

Update

The CustomerAddresses table allows updates for the Prefix, FirstName, MiddleName, LastName, Suffix, Company, City, CountryId, Region, Postcode, Telephone, Fax, VatId, Street, IsDefaultBilling, and IsDefaultShipping columns.

UPDATE CustomerAddresses SET FirstName='Jane' WHERE EntityId=110

Delete

CustomerAddresses can be deleted by providing the EntityId of the address and issuing a DELETE statement.

DELETE FROM CustomerAddresses WHERE EntityId=95

Columns

Name Type ReadOnly Description
EntityId [KEY] Integer True

The Id of the customer address.

CustomerId Integer False

The Id of the customer associated with the customer address.

Prefix String False

Customer prefix.

FirstName String False

Customer first name.

MiddleName String False

Customer middle name or initial.

LastName String False

Customer last name.

Suffix String False

Customer suffix.

Company String False

Customer company.

City String False

Name of the city.

CountryId String False

Name of the country.

Region String False

Region name or code. Required for countries with regions (USA, Canada, etc.).

Postcode String False

Customer ZIP/postal code.

Telephone String False

Customer phone number.

Fax String False

Customer fax.

VatId Integer False

Vat

Street String False

An array of customer street addresses.

IsDefaultBilling Boolean False

Whether this is the default billing address for the customer.

IsDefaultShipping Boolean False

Whether this is the default shipping address for the customer.

 
 
Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 19.0.7354.0