# Read billing status

Source: https://ethicsportal.eu/developers/api/operations/getbillingstatus/

GET

/organizations/{organization\_id}/subscriptions.json

```
const url = 'https://secure.ethicsportal.eu/organizations/example/subscriptions.json';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request GET \
  --url https://secure.ethicsportal.eu/organizations/example/subscriptions.json \
  --header 'Authorization: Bearer <token>'
```

* EthicsPortal application

Access and subscription status, read from EthicsPortal’s synced billing records. Subscribing, changing plan and cancelling stay in the web application. A personal token also needs its user to be a current administrator.

## Authorizations

* **[personalToken](https://ethicsportal.eu/developers/api/#personaltoken)**  
billing:read
* **[organizationToken](https://ethicsportal.eu/developers/api/#organizationtoken)**  
billing:read

## Parameters

### Path Parameters

**organization\_id**

required

string

Obfuscated organisation ID returned by identity.

### Header Parameters

**If-None-Match**

string

The ETag of a response you already hold. If nothing changed, the response is 304 Not Modified with no body. It still counts toward rate limits and, where reads are audited, the audit trail.

## Responses

### 200

Billing status.

application/json

object

**access**

required

Whether the organisation currently has paid or granted access. The whistleblowing channel can be active only when this is true.

boolean

**complimentary**

required

Access granted by EthicsPortal without a subscription.

boolean

**subscription**

required

object

**status**

required

Stripe subscription status, such as active, trialing, past\_due or canceled.

string

**interval**

required

string | null

Allowed values: month year

**current\_period\_end**

required

string | null format: date-time

**ends\_at**

required

Set when the subscription has been cancelled and access ends at this time.

string | null format: date-time

**trial\_ends\_at**

required

string | null format: date-time

#### Example 

```
{
  "access": true,
  "complimentary": false,
  "subscription": {
    "status": "active",
    "interval": "year",
    "current_period_end": "2027-11-09T10:00:00Z",
    "ends_at": null,
    "trial_ends_at": null
  }
}
```

#### Headers

**ETag**

string

Weak validator of this response body. Send it back as If-None-Match.

### 304

Not modified since the ETag sent in If-None-Match. No body.

### 400

Invalid query or parameters

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_request",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 401

Missing, unknown, expired or revoked token

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "invalid_token",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 403

The token lacks the required scope (WWW-Authenticate names it), the user’s role does not allow the action, or an agreement must be accepted in the web application

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "insufficient_scope",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 404

Resource missing or inaccessible, or API access suspended

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "not_found",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```

### 429

Rate limited; retry after the Retry-After interval

application/json

object

**error**

required

object

**code**

required

string

Allowed values: invalid\_token forbidden insufficient\_scope not\_found invalid\_request agreement\_required rate\_limited idempotency\_key\_reused idempotency\_key\_in\_progress not\_retryable channel\_inactive invitation\_unavailable already\_subscribed no\_subscription

**feedback\_url**

required

Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.

string format: uri

#### Example 

```
{
  "error": {
    "code": "rate_limited",
    "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json"
  }
}
```
