# Get

## Retrieve a list of your subscriptions

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                              | Default                                                                               |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| q              | optional            | String    | A keyword to search for                                                                                                                                  |                                                                                       |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                                     | 0                                                                                     |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                                                    | 10                                                                                    |
| sort           | optional            | String    | Sort results by create\_date ascendending / descending (create\_date\_asc, create\_date\_desc) or name ascendending / descending (name\_asc, name\_desc) | create\_date\_desc                                                                    |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date)             | id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;q  offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/subscriptions.json?limit=2&offset=0"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0
);
$listSubscriptions = $yumpu->getSubscriptions($data);
print_r($listSubscriptions);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  limit: 2,
  offset: 0
};
yumpu.getSubscriptions(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0"};
System.out.println(y.getSubscriptions(params));
```

{% endtab %}
{% endtabs %}

Whatever language you are using, the result will be the same.

```bash
{
  "total": "5",
  "subscriptions": [
    {
      "id": "QOjiaWfWYWd7TBHE",
      "create_date": "2015-01-27 13:21:37",
      "update_date": "0000-00-00 00:00:00",
      "itc_product_id": "subscription1",
      "name": "subscription1",
      "description": "subscription1",
      "duration": "365",
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        }
      ]
    },
    {
      "id": "Xzb3GYb5dzimC3Ww",
      "create_date": "2015-01-27 09:58:17",
      "update_date": "0000-00-00 00:00:00",
      "itc_product_id": "subscription2",
      "name": "subscription2",
      "description": "subscription2",
      "duration": "93",
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        }
      ]
    },
    {
      ...
    }
  ],
  "state": "success",
  "completed_in": "0.0316"
}
```
