get https://app.ecwid.com/api/v3//customers/
Get full customers details referring to their ID in an Ecwid store.
Request and response example
Request:
curl --location 'https://app.ecwid.com/api/v3/1003/customers/177737165' \
--header 'Authorization: Bearer secret_ab***cd'
Response:
{
"id": 177737165,
"email": "[email protected]",
"registered": "2021-12-21 06:05:58 +0000",
"updated": "2024-06-04 21:15:10 +0000",
"billingPerson": {
"name": "Support team",
"firstName": "Support",
"lastName": "team"
},
"shippingAddresses": [],
"customerGroupId": 0,
"customerGroupName": "General",
"taxExempt": false,
"taxId": "",
"taxIdValid": true,
"b2b_b2c": "b2c",
"fiscalCode": "",
"electronicInvoicePecEmail": "",
"electronicInvoiceSdiCode": "",
"acceptMarketing": false,
"contacts": [
{
"id": 113861381,
"contact": "[email protected]",
"type": "EMAIL",
"default": true,
"orderBy": 0,
"timestamp": "2024-06-04 21:15:10 +0000"
}
],
"stats": {
"numberOfOrders": 0,
"salesValue": 0,
"averageOrderValue": 0
},
"privateAdminNotes": "",
"favorites": []
}
Access scopes
Requires the following access scope: read_customers
Path params
Param | Type | Description |
---|---|---|
storeId | number | Ecwid store ID. |
customerId | number | Customer ID. |
Query params
All query params are optional.
Param | Type | Description |
---|---|---|
responseFields | string | Limit JSON response by specific fields. If specified, all missing fields will be removed from the response body. Example: ?responseFields=email,stats(numberOfOrders) |
Example of using responseFields
param:
curl --location 'https://app.ecwid.com/api/v3/1003/profile?responseFields=email,stats(numberOfOrders)' \
--header 'Authorization: Bearer secret_ab***cd'
{
"email": "[email protected]",
"stats": {
"numberOfOrders": 0
}
}
Headers
The Authorization header with a secret access token is required.
Header | Format | Description |
---|---|---|
Authorization | Bearer secret_ab***cd | Access token of the application. |
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
id | number | Unique internal customer ID. |
string | Customer email. | |
name | string | Customer full name. |
totalOrderCount | number | Count of customer's orders. |
registered | string | Registration date, e.g 2014-06-06 18:57:19 +0400 |
updated | string | Last updated date, e.g 2014-06-06 18:57:19 +0400 |
billingPerson | Object billingPerson | Customer's billing name/address |
shippingAddresses | Array shippingAddresses | List of saved shipping addresses for the customer. |
contacts | Array contacts | Customer's contact information: email, phone, social media links. |
customerGroupId | number | Customer group ID. |
customerGroupName | string | Customer group name. |
taxId | string | Customer tax ID. |
taxIdValid | boolean | true if customer tax ID is valid, false otherwise |
taxExempt | boolean | true if customer is tax exempt, false otherwise. Learn more |
acceptMarketing | boolean | true if customer has accepted email marketing and you can use their email for promotions. If value is false , you can't use this email for promotions |
lang | string | Customer's language code (based on the language of the storefront). |
stats | Object stats | Customer's sales stats: number of orders, total revenue, first order date, etc. |
privateAdminNotes | string | Personal notes about the customer. Visible only to the store owner. |
favorites | Array favorites | List of customer's favorite products. |
billingPerson
Field | Type | Description |
---|---|---|
name | string | Customer full name |
companyName | string | Customer company name |
street | string | Street |
city | string | City |
countryCode | string | Country code (2-letter code) |
countryName | string | Country name |
postalCode | string | Postal code (zip code) |
stateOrProvinceCode | string | State/province code |
stateOrProvinceName | string | State/province name |
phone | string | Phone number |
shippingAddresses
Array of objects, where each object contains the following fields:
Field | Type | Description |
---|---|---|
id | number | Internal address ID |
name | string | Customer full name |
companyName | string | Customer company name |
street | string | Street |
city | string | City |
countryCode | string | Country (2-digits code) |
countryName | string | Country name |
postalCode | string | Postal code (zip code) |
stateOrProvinceCode | string | State/province code |
stateOrProvinceName | string | State/province name |
phone | string | Phone number |
addressFormatted | string | Formatted full address. Includes street, city, state, and country names. |
contacts
Array of objects, where each object contains the following fields:
Field | Type | Description |
---|---|---|
id | number | Unique contact Id |
contact | string | Customer's contact data (email, phone, etc) |
type | string | Type of contact data. Values: EMAIL , PHONE , WHATSAPP , TELEGRAM , VIBER , FACEBOOK , INSTAGRAM , TWITTER , TIKTOK , URL , OTHER |
default | boolean | true if the contact is primary (default). Only one contact of each type (EMAIL , PHONE ) can be default. |
note | string | Merchant's comments about a contact |
orderBy | number | Sort position |
timestamp | string | Date of creating/updating the contact |
stats
Field | Type | Description |
---|---|---|
numberOfOrders | number | Number of customer orders in the store |
salesValue | number | Total revenue received from the customer |
averageOrderValue | number | Average revenue received from the customer |
firstOrderDate | string | Date the customer placed the first order in the store |
lastOrderDate | string | Date the customer placed the latest order in the store |
favorites
Field | Type | Description |
---|---|---|
productId | number | ID of the favorited product, e.g. 689454040 |
addedTimestamp | string | Datetime when the product was added to favorites, e.g. "2024-09-11 06:43:02 +0000" |