getCustomer
Topics: Commerce
Fetch a single customer by ID. Requires customer:read permission.
Examples
Read Customer Overview
query ReadCustomerOverview($id: CustomerID!) {
getCustomer(id: $id) {
id name email phone notes isActive
contacts {
id firstName lastName email phone jobTitle isPrimary
}
addresses {
id contactId addressType street1 street2
city state postalCode country timezone isDefault
}
}
}Variables
{
"id": "cus_01h455vb4pex5vsknk084sn02q"
}Exact field SDL
"""Fetch a single customer by ID. Requires customer:read permission."""
getCustomer(
"""Customer ID to fetch"""
id: CustomerID!
): CustomerState @topic(names: ["commerce"]) @topic_example(names: ["crm.read-customer-overview"])Declared on Query. Access is checked by the platform for each operation.