Operations API
Subscriptions
List All Subscriptions
this api endpoint ( get get ) retrieves all your active subscriptions the response is paginated; therefore, you should use the 'page' parameter for navigating through the results in subsequent requests on successful completion, it returns an array of subscription object docid\ k0wuvfe yqdvzc3q awny the number of available results and the flags used for filtering permissions subscriptions view query parameters page fetch the results from a specific page it defaults to 1 per page the number of results to fetch per page the maximum is 50 , and if it defaults to 10 from appendix docid\ kfbmx4q3dxjtduqf75yx1 start date used for filtering (the date the customer was created) to appendix docid\ kfbmx4q3dxjtduqf75yx1 end date used for filtering (the date the customer was created) sort by an optional identifier used for sorting results available options are status , email and payment count filter optional text used for filtering results by customer email affiliate partner id customer id if provided, it will return the subscriptions of the customer product id if provided, it will return the subscriptions of the product cancelled set this parameter to true if you like to fetch cancelled subscriptions order determines in which order the results are returned the available options are asc (ascending) and desc (descending) the default value is desc currency appendix docid\ kfbmx4q3dxjtduqf75yx1 filters subscriptions by currency billing cycle used to filter subscriptions by billing cycle the available options are day , week , month and year instalments set this parameter to true if you like to fetch only subscriptions with type instalment require "uri" require "net/http" url = uri("https //api tamio com/v2/subscriptions/list?page=1\&per page=10") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api tamio com/v2/subscriptions/list?page=1\&per page=10", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/subscriptions/list?page=1\&per page=10' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "subscriptions" \[ { "id" "c121e306 b129 4289 a093 03d71700cee4", "object" "subscription", "next billing date" 1666572115, "cancellation date" null, "completion date" null, "resumes at" null, "customer" { "id" "0f60c860 ec5a 4a53 b730 9388eb7922d7", "name" "john", "last name" "doe", "email" "johndoe\@example com", "locale" "en" }, "products" \[ { "id" "957003bd dc98 422d 8dc7 44929e191a70", "name" "awesome billing plan" } ], "payment count" 13, "status" "active", "gateway subscription id" "sub 1lhyvjgvhw7af69dgzqsqr9r", "type" "subscription", "gateway" "stripe", "billing cycle" "month", "interval" 1, "currency" "eur", "price" 100 } ], "total results" 1, "page" 1, "per page" 10, "sort by" null, "filter" null }