Search and filter subscriptions
curl --request POST \
--url https://billing.funnelfox.com/{org_id}/v1/subscription/search \
--header 'Content-Type: application/json' \
--header 'ff-secret-key: <api-key>' \
--data '
{
"external_id": "<string>",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_eq": [
"<string>"
],
"status_consists": [
"<string>"
],
"created_at_from": "2023-11-07T05:31:56Z",
"created_at_to": "2023-11-07T05:31:56Z",
"order_by": "started_at",
"sort_direction": "desc",
"limit": 100,
"page": 1,
"next_check_from": "2023-11-07T05:31:56Z",
"next_check_to": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://billing.funnelfox.com/{org_id}/v1/subscription/search"
payload = {
"external_id": "<string>",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_eq": ["<string>"],
"status_consists": ["<string>"],
"created_at_from": "2023-11-07T05:31:56Z",
"created_at_to": "2023-11-07T05:31:56Z",
"order_by": "started_at",
"sort_direction": "desc",
"limit": 100,
"page": 1,
"next_check_from": "2023-11-07T05:31:56Z",
"next_check_to": "2023-11-07T05:31:56Z"
}
headers = {
"ff-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ff-secret-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
subs_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status_eq: ['<string>'],
status_consists: ['<string>'],
created_at_from: '2023-11-07T05:31:56Z',
created_at_to: '2023-11-07T05:31:56Z',
order_by: 'started_at',
sort_direction: 'desc',
limit: 100,
page: 1,
next_check_from: '2023-11-07T05:31:56Z',
next_check_to: '2023-11-07T05:31:56Z'
})
};
fetch('https://billing.funnelfox.com/{org_id}/v1/subscription/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.funnelfox.com/{org_id}/v1/subscription/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'subs_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'status_eq' => [
'<string>'
],
'status_consists' => [
'<string>'
],
'created_at_from' => '2023-11-07T05:31:56Z',
'created_at_to' => '2023-11-07T05:31:56Z',
'order_by' => 'started_at',
'sort_direction' => 'desc',
'limit' => 100,
'page' => 1,
'next_check_from' => '2023-11-07T05:31:56Z',
'next_check_to' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ff-secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.funnelfox.com/{org_id}/v1/subscription/search"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ff-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.funnelfox.com/{org_id}/v1/subscription/search")
.header("ff-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.funnelfox.com/{org_id}/v1/subscription/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ff-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"price_point": {
"ident": "<string>",
"currency": {
"code": "<string>",
"minor_units": 123,
"title": "<string>",
"symbol": "<string>"
},
"features": [
{
"ident": "<string>"
}
],
"lifetime_price": 123,
"intro_free_trial_period": 123,
"intro_paid_trial_price": 123,
"intro_paid_trial_period": 123,
"next_price": 123,
"next_period": 123
},
"status": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"current_period_starts_at": "2023-11-07T05:31:56Z",
"current_period_ends_at": "2023-11-07T05:31:56Z",
"next_check_at": "2023-11-07T05:31:56Z",
"iteration": 123,
"available_actions": [],
"initial_order_metadata": {},
"discounts": [
{
"discount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count_of_iterations": 123,
"count_of_iterations_available": 123,
"percent": 123,
"report": {}
}
],
"next_payment_at": "2023-11-07T05:31:56Z",
"unused_premium_after_pause": 123
}
]
}Subscription management
Search and filter subscriptions
Return subscriptions list with filters and pagination.
POST
/
subscription
/
search
Search and filter subscriptions
curl --request POST \
--url https://billing.funnelfox.com/{org_id}/v1/subscription/search \
--header 'Content-Type: application/json' \
--header 'ff-secret-key: <api-key>' \
--data '
{
"external_id": "<string>",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_eq": [
"<string>"
],
"status_consists": [
"<string>"
],
"created_at_from": "2023-11-07T05:31:56Z",
"created_at_to": "2023-11-07T05:31:56Z",
"order_by": "started_at",
"sort_direction": "desc",
"limit": 100,
"page": 1,
"next_check_from": "2023-11-07T05:31:56Z",
"next_check_to": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://billing.funnelfox.com/{org_id}/v1/subscription/search"
payload = {
"external_id": "<string>",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status_eq": ["<string>"],
"status_consists": ["<string>"],
"created_at_from": "2023-11-07T05:31:56Z",
"created_at_to": "2023-11-07T05:31:56Z",
"order_by": "started_at",
"sort_direction": "desc",
"limit": 100,
"page": 1,
"next_check_from": "2023-11-07T05:31:56Z",
"next_check_to": "2023-11-07T05:31:56Z"
}
headers = {
"ff-secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'ff-secret-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
subs_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
status_eq: ['<string>'],
status_consists: ['<string>'],
created_at_from: '2023-11-07T05:31:56Z',
created_at_to: '2023-11-07T05:31:56Z',
order_by: 'started_at',
sort_direction: 'desc',
limit: 100,
page: 1,
next_check_from: '2023-11-07T05:31:56Z',
next_check_to: '2023-11-07T05:31:56Z'
})
};
fetch('https://billing.funnelfox.com/{org_id}/v1/subscription/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://billing.funnelfox.com/{org_id}/v1/subscription/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'subs_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'status_eq' => [
'<string>'
],
'status_consists' => [
'<string>'
],
'created_at_from' => '2023-11-07T05:31:56Z',
'created_at_to' => '2023-11-07T05:31:56Z',
'order_by' => 'started_at',
'sort_direction' => 'desc',
'limit' => 100,
'page' => 1,
'next_check_from' => '2023-11-07T05:31:56Z',
'next_check_to' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"ff-secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://billing.funnelfox.com/{org_id}/v1/subscription/search"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ff-secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.funnelfox.com/{org_id}/v1/subscription/search")
.header("ff-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.funnelfox.com/{org_id}/v1/subscription/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ff-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"subs_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"status_eq\": [\n \"<string>\"\n ],\n \"status_consists\": [\n \"<string>\"\n ],\n \"created_at_from\": \"2023-11-07T05:31:56Z\",\n \"created_at_to\": \"2023-11-07T05:31:56Z\",\n \"order_by\": \"started_at\",\n \"sort_direction\": \"desc\",\n \"limit\": 100,\n \"page\": 1,\n \"next_check_from\": \"2023-11-07T05:31:56Z\",\n \"next_check_to\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_active": true,
"price_point": {
"ident": "<string>",
"currency": {
"code": "<string>",
"minor_units": 123,
"title": "<string>",
"symbol": "<string>"
},
"features": [
{
"ident": "<string>"
}
],
"lifetime_price": 123,
"intro_free_trial_period": 123,
"intro_paid_trial_price": 123,
"intro_paid_trial_period": 123,
"next_price": 123,
"next_period": 123
},
"status": [
"<string>"
],
"started_at": "2023-11-07T05:31:56Z",
"current_period_starts_at": "2023-11-07T05:31:56Z",
"current_period_ends_at": "2023-11-07T05:31:56Z",
"next_check_at": "2023-11-07T05:31:56Z",
"iteration": 123,
"available_actions": [],
"initial_order_metadata": {},
"discounts": [
{
"discount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subs_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"count_of_iterations": 123,
"count_of_iterations_available": 123,
"percent": 123,
"report": {}
}
],
"next_payment_at": "2023-11-07T05:31:56Z",
"unused_premium_after_pause": 123
}
]
}Authorizations
Secret key for FunnelFox Billing API. Required for all requests.
Path Parameters
Organization ID
Body
application/json
Maximum string length:
256Available options:
no_intro, free_trial, paid_trial Available options:
started_at, next_check Available options:
asc, desc Required range:
0 <= x <= 500Required range:
x >= 0Response
200 - application/json
List of subscriptions
Show child attributes
Show child attributes
Was this page helpful?
⌘I
