Skip to main content

API Reference

Customers API

Manage and retrieve customer profiles. You can filter customers by merchant ID or retrieve details for a specific customer.

List Customers

GET/wp-json/wc/v3/customers

Query Parameters

ParameterTypeDescription
pageintegerCurrent page of results. Default: 1.
per_pageintegerNumber of results per page. Default: 10.
merchant_idstringFilter customers by Whitelabel Merchant ID.

Example Request

GET /wp-json/wc/v3/customers?merchant_id=12345

Retrieve a Customer

GET/wp-json/wc/v3/customers/{id}

Path Parameters

ParameterTypeDescription
idintegerThe unique ID of the customer resource.

Response Schema (JSON)

{
"id": 25,
"date_created": "2023-01-15T10:00:00",
"date_modified": "2023-06-20T14:30:00",
"email": "james.doe@example.com",
"first_name": "James",
"last_name": "Doe",
"username": "james.doe",
"role": "customer",
"merchant_id": "12345",
"billing": {
"first_name": "James",
"last_name": "Doe",
"company": "Tech Corp",
"address_1": "123 Tech Blvd",
"address_2": "",
"city": "Sandton",
"state": "GP",
"postcode": "2196",
"country": "ZA",
"email": "james.doe@example.com",
"phone": "+27 11 123 4567"
},
"shipping": {
"first_name": "James",
"last_name": "Doe",
"company": "Tech Corp",
"address_1": "Warehouse 4",
"address_2": "Business Park",
"city": "Midrand",
"state": "GP",
"postcode": "1685",
"country": "ZA"
},
"is_paying_customer": true,
"avatar_url": "https://secure.gravatar.com/avatar/...",
"meta_data": []
}