Récupérer tous les clients
/customers-apiL'API Customers gère les comptes clients, adresses, attributs et champs de formulaire. V3 est l'API principale pour les opérations client, même si les Customer Groups restent uniquement en V2. L'API Segmentation (Enterpr
<overview>
The Customers API manages customer accounts, addresses, attributes, and form fields. V3 is the primary API for customer operations, though Customer Groups remain V2-only. The Segmentation API (Enterprise only) enables advanced customer targeting.
</overview>
<api_versions>
<v3_customers>
Primary API for:
- Customer accounts
- Customer addresses
- Customer attributes
- Customer form fields
- Customer consent
- Stored instruments (payment methods)
Base: https://api.bigcommerce.com/stores/{store_hash}/v3/customers
</v3_customers>
<v2customergroups>
V2 still required for:
- Customer Groups (pricing tiers, access restrictions)
Base: https://api.bigcommerce.com/stores/{store_hash}/v2/customer_groups
Customer Groups migration to V3 is planned but not yet available.
</v2customergroups>
</api_versions>
<customers_v3>
<get_customers>
# Get all customers
GET /v3/customers
# Get single customer by ID
GET /v3/customers?id:in=123
# Filter customers
GET /v3/customers?email:in=john@example.com
GET /v3/customers?customer_group_id:in=5,6
GET /v3/customers?date_created:min=2024-01-01
GET /v3/customers?company:like=Acme
GET /v3/customers?name:like=John</get_customers>
<create_customer>
POST /v3/customers
[
{
"email": "john@example.com",
"first_name": "John",
"last_name": "Doe",
"company": "Acme Corp",
"phone": "512-555-1234",
"customer_group_id": 1,
"addresses": [
{
"first_name": "John",
"last_name": "Doe",
"address1": "123 Main St",
"city": "Austin",
"state_or_province": "Texas",
"postal_code": "78701",
"country_code": "US",
"address_type": "residential"
}
],
"authentication": {
"force_password_reset": true,
"new_password": "temporaryPassword123!"
}
}
]Note: V3 accepts an array even for single customer creation.
</create_customer>
<update_customer>
PUT /v3/customers
[
{
"id": 123,
"first_name": "Jonathan",
"customer_group_id": 5
}
]</update_customer>
<delete_customer>
DELETE /v3/customers?id:in=123,124,125</delete_customer>
<include_subresources>
GET /v3/customers?include=addresses,storecredit,attributes,formfieldsResponse includes nested address array (limited to 10 per customer in response).
</include_subresources>
</customers_v3>
<customer_addresses>
<get_addresses>
GET /v3/customers/addresses
GET /v3/customers/addresses?customer_id:in=123
GET /v3/customers/addresses?id:in=456Max limit: 250 addresses per request
Default sort: address ID ascending
</get_addresses>
<create_address>
POST /v3/customers/addresses
[
{
"customer_id": 123,
"first_name": "John",
"last_name": "Doe",
"address1": "456 Oak Ave",
"address2": "Suite 100",
"city": "Austin",
"state_or_province": "Texas",
"postal_code": "78702",
"country_code": "US",
"phone": "512-555-5678",
"address_type": "commercial"
}
]address_type: residential or commercial
</create_address>
<update_address>
PUT /v3/customers/addresses
[
{
"id": 456,
"address1": "789 New Street"
}
]</update_address>
</customer_addresses>
<customergroupsv2>
<get_groups>
GET /v2/customer_groups
GET /v2/customer_groups/{group_id}</get_groups>
<create_group>
POST /v2/customer_groups
{
"name": "Wholesale Customers",
"discount_rules": [
{
"type": "all",
"method": "percent",
"amount": "15.00"
}
],
"is_default": false,
"is_group_for_guests": false
}</create_group>
<discountruletypes>
all- Discount on all productsproduct- Discount on specific productcategory- Discount on category
Methods: percent, fixed, price
</discountruletypes>
<category_access>
Restrict category access by customer group:
PUT /v2/customer_groups/{group_id}
{
"category_access": {
"type": "specific",
"categories": [23, 45, 67]
}
}type: all, specific, none
</category_access>
<plan_availability>
Customer Groups are only available on specific BigCommerce plans. Check plan features before implementing.
</plan_availability>
</customergroupsv2>
<customer_attributes>
<purpose>
Custom attributes store additional customer data beyond standard fields. Define attribute types, then set values per customer.
</purpose>
<get_attributes>
GET /v3/customers/attributes
GET /v3/customers/attribute-values?customer_id:in=123</get_attributes>
<create_attribute>
POST /v3/customers/attributes
[
{
"name": "Loyalty Tier",
"type": "dropdown",
"date_created": "2024-01-01T00:00:00Z"
}
]Attribute types: string, number, date, checkbox, dropdown, text, multiline_text
</create_attribute>
<setattributevalue>
PUT /v3/customers/attribute-values
[
{
"attribute_id": 1,
"customer_id": 123,