# Query a list of store credit entries

### GET: /wp-json/wc-store-credits/v1/entries

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

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

| Method | Endpoint                             |
| ------ | ------------------------------------ |
| GET    | /wp-json/wc-store-credits/v1/entries |

| Query Parameters | Required | Type    | Default value | Description                                                                        |
| ---------------- | -------- | ------- | ------------- | ---------------------------------------------------------------------------------- |
| page             | no       | integer | 1             | Current page to load in query.                                                     |
| per\_page        | no       | integer | 10            | Number of entries to load per page in query.                                       |
| sort\_by         | no       | string  | date          | Value to be based for sorting: `user_id`, `date`, `type`, `action`.                |
| sort\_order      | no       | string  | desc          | Order of sorting: `desc` or `asc`                                                  |
| user\_id         | no       | integer | 0             | Load entries for a specific user.                                                  |
| is\_admin        | no       | boolean | false         | Flag to set the displayed action links to be either for admin or for the frontend. |
| {% endtab %}     |          |         |               |                                                                                    |

{% tab title="Request Example" %}
Get store credits entry for user with ID of **10**

```
GET: http://example.com/wp-json/wc-store-credits/v1/entries?user_id=10
```

{% endtab %}

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

```
Headers:
{
...
X-TOTAL: 100
}

[
  {
    "key": "35",
    "id": 35,
    "amount_raw": 45,
    "amount": "$45.00",
    "type": "increase",
    "activity": "Refunded order",
    "user_id": 1,
    "date": "2021-11-16 13:12:10",
    "rel_link": "http://acfw.test/my-account/view-order/436/",
    "rel_label": "View Order",
    "note": ""
  },
  {
    "key": "34",
    "id": 34,
    "amount_raw": 10,
    "amount": "$10.00",
    "type": "increase",
    "activity": "Admin adjustment (increase)",
    "user_id": 1,
    "date": "2021-11-16 13:10:56",
    "rel_link": "",
    "rel_label": "-",
    "note": ""
  },
  ...
]
```

**Status: 401 Unauthorized**

```
{
    "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/wc-store-credits-v1/entries/query-a-list-of-store-credit-entries.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.
