Migrate to AWS Partner Central 3.0 in 30 minutes.

Migrate now (opens in a new tab)
Skip to main content

Get a token, list your subscriptions, and read one — end to end, against the demo environment.

Base URLs: https://api.saasify.ai (production). Test against https://api-demo.saasify.ai (demo). See Environments.

Before you start

You need: a SaaSify user with a local password in the demo environment, and a role that can read subscriptions. Use a dedicated service user. If your tenant enforces SSO, create a local service user first.

This walkthrough uses https://api-demo.saasify.ai. Swap in https://api.saasify.ai when you go live.

​1. Get a token

Exchange your username and password for a bearer token at POST /api/token. See Authentication for the full details.

TOKEN=$(curl -s -X POST https://api-demo.saasify.ai/api/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "grant_type=password" \
  --data-urlencode "username=service-user@example.com" \
  --data-urlencode "password=YOUR_PASSWORD" \
  | python3 -c "import sys,json;print(json.load(sys.stdin)['access_token'])")

​2. List subscriptions

Send the token to POST /api/subscriptions/list. Remember the SaaSify envelope: the result is inside Data, and you must check Status even on an HTTP 200.

curl -s -X POST https://api-demo.saasify.ai/api/subscriptions/list \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"PageSize": 10, "StartIndex": 1}'

Paging and sorting parameters (PageSize, StartIndex, SortColumn, and so on) vary by endpoint — see Pagination and the operation's entry in the API reference.

​3. Read one subscription

Take a subscription ID from the list and read its detail with GET /api/subscriptions/{subscriptionId}.

curl -s https://api-demo.saasify.ai/api/subscriptions/SUBSCRIPTION_ID \
  -H "Authorization: Bearer $TOKEN"

​Next steps

Was this page helpful?