customer

customer.address.add

Add customer address.

post/customer.address.add.json

Request

  • Base URL: https://api.api2cart.com/v1.1
  • URL: https://api.api2cart.com/v1.1/customer.address.add.json
  • Auth: API key in header x-api-key and API key in header x-store-key

Request body

customer_idstring required

Defines customer id

store_idstring

Store Id

first_namestring

Defines customer's address first name

last_namestring

Defines customer's address last name

companystring

Defines customer's address company

address1string required

Specifies customer's address address1

address2string

Specifies customer's address address2

citystring required

Specifies customer's address city

countrystring required

Specifies customer's address ISO code or name of country

statestring

Specifies customer's address ISO code or name of state

postcodestring required

Specifies customer's address postcode

identification_numberstring

Specifies the national ID card number of this person, or a unique tax identification number for customer's address

typesstring[]

Specifies customer's address types

defaultboolean

Specifies whether the customer's address is used by default

phonestring

Defines customer's address phone number

phone_mobilestring

Defines customer's address mobile phone number

faxstring

Defines customer's address fax

websitestring

Defines Link to customer's address website

genderstring

Defines customer's address gender

tax_idstring

Add Tax Id

aliasstring

Specifies customer's alias in the address book

idempotency_keystring

A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

Example request

{
  "customer_id": "5",
  "store_id": "1",
  "first_name": "John",
  "last_name": "Smith",
  "company": "Apple",
  "address1": "Green str. 35",
  "address2": "Green str. 35",
  "city": "Chicago",
  "country": "US",
  "state": "IL",
  "postcode": "12345",
  "identification_number": "`123-456-7890`",
  "default": true,
  "phone": "56686868654",
  "phone_mobile": "56686868654",
  "fax": "54545787",
  "website": "http://api2cart.com",
  "gender": "male",
  "tax_id": "`12345678`",
  "alias": "Address alias",
  "idempotency_key": "098f6bcd4621d373cade4e832627b4f6"
}

Response

successful operation

return_codeinteger
return_messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.