Operations API
Subscriptions
Retrieve Subscription
this api endpoint ( get get ) fetches a subscription by id if the request succeeds, it will return a subscription object docid\ k0wuvfe yqdvzc3q awny permissions subscriptions view path parameters id the id of the subscription to retrieve require "uri" require "net/http" url = uri("https //api tamio com/v2/subscriptions/retrieve/c121e306 b129 4289 a093 03d71700cee4") 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/retrieve/c121e306 b129 4289 a093 03d71700cee4", 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/retrieve/c121e306 b129 4289 a093 03d71700cee4' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'{ "status" 200, "subscription" { "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 } }