primeflow

List subscriptions for the calling org

API endpoint: List subscriptions for the calling org

GET
/v1/subscriptions

Authorization

X-Reevit-Key<token>

API key for server-to-server authentication

In: header

Query Parameters

statusstring

Filter by subscription status

Value in: "active" | "paused" | "canceled"
customer_idstring

Filter by customer ID

plan_idstring

Filter by plan ID

created_afterstring

Filter by creation date (after)

Format: "date-time"
created_beforestring

Filter by creation date (before)

Format: "date-time"
limitinteger
Default: 50Minimum: 1Maximum: 200
offsetinteger
Default: 0Minimum: 0

Header Parameters

X-Org-IdRequiredstring

Organization identifier for multi-tenancy

Response Body

OK

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredarray<object>

Bad Request

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredstring

Error type/category

codeRequiredstring

Machine-readable error code

messageRequiredstring

Human-readable error message

detailsobject

Optional field-level error details

Internal Server Error

TypeScript Definitions

Use the response body type in TypeScript.

errorRequiredstring

Error type/category

codeRequiredstring

Machine-readable error code

messageRequiredstring

Human-readable error message

detailsobject

Optional field-level error details

curl -X GET "http://localhost:8081/v1/subscriptions?status=active&customer_id=string&plan_id=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&limit=50&offset=0" \
  -H "X-Org-Id: string" \
  -H "X-Reevit-Key: <token>"
fetch("http://localhost:8081/v1/subscriptions?status=active&customer_id=string&plan_id=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&limit=50&offset=0", {
  headers: {
    "X-Org-Id": "string",
    "X-Reevit-Key": "<token>"
  }
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "http://localhost:8081/v1/subscriptions?status=active&customer_id=string&plan_id=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&limit=50&offset=0"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("X-Org-Id", "string")
  req.Header.Add("X-Reevit-Key", "<token>")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "http://localhost:8081/v1/subscriptions?status=active&customer_id=string&plan_id=string&created_after=2019-08-24T14%3A15%3A22Z&created_before=2019-08-24T14%3A15%3A22Z&limit=50&offset=0"

response = requests.request("GET", url, headers = {
  "X-Org-Id": "string",
  "X-Reevit-Key": "<token>"
})

print(response.text)
[
  {
    "id": "string",
    "org_id": "string",
    "customer_id": "string",
    "plan_id": "string",
    "amount": 0,
    "currency": "string",
    "method": "string",
    "interval": "monthly",
    "status": "active",
    "next_renewal_at": "2019-08-24T14:15:22Z",
    "metadata": {},
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
]
{
  "error": "invalid_request",
  "code": "email_required",
  "message": "email is required",
  "details": {
    "metric": "workflow_executions",
    "used": "2000",
    "limit": "2000",
    "reset": "2025-01-01T00:00:00Z"
  }
}
{
  "error": "invalid_request",
  "code": "email_required",
  "message": "email is required",
  "details": {
    "metric": "workflow_executions",
    "used": "2000",
    "limit": "2000",
    "reset": "2025-01-01T00:00:00Z"
  }
}