Skip to main content
GET
/
external
/
subscriptions
Get subscriptions
curl --request GET \
  --url https://platform.runonatlas.com/external/subscriptions \
  --header 'x-api-key: <api-key>'
{
  "results": [
    {
      "createdAt": "2021-01-01T00:00:00.000Z",
      "id": "atlas-internal-subscription-id-123",
      "startDate": "2021-01-01T00:00:00.000Z",
      "status": "active",
      "updatedAt": "2021-01-01T00:00:00.000Z",
      "allowCustomerChanges": true,
      "autoChargeInvoice": false,
      "autoSyncInvoice": true,
      "autoSendInvoice": true,
      "paymentGateway": "Stripe",
      "isTrial": false,
      "customerId": "atlas-internal-customer-id-123",
      "planId": "atlas-internal-plan-id-123",
      "merchantId": "atlas-internal-merchant-id-123",
      "billingCadence": "monthly",
      "currency": "USD",
      "endDate": "2021-12-31T00:00:00.000Z",
      "netTerms": "net30",
      "chargeForUsageBasedPricesDuringTrial": false
    }
  ],
  "count": 100,
  "pages": 10,
  "currentPage": 1
}

Authorizations

x-api-key
string
header
required

You can obtain this key from the Atlas dashboard. It must be of type secret

Query Parameters

customerId
string

The Atlas customer ID

Minimum string length: 1
Example:

"atlas-internal-customer-id-123"

id
string

The Atlas subscription ID

Minimum string length: 1
Example:

"atlas-internal-subscription-id-123"

planId
string

The Atlas plan ID

Minimum string length: 1
Example:

"atlas-internal-plan-id-123"

status
enum<string>

The status of the subscription

Available options:
draft,
pendingActivation,
active,
ended,
deleted
Example:

"active"

order
enum<string>
default:asc

The order of the results.

Available options:
asc,
desc
Example:

"asc"

page
integer
default:1

The page number of the results.

Required range: x >= 1
Example:

1

pageSize
integer
default:10

The number of results per page.

Required range: 1 <= x <= 100
Example:

10

orderBy
enum<string>
default:id

The fields that can be used to order the results by.

Available options:
createdAt,
endDate,
id,
startDate,
status,
updatedAt
Example:

"id"

Response

The subscriptions that have been retrieved.

results
object[]
required
count
number
required

The total number of results.

Example:

100

pages
number
required

The total number of pages.

Example:

10

currentPage
number
required

The current page number.

Example:

1