# Client Purchases

## Get the details of the purchases.

<mark style="color:blue;">`GET`</mark> `{API_URL}/client/purchases`

Auth required: YES

Please pass your API key as the username and API secret as the password as Basic Auth to access the endpoint

#### Query Parameters

| Name        | Type          | Description              |
| ----------- | ------------- | ------------------------ |
| userId      | String        | user id of the user      |
| email       | String        | email of the user        |
| phoneNumber | String        | phone number of the user |
| from        | ISODateString |                          |
| to          | ISODateString |                          |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

> You need to pass either phone number or email of the user from which hw has made the purcahse.

```json
{
    "transactionDetails": [
        {
            "promotional": false,
            "_id": "643e49dc2309ab30bc00ccf2",
            "userAccount": {
                "phoneNumber": "8712334265",
                "email": "bnnnn@gmail.com"
            },
            "clientId": {
                "name": "Demo Client"
            },
            "contentId": {
                "title": "Client-Story Id 1",
                "url": "https://csc-mock.netlify.app/5f92a62013332e0f667794dc/Client-Story-Id-1"
            },
            "buyingPrice": 319.21,
            "price": 399,
            "type": "PASS",
            "createdAt": "2023-04-18T07:42:20.749Z"
        }
    ],
    "pagination": {
        "pageNumber": 1,
        "pageSize": 10,
        "totalRecords": 1,
        "totalPages": 1
    }
}
```
