---
title: "customer.add"
method: POST
path: "/customer.add.json"
tags: ["customer"]
---

# customer.add

`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`

Add customer into store.

## Request body

- CustomerAdd
  - `email` string, required: Defines customer's email
  - `first_name` string: Defines customer's first name
  - `last_name` string: Defines customer's last name
  - `password` string: Defines customer's unique password
  - `group` string: Defines the group where the customer
  - `group_id` string: Customer group_id
  - `group_ids` string: Groups that will be assigned to a customer
  - `status` string: Defines customer's status
  - `created_time` string: Entity's date creation
  - `modified_time` string: Entity's date modification
  - `login` string: Specifies customer's login name
  - `last_login` string: Defines customer's last login time
  - `birth_day` string: Defines customer's birthday
  - `news_letter_subscription` boolean: Defines whether the newsletter subscription is available for the user
  - `partner_offers_subscription` boolean: Defines whether the customer agreed to receive offers from partners
  - `consents` object[]: Defines consents to notifications
    - `type` 'email' | 'sms', required
    - `status` string, required
    - `opt_in_level` string, required
  - `gender` string: Defines customer's gender
  - `website` string: Link to customer website
  - `fax` string: Defines customer's fax
  - `company` string: Defines customer's company
  - `phone` string: Defines customer's phone number
  - `note` string: The customer note.
  - `country` string: Specifies ISO code or name of country
  - `currency_id` string: Currency Id
  - `is_tax_exempt` boolean: Marks a customer as tax-exempt (B2B/wholesale).
  - `vendor_id` string: Assigns vendor id to the customer
  - `store_id` string: Store Id
  - `idempotency_key` string: 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>
  - `address` object[]
    - `address_book_type` string: Specifies customer's address type
    - `address_book_first_name` string: Specifies customer's first name in the address book
    - `address_book_last_name` string: Specifies customer's last name in the address book
    - `address_book_company` string: Specifies customer's company name in the address book
    - `address_book_fax` string: Specifies customer's fax in the address book
    - `address_book_phone` string: Specifies customer's phone number in the address book
    - `address_book_phone_mobile` string: Specifies customer's mobile phone number in the address book
    - `address_book_website` string: Specifies customer's website in the address book
    - `address_book_address1` string: Specifies customer's first address in the address book
    - `address_book_address2` string: Specifies customer's second address in the address book
    - `address_book_city` string: Specifies customer's city in the address book
    - `address_book_country` string: ISO code or name of country
    - `address_book_state` string: ISO code or name of state.
    - `address_book_postcode` string: Specifies customer's postcode
    - `address_book_gender` string: Specifies customer's gender
    - `address_book_region` string: Specifies customer's region
    - `address_book_default` boolean: Defines whether the address is used by default
    - `address_book_tax_id` string: Add Tax Id
    - `address_book_identification_number` string: The national ID card number of this person, or a unique tax identification number.
    - `address_book_alias` string: Specifies customer's alias in the address book

## Response `200`

successful operation

- object
  - `return_code` integer
  - `return_message` string
  - `result` object
    - `customer_id` string

---

[API](https://skmtc.dev/api2cart/apis/api2cart-openapi.md) · [All operations](https://skmtc.dev/api2cart/apis/api2cart-openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/api2cart/apis/api2cart-openapi/revisions/c34440741693?raw)
