# Search Customers (Premium)

This endpoint was introduced on **ACFWP** version 3.0

### GE&#x54;**:** /wp-json/coupons/v1/searchcustomers <a href="#post-wp-json-loyalty-program-v-1-customers-points-user_id" id="post-wp-json-loyalty-program-v-1-customers-points-user_id"></a>

{% tabs %}
{% tab title="Request" %}
**Requirements:**

* Logged-in user
* user role with `manage_woocommerce` user capability

| Method | Endpoint                            |
| ------ | ----------------------------------- |
| GET    | /wp-json/coupons/v1/searchcustomers |

| Query Parameters | Required | Type    | Description    |
| ---------------- | -------- | ------- | -------------- |
| ​search          | ​yes     | ​string | search keyword |
| {% endtab %}     |          |         |                |

{% tab title="Request Example" %}
Search customers with first name as `John`

```
GET: http://example.com/wp-json/coupons/v1/searchcustomers?search=John
```

{% endtab %}

{% tab title="Response Example" %}
**Status: 200 OK**

Search customers with first name as `John`

```
[
  {
    "user_id": 7,
    "user_fullname": "John Smith",
    "user_email": "johnsmith@example.com"
  },
  {
    "user_id": 6,
    "user_fullname": "John Wayne",
    "user_email": "johnwayne@example.com"
  },
  ...
]
```

**Status: 403 Forbidden**

```
{
    "code": "rest_forbidden_context",
    "message": "Sorry, you are not allowed access to this endpoint.",
    "data": {
        "status": 401
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rymera.gitbook.io/advanced-coupons-api/coupons-v1-acfwp/search-customers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
