GET
/
subscriptions
/
{external_id}
Authorization
Path
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request GET "$LAGO_URL/api/v1/subscriptions/:external_id" \
  --header "Authorization: Bearer $API_KEY"
{
  "subscription": {
    "billing_time": "anniversary",
    "canceled_at": "2022-09-14T16:35:31Z",
    "created_at": "2022-08-08T00:00:00Z",
    "downgrade_plan_date": "null",
    "ending_at": "2022-10-08T00:00:00Z",
    "external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
    "external_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
    "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "name": "Repository A",
    "next_plan_code": "null",
    "plan_code": "premium",
    "previous_plan_code": "null",
    "started_at": "2022-08-08T00:00:00Z",
    "status": "active",
    "subscription_at": "2022-08-08T00:00:00Z",
    "terminated_at": "2022-09-14T16:35:31Z",
    "plan": {
      "active_subscriptions_count": 123,
      "amount_cents": 10000,
      "amount_currency": "USD",
      "code": "startup",
      "created_at": "2023-06-27T19:43:42Z",
      "draft_invoices_count": 123,
      "interval": "monthly",
      "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
      "name": "Startup"
    }
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

external_id
string
required

External ID of the existing subscription

Response

200 - application/json
subscription
object
required