---
updatedAt: 2026-10-29T11:54:48.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Retrieve Loyalty Customer Details by Email

Retrieve a customer record from Yotpo Loyalty & Referrals (updated in real-time).

> 👍 How to use this endpoint
>
> Requests for this endpoint are limited to 100 requests/minute, per app key.

> 📘 Identifying the customer
>
> Send exactly one identifier: `customer_email`, `customer_id`, `pos_account_id` or `phone_number`. To include the customer's points history, send `with_history: true`. To include their referral code and link, send `with_referral_code: true`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "App partners API",
    "description": "Endpoints for apps that Yotpo merchants install. The app-level webhook is defined separately, in webhooks.json.",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://developers.yotpo.com"
    }
  ],
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "paths": {
    "/loyalty/v3/stores/{store_id}/customers": {
      "post": {
        "summary": "Retrieve Loyalty Customer Details by Email",
        "description": "Retrieve a customer record from Yotpo Loyalty & Referrals (updated in real-time).",
        "operationId": "retrieve-loyalty-customer-details-by-email",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your Store ID (app key)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customers"
                ],
                "properties": {
                  "customers": {
                    "type": "object",
                    "properties": {
                      "customer_email": {
                        "type": "string",
                        "description": "The customer's email address. Required if no `pos_account_id`, `customer_id` or `phone_number` is passed."
                      },
                      "customer_id": {
                        "type": "string",
                        "description": "The identifier used to uniquely identify the customer in your system. Required if no `customer_email`, `pos_account_id` or `phone_number` is passed."
                      },
                      "pos_account_id": {
                        "type": "string",
                        "description": "The identifier used to uniquely identify the customer in your POS system. Required if no `customer_email`, `customer_id` or `phone_number` is passed."
                      },
                      "phone_number": {
                        "type": "string",
                        "description": "The customer's phone number in E.164 format. e.g +14155552671. Must be an exact match. Required if no `customer_email`, `pos_account_id` or `customer_id` or  is passed."
                      },
                      "country_iso_code": {
                        "type": "string",
                        "default": "null",
                        "description": "Only use if unable to send `phone_number` in full E.164 format. If `phone_number` is passed in full E.164 format with `country_iso_code`, this string will be ignored. Example: \"US\", \"GB\", i.e."
                      },
                      "with_referral_code": {
                        "type": "boolean",
                        "default": false,
                        "description": "Defaults to false. If you'd like information about the customers referral code you can set this to true."
                      },
                      "with_history": {
                        "type": "boolean",
                        "default": false,
                        "description": "Defaults to false. If you'd like information about the customers point earning and redemption history you can set this to true."
                      }
                    },
                    "description": "The customer to look up. Send exactly one identifier: `customer_email`, `customer_id`, `pos_account_id` or `phone_number`."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "customers": {
                      "customer_email": "name@example.com"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"customers\": {\n    \"email\": \"name@example.com\",\n    \"points_balance\": 0,\n    \"points_earned\": 0,\n    \"last_seen_at\": null,\n    \"thirty_party_id\": null,\n    \"third_party_id\": null,\n    \"pos_account_id\": null,\n    \"has_store_account\": false,\n    \"credit_balance\": \"$0\",\n    \"credit_balance_in_customer_currency\": \"$0\",\n    \"opt_in\": true,\n    \"opted_in_at\": \"2022-02-01\",\n    \"points_expire_at\": null,\n    \"total_spend_cents\": 0,\n    \"total_purchases\": 0,\n    \"perks_redeemed\": 0,\n    \"last_purchase_at\": null,\n    \"first_name\": null,\n    \"last_name\": null,\n    \"phone_number\": null,\n    \"vip_tier_name\": \"Tier Name\",\n    \"vip_tier_entry_date\": \"2022-02-01T13:05:57.071+02:00\",\n    \"vip_tier_expiration\": null,\n    \"vip_tier_actions_completed\": {\n      \"points_earned\": 0,\n      \"amount_spent_cents\": 0,\n      \"purchases_made\": 0,\n      \"referrals_completed\": 0,\n      \"campaigns_completed\": []\n    },\n    \"vip_tier_maintenance_requirements\": {\n      \"points_needed\": 0,\n      \"amount_cents_needed\": 0,\n      \"amount_cents_needed_in_customer_currency\": 0,\n      \"purchases_needed\": 0,\n      \"referrals_needed\": 0,\n      \"campaigns_needed\": []\n    },\n    \"vip_tier_upgrade_requirements\": {\n      \"points_needed\": 100,\n      \"amount_cents_needed\": 200,\n      \"purchases_needed\": 0,\n      \"referrals_needed\": 0,\n      \"campaigns_needed\": []\n    }\n  }\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "customers": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string",
                          "example": "name@example.com",
                          "description": "The customer's email address."
                        },
                        "points_balance": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Points available to spend."
                        },
                        "points_earned": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Total points earned over the customer's lifetime."
                        },
                        "last_seen_at": {
                          "description": "Time of the customer's last recorded activity.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "thirty_party_id": {
                          "description": "Legacy misspelled duplicate of `third_party_id`. Use `third_party_id`.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "third_party_id": {
                          "description": "The customer's ID in your ecommerce platform (the `id` / `customer_id` you send).",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "pos_account_id": {
                          "description": "The customer's ID in your POS system.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "has_store_account": {
                          "type": "boolean",
                          "example": false,
                          "default": true,
                          "description": "`true` if the customer has an account in your store."
                        },
                        "credit_balance": {
                          "type": "string",
                          "example": "$0",
                          "description": "Store credit value of the points balance, formatted in the store currency."
                        },
                        "credit_balance_in_customer_currency": {
                          "type": "string",
                          "example": "$0",
                          "description": "Store credit value of the points balance, formatted in the customer's currency."
                        },
                        "opt_in": {
                          "type": "boolean",
                          "example": true,
                          "default": true,
                          "description": "`true` if the customer is opted in to the loyalty program."
                        },
                        "opted_in_at": {
                          "type": "string",
                          "example": "2022-02-01",
                          "description": "Date the customer opted in."
                        },
                        "points_expire_at": {
                          "description": "The date when the customer's points are set to expire. The value depends on your store's **Points expiration policy**:\n\n- **Last Activity**: returns the calculated expiration date based on the customer's last activity.\n- **Date Earned**: returns the next upcoming expiration date across all point batches.\n- **Never expire**: returns `null`.\n\nFor **Date Earned** policies, customers may have multiple point batches with different expiration dates. This field reflects only the closest upcoming expiration.\n\nThis attribute also appears on the `customer` object in Loyalty webhook events; see [Introduction to Loyalty Events](doc:topics).",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "total_spend_cents": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Total spend recorded for the customer, in cents."
                        },
                        "total_purchases": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Number of purchases recorded."
                        },
                        "perks_redeemed": {
                          "type": "integer",
                          "example": 0,
                          "default": 0,
                          "description": "Number of rewards the customer has redeemed."
                        },
                        "last_purchase_at": {
                          "description": "Time of the last recorded purchase.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "first_name": {
                          "description": "First name.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "last_name": {
                          "description": "Last name.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone_number": {
                          "description": "Phone number in E.164 format.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "vip_tier_name": {
                          "type": "string",
                          "example": "Tier Name",
                          "description": "Name of the customer's current VIP tier."
                        },
                        "vip_tier_entry_date": {
                          "type": "string",
                          "example": "2022-02-01T13:05:57.071+02:00",
                          "description": "When the customer entered the current tier."
                        },
                        "vip_tier_expiration": {
                          "description": "When the customer's current tier expires, or `null`.",
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "vip_tier_actions_completed": {
                          "type": "object",
                          "properties": {
                            "points_earned": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Points earned."
                            },
                            "amount_spent_cents": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Spend in cents (store currency)."
                            },
                            "purchases_made": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Purchases made."
                            },
                            "referrals_completed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Referrals completed."
                            },
                            "campaigns_completed": {
                              "type": "array",
                              "description": "IDs of campaigns completed."
                            },
                            "amount_spent_cents_in_customer_currency": {
                              "type": "integer",
                              "description": "Spend in cents, in the customer's currency.",
                              "example": 0
                            }
                          },
                          "description": "Progress toward VIP tiers in the current tier period."
                        },
                        "vip_tier_maintenance_requirements": {
                          "type": "object",
                          "properties": {
                            "points_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Points the customer still needs to keep the current tier."
                            },
                            "amount_cents_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Spend (in cents, store currency) still needed to keep the current tier."
                            },
                            "amount_cents_needed_in_customer_currency": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Spend still needed to keep the current tier, in the customer's currency (cents)."
                            },
                            "purchases_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Purchases still needed to keep the current tier."
                            },
                            "referrals_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Completed referrals still needed to keep the current tier."
                            },
                            "campaigns_needed": {
                              "type": "array",
                              "description": "IDs of campaigns the customer still needs to complete to keep the current tier."
                            }
                          },
                          "description": "What the customer still needs to keep the current tier."
                        },
                        "vip_tier_upgrade_requirements": {
                          "type": "object",
                          "properties": {
                            "points_needed": {
                              "type": "integer",
                              "example": 100,
                              "default": 0,
                              "description": "Points the customer still needs to reach the next tier."
                            },
                            "amount_cents_needed": {
                              "type": "integer",
                              "example": 200,
                              "default": 0,
                              "description": "Spend (in cents, store currency) still needed to reach the next tier."
                            },
                            "purchases_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Purchases still needed to reach the next tier."
                            },
                            "referrals_needed": {
                              "type": "integer",
                              "example": 0,
                              "default": 0,
                              "description": "Completed referrals still needed to reach the next tier."
                            },
                            "campaigns_needed": {
                              "type": "array",
                              "description": "IDs of campaigns the customer still needs to complete to reach the next tier."
                            },
                            "amount_cents_needed_in_customer_currency": {
                              "type": "integer",
                              "description": "Spend still needed to reach the next tier, in the customer's currency (cents).",
                              "example": 0
                            }
                          },
                          "description": "What the customer still needs to reach the next tier."
                        },
                        "yotpo_customer_id": {
                          "type": "integer",
                          "description": "The customer's internal Yotpo Loyalty ID: the same ID shown in the customer page URL in the Loyalty admin. Use it to identify the customer in Loyalty APIs that take an internal customer ID.",
                          "example": 123456789
                        },
                        "next_points_expire_on": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Date the next batch of points expires.",
                          "example": "2028-10-23",
                          "format": "date"
                        },
                        "next_points_expire_amount": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Points in the next expiring batch.",
                          "example": 735
                        },
                        "birthday_month": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Birthday month (1–12).",
                          "example": 6
                        },
                        "birth_day": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Birthday day of month.",
                          "example": 20
                        },
                        "birthday_year": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Birthday year.",
                          "example": 1987
                        },
                        "anniversary_month": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Anniversary month (1–12).",
                          "example": 6
                        },
                        "anniversary_day": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Anniversary day of month.",
                          "example": 20
                        },
                        "anniversary_year": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "Anniversary year.",
                          "example": 1987
                        },
                        "history_items": {
                          "type": "array",
                          "description": "Point earning and redemption history. Returned only with `with_history=true`.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "created_at": {
                                "type": "string",
                                "description": "When the event was created.",
                                "example": "2019-12-04T13:43:42.000Z"
                              },
                              "date": {
                                "type": "string",
                                "description": "Event date.",
                                "example": "2019-12-04"
                              },
                              "completed_at": {
                                "type": "string",
                                "description": "When the event completed. Empty string for pending redemptions.",
                                "example": "2019-12-04T13:43:42.000Z"
                              },
                              "action": {
                                "type": "string",
                                "description": "Description shown to the customer, for example the campaign or reward name.",
                                "example": "Make a purchase"
                              },
                              "redemption_option_id": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "The redemption option, for redemptions.",
                                "example": null
                              },
                              "points": {
                                "type": "integer",
                                "description": "Points earned (positive) or spent (negative).",
                                "example": 10
                              },
                              "status": {
                                "type": "string",
                                "description": "`Approved`, `Pending`, or, for redemptions, the coupon code.",
                                "example": "Approved"
                              },
                              "action_name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Internal action name, for example `manual_adjustment`.",
                                "example": "manual_adjustment"
                              },
                              "order_ids": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Orders linked to the event.",
                                "example": []
                              }
                            }
                          }
                        },
                        "referral_code": {
                          "type": "object",
                          "description": "The customer's referral code and its stats. Returned only with `with_referral_code=true`.",
                          "properties": {
                            "code": {
                              "type": "string",
                              "description": "Referral code.",
                              "example": "dfc33q1"
                            },
                            "email": {
                              "type": "string",
                              "description": "The customer's email.",
                              "example": "name@example.com"
                            },
                            "shares": {
                              "type": "integer",
                              "description": "Total shares.",
                              "example": 2
                            },
                            "facebook_shares": {
                              "type": "integer",
                              "description": "Facebook shares.",
                              "example": 0
                            },
                            "twitter_shares": {
                              "type": "integer",
                              "description": "Twitter shares.",
                              "example": 0
                            },
                            "email_shares": {
                              "type": "integer",
                              "description": "Email shares.",
                              "example": 2
                            },
                            "emails_sent": {
                              "type": "integer",
                              "description": "Referral emails sent.",
                              "example": 0
                            },
                            "emails_viewed": {
                              "type": "integer",
                              "description": "Referral emails opened.",
                              "example": 0
                            },
                            "links_clicked_from_email": {
                              "type": "integer",
                              "description": "Link clicks from email.",
                              "example": 0
                            },
                            "links_clicked_from_twitter": {
                              "type": "integer",
                              "description": "Link clicks from Twitter.",
                              "example": 0
                            },
                            "links_clicked_from_facebook": {
                              "type": "integer",
                              "description": "Link clicks from Facebook.",
                              "example": 0
                            },
                            "unique_clicks": {
                              "type": "integer",
                              "description": "Unique link clicks.",
                              "example": 0
                            },
                            "total_clicks": {
                              "type": "integer",
                              "description": "Total link clicks.",
                              "example": 0
                            },
                            "orders": {
                              "type": "integer",
                              "description": "Orders from referrals.",
                              "example": 0
                            },
                            "amount_cents": {
                              "type": "integer",
                              "description": "Referred order value in cents.",
                              "example": 0
                            },
                            "average_amount_cents": {
                              "type": "integer",
                              "description": "Average referred order value in cents.",
                              "example": 0
                            },
                            "expires_at": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "When the code expires, or `null`.",
                              "example": null,
                              "format": "date-time"
                            },
                            "expired": {
                              "type": "boolean",
                              "description": "`true` if the code has expired.",
                              "example": false
                            },
                            "completed_referral_customers": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              },
                              "description": "Customers who completed a referral.",
                              "example": []
                            }
                          }
                        }
                      },
                      "description": "The customer record."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The body is missing the `customers` object.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing customers object": {
                    "value": {
                      "errors": [
                        {
                          "message": "request is missing customers parameter"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "What went wrong.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "The error message: a string, or an object keyed by field."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid access token. Send a valid token in the `X-Yotpo-Token` header.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing token": {
                    "summary": "No token sent (or sent as Authorization: Bearer)",
                    "value": {
                      "error": "invalid_request",
                      "error_description": "The access token is missing"
                    }
                  },
                  "Invalid token": {
                    "summary": "Token unknown, revoked or for another app",
                    "value": {
                      "error": "invalid_token",
                      "error_description": "The access token is invalid or has expired"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "OAuth error code: `invalid_request` when no token was sent, `invalid_token` when the token is unknown, revoked or expired.",
                      "enum": [
                        "invalid_request",
                        "invalid_token"
                      ]
                    },
                    "error_description": {
                      "type": "string",
                      "description": "Human-readable reason for the error."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No loyalty customer matches the identifier.",
            "content": {
              "application/json": {
                "examples": {
                  "Customer not found": {
                    "value": {
                      "errors": [
                        {
                          "message": {
                            "customer": "Could not find customer"
                          }
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "description": "What went wrong.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "description": "The error message: a string, or an object keyed by field."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Send your app's access token for the merchant's store in the `X-Yotpo-Token` header of every request. To get a token, see [Generate Access Token](ref:generate-a-token). The API also reads the token from an `access_token` query parameter, but that isn't recommended: URLs end up in server and proxy logs. `Authorization: Bearer` is not supported."
      }
    }
  }
}
```

# Sibling pages

* [Introduction to Customers](https://docs.yotpo.com/reference/introduction-to-customers.md)
* [Create or Update Customer](https://docs.yotpo.com/reference/create-or-update-customer.md)