Skip to content

Subscriptions

Get current subscription and usage

GET/subscriptions

Returns the current account subscription tier, usage statistics, and limits

Returns

subscriptionobject
usageobject
limitsobject
is_over_limitboolean
json
{
  "subscription": {
    "id": "string",
    "account_id": "string",
    "tier": "free",
    "spending_limit_cents": 0,
    "is_internal": true,
    "created_at": "string",
    "updated_at": "string"
  },
  "usage": {
    "documents_count": 0,
    "entities_active": 0,
    "period_start": "string",
    "period_end": "string"
  },
  "limits": {
    "entities": 0,
    "documents_per_month": 0
  },
  "is_over_limit": true
}

Check if account can create new entity

GET/subscriptions/check-entity-limit

Returns whether the account can create a new production entity based on subscription tier

Returns

can_createboolean
current_countnumber
limitnumbernullable
json
{
  "can_create": true,
  "current_count": 0,
  "limit": 0
}

Update spending limit

PATCH/subscriptions/spending-limit

Update the spending limit for metered tier subscriptions. Only applicable for metered accounts.

Body parameters

spending_limit_centsnumberrequirednullable
curl -X PATCH "https://eu.spaceinvoices.com/subscriptions/spending-limit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "spending_limit_cents": 0
  }'

Returns

spending_limit_centsnumbernullable
json
{
  "spending_limit_cents": 0
}