customer

customer.add

Add customer into store.

post/customer.add.json

Request

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

Request body

emailstring required

Defines customer's email

first_namestring

Defines customer's first name

last_namestring

Defines customer's last name

passwordstring

Defines customer's unique password

groupstring

Defines the group where the customer

group_idstring

Customer group_id

group_idsstring

Groups that will be assigned to a customer

statusstring

Defines customer's status

created_timestring

Entity's date creation

modified_timestring

Entity's date modification

loginstring

Specifies customer's login name

last_loginstring

Defines customer's last login time

birth_daystring

Defines customer's birthday

news_letter_subscriptionboolean

Defines whether the newsletter subscription is available for the user

partner_offers_subscriptionboolean

Defines whether the customer agreed to receive offers from partners

genderstring

Defines customer's gender

websitestring

Link to customer website

faxstring

Defines customer's fax

companystring

Defines customer's company

phonestring

Defines customer's phone number

notestring

The customer note.

countrystring

Specifies ISO code or name of country

currency_idstring

Currency Id

is_tax_exemptboolean

Marks a customer as tax-exempt (B2B/wholesale).

vendor_idstring

Assigns vendor id to the customer

store_idstring

Store Id

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

{
  "email": "mail@example.com",
  "first_name": "John",
  "last_name": "Smith",
  "password": "fd5gfd5g75fd",
  "group": "Register",
  "group_ids": "1,2,3",
  "status": "disabled",
  "created_time": "2014-01-30 15:58:41",
  "modified_time": "2014-07-30 15:58:41",
  "login": "makaka",
  "last_login": "2013-02-26 15:00:00",
  "birth_day": "2013-02-26 15:00:00",
  "news_letter_subscription": true,
  "partner_offers_subscription": true,
  "gender": "male",
  "website": "http://api2cart.com",
  "fax": "54545787",
  "company": "Apple",
  "phone": "56686868654",
  "note": "Customer note",
  "country": "US",
  "currency_id": "usd",
  "vendor_id": "1",
  "store_id": "1",
  "idempotency_key": "098f6bcd4621d373cade4e832627b4f6",
  "address": [
    {
      "address_book_type": "billing",
      "address_book_first_name": "John",
      "address_book_last_name": "Smith",
      "address_book_company": "Samsung",
      "address_book_fax": "5758787",
      "address_book_phone": "5758787",
      "address_book_phone_mobile": "5758787",
      "address_book_website": "http://api2cart.com",
      "address_book_address1": "Green str. 35",
      "address_book_address2": "Green str. 35",
      "address_book_city": "Chicago",
      "address_book_country": "US",
      "address_book_state": "IL",
      "address_book_postcode": "12345",
      "address_book_gender": "male",
      "address_book_region": "Alabama",
      "address_book_default": true,
      "address_book_tax_id": "`12345678`",
      "address_book_identification_number": "`123-456-7890`",
      "address_book_alias": "Address alias"
    }
  ]
}

Response

successful operation

return_codeinteger
return_messagestring

Changes

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