> For the complete documentation index, see [llms.txt](https://docs.subsprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.subsprotocol.com/developer-docs/api/get.md).

# Get

## API up ?

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/status`

This call is a good way to see if pur API is up and operational.

#### Path Parameters

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| appId<mark style="color:red;">\*</mark> | String | App ID      |
| chain<mark style="color:red;">\*</mark> | String | Chain Name  |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

{% tabs %}
{% tab title="200: OK All is working fine" %}

```json
{
    "status": "ok",
    "timestamp": 1694528528826
}
```

{% endtab %}
{% endtabs %}

## Get Payment IDs for an App

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/payments`

#### Path Parameters

| Name                                    | Type   | Description   |
| --------------------------------------- | ------ | ------------- |
| appId<mark style="color:red;">\*</mark> | String | App ID        |
| chain<mark style="color:red;">\*</mark> | String | Chain Name    |
| rpc<mark style="color:red;">\*</mark>   | String | Node Provider |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

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

```json
[
    {
        "paymentId": "0xdd346f6491955977a0f2ffdadd3efe4173e7ffd0404aaf4bb452ca5a78106dce",
        "payment": {
            "name": "5500 with 10 months",
            "owner": "0xc11CB8898B06AE1Ec901Bd8624E4D3F93a78a584",
            "fee": 0,
            "paymentType": 0,
            "paymentTokens": [
                {
                    "token": "0xA02f6adc7926efeBBd59Fd43A84f4E0c0c91e832",
                    "price": "550000000000000000000",
                    "firstAmount": "825000000000000000000"
                },
                {
                    "token": "0x0FA8781a83E46826621b3BC094Ea2A0212e71B23",
                    "price": "550000000000000000000",
                    "firstAmount": "825000000000000000000"
                },
                {
                    "token": "0xd393b1E02dA9831Ff419e22eA105aAe4c47E1253",
                    "price": "550000000000000000000",
                    "firstAmount": "825000000000000000000"
                }
            ],
            "trialPeriod": 0,
            "periodType": "MONTH",
            "limitPeriod": 10,
            "loadingTime": 3
        }
]
```

{% endtab %}
{% endtabs %}

## Check user subscription for an App

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/isMyUser`

#### Path Parameters

| Name                                    | Type   | Description   |
| --------------------------------------- | ------ | ------------- |
| appId<mark style="color:red;">\*</mark> | String | App ID        |
| chain<mark style="color:red;">\*</mark> | String | Chain Name    |
| user<mark style="color:red;">\*</mark>  | String | User Address  |
| rpc<mark style="color:red;">\*</mark>   | String | Node Provider |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

{% tabs %}
{% tab title="200: OK " %}
{% code lineNumbers="true" fullWidth="false" %}

```json
{
    "isSubscribed": false,
    "isTrial": false,
    "paymentId": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "subId": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## All subscribers for a specific App

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/subs`

#### Path Parameters

| Name                                    | Type   | Description   |
| --------------------------------------- | ------ | ------------- |
| appId<mark style="color:red;">\*</mark> | String | App ID        |
| chain<mark style="color:red;">\*</mark> | String | Chain Name    |
| rpc<mark style="color:red;">\*</mark>   | String | Node Provider |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | Api Key     |

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

```json
[
    {
        "subsId": "0xdb09f6a1baeacf8e0d63953fcf09536bce633e5bda1d57c60bb392351439a211",
        "payeeAddress": "0xD3C509e32983ffA469d48863CBBB275BD885E891",
        "tokenAddress": "0x326C977E6efc84E512bB9C30f76E30c160eD06FB",
        "PaymentName": "Premium",
        "finalPay": 200000000000000,
        "appId": 2,
        "paymentId": "0x2182d817093e51c19d2776aa2eee9b2c72d8a529a3d9a63a321c1634f569d984",
        "periodType": 5,
        "periodMultiplier": 2592000,
        "timePeriod": {
            "nTimePaid": 1,
            "limitPeriod": 36
        },
        "startTime": 1696281619,
        "activeTrial": false,
        "active": true,
        "nextPaymentTime": 1698873619,
        "renewTime": 1789593619
    }
]
```

{% endtab %}
{% endtabs %}

## Subscribers of a specific payment of an App

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/subsOfPayment`

#### Path Parameters

| Name                                        | Type   | Description   |
| ------------------------------------------- | ------ | ------------- |
| appId<mark style="color:red;">\*</mark>     | String | App ID        |
| chain<mark style="color:red;">\*</mark>     | String | Chain Name    |
| rpc<mark style="color:red;">\*</mark>       | String | Node Provider |
| paymentID<mark style="color:red;">\*</mark> | String | Payment ID    |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

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

```json
[
    {
        "subsId": "0xdb09f6a1baeacf8e0d63953fcf09536bce633e5bda1d57c60bb392351439a211",
        "payeeAddress": "0xD3C509e32983ffA469d48863CBBB275BD885E891",
        "tokenAddress": "0x326C977E6efc84E512bB9C30f76E30c160eD06FB",
        "PaymentName": "Premium",
        "finalPay": 200000000000000,
        "appId": 2,
        "paymentId": "0x2182d817093e51c19d2776aa2eee9b2c72d8a529a3d9a63a321c1634f569d984",
        "periodType": 5,
        "periodMultiplier": 2592000,
        "timePeriod": {
            "nTimePaid": 1,
            "limitPeriod": 36
        },
        "startTime": 1696281619,
        "activeTrial": false,
        "active": true,
        "nextPaymentTime": 1698873619,
        "renewTime": 1789593619
    }
]
```

{% endtab %}
{% endtabs %}

## All the subscriptions for a specific User

<mark style="color:blue;">`GET`</mark> `https://api.subsprotocol.com/creator/userSubs`

#### Path Parameters

| Name                                    | Type   | Description   |
| --------------------------------------- | ------ | ------------- |
| chain<mark style="color:red;">\*</mark> | String | Chain Name    |
| rpc<mark style="color:red;">\*</mark>   | String | Node Provider |
| user<mark style="color:red;">\*</mark>  | String | User Address  |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | API Key     |

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

```json
[
    {
        "subsId": "0x9062f838b0d875f3d892694883f209878037ffe6e81019821286e0c06d1ca92d",
        "appId": "2",
        "paymentId": "0x2182d817093e51c19d2776aa2eee9b2c72d8a529a3d9a63a321c1634f569d984",
        "token": "0x326C977E6efc84E512bB9C30f76E30c160eD06FB",
        "owner": "0xD3C509e32983ffA469d48863CBBB275BD885E891",
        "status": "active"
    }
]
```

{% endtab %}
{% endtabs %}
