Get customer

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

ParamTypeDescription
storeIdnumberEcwid store ID.
customerIdnumberCustomer ID.

Query params

All query params are optional.

ParamTypeDescription
responseFieldsstringLimit 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.

HeaderFormatDescription
AuthorizationBearer secret_ab***cdAccess token of the application.

Response

A JSON object with the following fields:

FieldTypeDescription
idnumberUnique internal customer ID.
emailstringCustomer email.
namestringCustomer full name.
totalOrderCountnumberCount of customer's orders.
registeredstringRegistration date, e.g 2014-06-06 18:57:19 +0400
updatedstringLast updated date, e.g 2014-06-06 18:57:19 +0400
billingPersonObject billingPersonCustomer's billing name/address
shippingAddressesArray shippingAddressesList of saved shipping addresses for the customer.
contactsArray contactsCustomer's contact information: email, phone, social media links.
customerGroupIdnumberCustomer group ID.
customerGroupNamestringCustomer group name.
taxIdstringCustomer tax ID.
taxIdValidbooleantrue if customer tax ID is valid, false otherwise
taxExemptbooleantrue if customer is tax exempt, false otherwise. Learn more
acceptMarketingbooleantrue 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
langstringCustomer's language code (based on the language of the storefront).
statsObject statsCustomer's sales stats: number of orders, total revenue, first order date, etc.
privateAdminNotesstringPersonal notes about the customer. Visible only to the store owner.
favoritesArray favoritesList of customer's favorite products.

billingPerson

FieldTypeDescription
namestringCustomer full name
companyNamestringCustomer company name
streetstringStreet
citystringCity
countryCodestringCountry code (2-letter code)
countryNamestringCountry name
postalCodestringPostal code (zip code)
stateOrProvinceCodestringState/province code
stateOrProvinceNamestringState/province name
phonestringPhone number

shippingAddresses

Array of objects, where each object contains the following fields:

FieldTypeDescription
idnumberInternal address ID
namestringCustomer full name
companyNamestringCustomer company name
streetstringStreet
citystringCity
countryCodestringCountry (2-digits code)
countryNamestringCountry name
postalCodestringPostal code (zip code)
stateOrProvinceCodestringState/province code
stateOrProvinceNamestringState/province name
phonestringPhone number
addressFormattedstringFormatted full address. Includes street, city, state, and country names.

contacts

Array of objects, where each object contains the following fields:

FieldTypeDescription
idnumberUnique contact Id
contactstringCustomer's contact data (email, phone, etc)
typestringType of contact data. Values: EMAIL, PHONE, WHATSAPP, TELEGRAM, VIBER, FACEBOOK, INSTAGRAM, TWITTER, TIKTOK, URL, OTHER
defaultbooleantrue if the contact is primary (default). Only one contact of each type (EMAIL, PHONE) can be default.
notestringMerchant's comments about a contact
orderBynumberSort position
timestampstringDate of creating/updating the contact

stats

FieldTypeDescription
numberOfOrdersnumberNumber of customer orders in the store
salesValuenumberTotal revenue received from the customer
averageOrderValuenumberAverage revenue received from the customer
firstOrderDatestringDate the customer placed the first order in the store
lastOrderDatestringDate the customer placed the latest order in the store

favorites

FieldTypeDescription
productIdnumberID of the favorited product, e.g. 689454040
addedTimestampstringDatetime when the product was added to favorites, e.g. "2024-09-11 06:43:02 +0000"
Language
Click Try It! to start a request and see the response here!