> For the complete documentation index, see [llms.txt](https://docs.conscent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.conscent.ai/integrating-with-apis/purchased-subscriptions.md).

# Purchased Subscriptions

## Get the details of previously purchased subscriptions.

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

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      |
| from        | ISODateString |                          |
| to          | ISODateString |                          |
| phoneNumber | String        | phone number of the user |
| email       | String        | email of the user        |

{% 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
{
  "purchases": [
    {
      "manuallyRenewed": false,
      "renewSubscription": false,
      "availedOffers": ["617ba48ec3b5066393988f22"],
      "promotional": false,
      "categories": [],
      "freeTrial": false,
      "migrated": false,
      "clientId": "5f92a62013332e0f667794dc",
      "clientContentId": "Client Story Id 1",
      "contentId": "5fbe46efbee15f1cebc81515",
      "buyingPrice": 100.36,
      "price": 104,
			"partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "priceDetails": {
        "price": 104,
        "currency": "INR"
      },
      "subscriptionDetails": {
        "inrPrice": 104,
        "duration": 1
      },
      "expiryDate": "2022-03-28T12:49:02.844Z",
      "subscriptionId": "61a49855fabe8d7705a2cab4",
      "tierId": "61a49855fabe8d7705a2cab6",
      "createdAt": "2022-03-03T09:13:53.266Z",
      "userId": "613720ec6a14e1100bdfb9f5",
      "userEmail": "asdf@sdf.co",
      "userPhoneNumber": "129347792",
      "userName": "asdf",
      "userAddress": {
        "apartment": "",
        "area": "",
        "pincode": "",
        "landmark": "",
        "city": "",
        "state": "",
        "country": ""
      },
      "clientSpecificUserId": "234234612"
    },
    {
      "manuallyRenewed": false,
      "renewSubscription": false,
      "availedOffers": [],
      "promotional": false,
      "categories": [],
			"partialAccess": false,
      "sectionsInclude": [],
      "authorsInclude": [],
      "sectionsExclude": [],
      "authorsExclude": [],
      "tagsInclude": [],
      "tagsExclude": [],
      "freeTrial": false,
      "migrated": false,
      "clientId": "5f92a62013332e0f667794dc",
      "clientContentId": "Client Story Id 1",
      "contentId": "5fbe46efbee15f1cebc81515",
      "buyingPrice": 193.97,
      "price": 201,
      "priceDetails": {
        "price": 201,
        "currency": "INR"
      },
      "subscriptionDetails": {
        "inrPrice": 201,
        "duration": 2
      },
      "expiryDate": "2022-04-25T08:00:12.714Z",
      "subscriptionId": "617a718d04ab353a12d84d30",
      "tierId": "6180db518634ae0b03c136b5",
      "userId": "5fca03a52185f150382ff144",
      "userEmail": "test+stagetest@test.com",
      "userPhoneNumber": "9999999999",
      "userName": "test name",
      "userAddress": {
        "apartment": "India",
        "area": "India",
        "pincode": "123423",
        "landmark": "India",
        "city": "test",
        "state": "ANDHRA PRADESH",
        "country": "IN"
      },
      "clientSpecificUserId": "234234612"
    }
  ],
  "paginationInfo": {
    "pageNumber": 1,
    "pageSize": 2,
    "recordsReturned": 2
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.conscent.ai/integrating-with-apis/purchased-subscriptions.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.
