commerce/customer/accounts/contacts

Merchants and customers can create, view, update, and delete a contact for a customer account. A customer account may have multiple contacts for billing and shipping addresses.

JSON Example

CustomerContact Properties

Property Description
address

type: address

Address information to supply for a contact.

address.address1

type: string

Physical or mailing address line one. Usually includes the street number and street name or it could be a P.O. Box. Max length: 200.

address.address2

type: string

Physical or mailing address line two. Usually supplements the main street address with apartment, floor, suite, building, or unit information. Max length: 200.

address.address3

type: string

Physical or mailing address line three. Max length: 200.

address.address4

type: string

Physical or mailing address line four. Max length: 200.

address.addressType

type: string

The type of address, which is commercial or residential.

address.cityOrTown

type: string

The entered city or town for the address.

address.countryCode

type: string

The 2-letter geographic code representing the country for the physical or mailing address. Currently limited to the US.

address.isValidated

type: bool

Indicates if the address has been validated. If true, the address has been verified by an address validation service.

address.postalOrZipCode

type: string

The entered zip or postal code for an address.

address.stateOrProvince

type: string

The entered state or province for an address.

companyOrOrganization

type: string

The entered company or organization name entered for a customer account.

email

type: string

The email address for the customer account and contact. This email may be used for login to the storefront, receiving in-stock product notifications, and subscription mailing lists.

faxNumber

type: string

The fax number associated with the customer account.

firstName

type: string

The full first name of a customer or contact name.

id

type: int

Unique identifier of the source property, such as a catalog, discount, order, or email template.

For a product field it will be the name of the field.

For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID.

For a product attribute it will be the Attribute FQN.

For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366
or
bba0a1a8-85e2-413b-b097-ceacf7bac366.

For email templates, the ID must be one of the following values:
BackInStock
OrderChanged
OrderShipped
OrderFulfillmentDetailsChanged
ShopperLoginCreated
ShopperPasswordReset
ReturnCreated
ReturnAuthorized
ReturnUpdated
ReturnRejected
ReturnCancelled
ReturnClosed
RefundCreated
StoreCreditCreated
StoreCreditUpdated
GiftCardCreated

label

type: string

Descriptive text used as a label for objects, such as field names, facets, date ranges, contact information, and package information.

lastNameOrSurname

type: string

The full last name or surname of a customer or contact name.

middleNameOrInitial

type: string

Character string of the middle name or initial for the customer.

phoneNumbers

type: phone

List of phone numbers associated with the customer account contact. The phone numbers include area codes.

phone.home

type: string

Home phone number.

phone.mobile

type: string

Mobile phone number.

phone.work

type: string

Work phone number.

types

type: list of contactType

List of the types associated with a customer contact, such as Billing or Fulfillment.

contactType.isPrimary

type: bool

Indicates if the object is primary, used to indicate primary contacts and entities within a tenant. If true, this marker indicates that the object is the primary in a set.

contactType.name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

Operations

Operation Name Request URI Description
AddAccountContact POST %7baccountId%7d%2fcontacts%3fresponseFields%3d%7bresponseFields%7d

Creates a new contact for a customer account, such as a new shipping address for the account.

AddAccountContactList PUT %7baccountId%7d%2fcontacts%3fresponseFields%3d%7bresponseFields%7d

Creates a list of new contacts for a customer account, such as a list of shipping addresses for a customer. Creating a list of shipping addresses is useful for sites that have multiple shipments enabled on orders.

DeleteAccountContact DELETE %7baccountId%7d%2fcontacts%2f%7bcontactId%7d

Deletes a contact for the specified customer account.

GetAccountContact GET %7baccountId%7d%2fcontacts%2f%7bcontactId%7d%3fresponseFields%3d%7bresponseFields%7d

Retrieves the specified contact for a customer account such as a billing or shipping contact.

GetAccountContacts GET %7baccountId%7d%2fcontacts%3fstartIndex%3d%7bstartIndex%7d%26pageSize%3d%7bpageSize%7d%26sortBy%3d%7bsortBy%7d%26filter%3d%7bfilter%7d%26responseFields%3d%7bresponseFields%7d

Retrieves a list of contacts for a customer according to any specified filter criteria and sort options.

UpdateAccountContact PUT %7baccountId%7d%2fcontacts%2f%7bcontactId%7d%3fresponseFields%3d%7bresponseFields%7d

Updates a contact for a specified customer account such as to update addresses or change which contact is the primary contact for billing.