This documentation aims to provide all the information you need to work with our API.
Base URL
https://upzelo.com
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can get your AppID and API key from the Developer section of Upzelo.
api/prices
curl --request GET \
--get "https://upzelo.com/api/prices?limit=1&cursor=null" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/prices"
);
const params = {
"limit": 1,
"cursor": null,
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/prices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/prices'
params = {
'limit': '1',
'cursor': 'null',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string The unique ID for the Price
.
title
string The name of the Price
.
currency
string ISO4217 formatted currency code. Example: GBP
price
integer The cent value of the Price
. (100 = $1 for example)
tiered
boolean If the Price
is tiered or not.
type
string The type of Price
.
interval
string The interval of the Price
.
interval_count
integer The interval.
{
"data": {
"prices": [
{
"id": "upz_prc_a8292ec8135580e2392fb015",
"title": null,
"currency": "gbp",
"price": 1000,
"tiered": false,
"type": "recurring",
"interval": "month",
"interval_count": 1
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJwcmljZXMuaWQiOjUxLCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
"previous_cursor": null
}
}
api/prices
curl --request POST \
"https://upzelo.com/api/prices" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"price-1233\",
\"product_id\": \"upz_prod_12374\",
\"title\": \"middle-out-gbp\",
\"currency\": \"GBP\",
\"price\": 4900,
\"type\": \"recurring\",
\"interval\": \"month\",
\"interval_count\": 1
}"
const url = new URL(
"https://upzelo.com/api/prices"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "price-1233",
"product_id": "upz_prod_12374",
"title": "middle-out-gbp",
"currency": "GBP",
"price": 4900,
"type": "recurring",
"interval": "month",
"interval_count": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/prices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'price-1233',
'product_id' => 'upz_prod_12374',
'title' => 'middle-out-gbp',
'currency' => 'GBP',
'price' => 4900,
'type' => 'recurring',
'interval' => 'month',
'interval_count' => 1,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/prices'
payload = {
"id": "price-1233",
"product_id": "upz_prod_12374",
"title": "middle-out-gbp",
"currency": "GBP",
"price": 4900,
"type": "recurring",
"interval": "month",
"interval_count": 1
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string The unique ID for the Price
.
title
string The name of the Price
.
currency
string The currency of the Price
.
price
integer The cent value of the Price
. (100 = $1 for example)
tiered
boolean If the Price
is tiered or not.
type
string The type of Price
.
interval
string The interval of the Price
.
interval_count
integer The interval.
{
"data": {
"price": {
"id": "upz_prc_96f6081bdd7a8cec76b91d70",
"title": null,
"currency": "gbp",
"price": 1000,
"tiered": false,
"type": "recurring",
"interval": "month",
"interval_count": 1
}
}
}
api/prices/{id}
curl --request GET \
--get "https://upzelo.com/api/prices/upz_prc_96f6081bdd7a8cec76b91d70" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/prices/upz_prc_96f6081bdd7a8cec76b91d70"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/prices/upz_prc_96f6081bdd7a8cec76b91d70',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/prices/upz_prc_96f6081bdd7a8cec76b91d70'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers)
response.json()
id
string The unique ID for the Price
.
title
string The name of the Price
.
currency
string The currency of the Price
.
price
integer The cent value of the Price
. (100 = $1 for example)
tiered
boolean If the Price
is tiered or not.
type
string The type of Price
.
interval
string The interval of the Price
.
interval_count
integer The interval.
{
"data": {
"price": {
"id": "upz_prc_96f6081bdd7a8cec76b91d70",
"title": null,
"currency": "gbp",
"price": 1000,
"tiered": false,
"type": "recurring",
"interval": "month",
"interval_count": 1
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_prc_doesntexist"
}
]
}
api/customers
Lists the Customers that exist on Upzelo
curl --request GET \
--get "https://upzelo.com/api/customers?limit=1&cursor=null" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/customers"
);
const params = {
"limit": 1,
"cursor": null,
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/customers',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/customers'
params = {
'limit': '1',
'cursor': 'null',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string Unique ID for the Customer
.
name
string The name of the Customer
. (nullable)
email
string The email for the Customer
. (nullable)
metadata
object Metadata for the Customer
. Key value array
pagination['has_more']
boolean If the response has more results or not.
pagination['next_cursor']
string The cursor for the next set of results. (nullable)
pagination['previous_cursor']
string The cursor for the previous set of results. (nullable)
{
"data": {
"customers": [
{
"id": "upz_cus_224148bd7eea86d3e443be21",
"name": "Richard Hendricks",
"email": "richard@piedpiper.com",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJjdXN0b21lcnMuaWQiOjEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"previous_cursor": null
}
}
api/customers
curl --request POST \
"https://upzelo.com/api/customers" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"customer-1233\",
\"name\": \"Richard Hendricks\",
\"email\": \"richard@piedpiper.com\",
\"description\": \"Created middle-out compression\",
\"created\": \"2022-08-05T09:31:02\",
\"phone\": \"+447123456789\",
\"metadata\": {
\"signup-source\": \"facebook\",
\"marketing-campaign\": \"summer-2022\"
}
}"
const url = new URL(
"https://upzelo.com/api/customers"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "customer-1233",
"name": "Richard Hendricks",
"email": "richard@piedpiper.com",
"description": "Created middle-out compression",
"created": "2022-08-05T09:31:02",
"phone": "+447123456789",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/customers',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'customer-1233',
'name' => 'Richard Hendricks',
'email' => 'richard@piedpiper.com',
'description' => 'Created middle-out compression',
'created' => '2022-08-05T09:31:02',
'phone' => '+447123456789',
'metadata' => [
'signup-source' => 'facebook',
'marketing-campaign' => 'summer-2022',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/customers'
payload = {
"id": "customer-1233",
"name": "Richard Hendricks",
"email": "richard@piedpiper.com",
"description": "Created middle-out compression",
"created": "2022-08-05T09:31:02",
"phone": "+447123456789",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string Unique ID for the Customer
.
name
string The name of the Customer
. (nullable)
email
string The email for the Customer
. (nullable)
{
"data": {
"customer": {
"id": "upz_cus_f71131445dc150e5dfab1752",
"name": "Richard Hendricks",
"email": "richard@piedpiper.com",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
}
}
}
api/customers/{id}
curl --request GET \
--get "https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers)
response.json()
id
string Unique ID for the Customer
.
name
string The name of the Customer
. (nullable)
email
string The email for the Customer
. (nullable)
{
"data": {
"customer": {
"id": "upz_cus_f71131445dc150e5dfab1752",
"name": "Richard Hendricks",
"email": "richard@piedpiper.com",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_cus_doesntexist"
}
]
}
api/customers/{id}
curl --request PUT \
"https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/customers/upz_cus_76061f3bfae24e02ef3e7528'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('PUT', url, headers=headers)
response.json()
id
string Unique ID for the Customer
.
name
string The name of the Customer
.
email
string The email for the Customer
.
{
"data": {
"customer": {
"id": "upz_cus_f71131445dc150e5dfab1752",
"name": "Anonymous",
"email": "anonymous@example.com",
"metadata": {
"signup-source": "facebook",
"marketing-campaign": "summer-2022"
}
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_cus_doesntexist"
}
]
}
api/discounts
Lists the Discounts that exist on Upzelo
curl --request GET \
--get "https://upzelo.com/api/discounts?limit=1&cursor=null" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/discounts"
);
const params = {
"limit": 1,
"cursor": null,
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/discounts',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/discounts'
params = {
'limit': '1',
'cursor': 'null',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string Unique ID for the Discount
.
name
string The name of the Discount
. (nullable).
duration
string The type of Discount
duration. once|repeating|forever
.
duration_in_months
integer The duration of the Discount
in months, null unless duration
is
repeating
.
amount_off
integer The amount off in cent value (100 = $1 for example), null if percent_off
is set.
percent_off
integer The amount off in percent, null if amount_off
is set.
currency
string ISO4217 formatted currency code. Example: GBP
pagination['has_more']
boolean If the response has more results or not.
pagination['next_cursor']
string The cursor for the next set of results. (nullable)
pagination['previous_cursor']
string The cursor for the previous set of results. (nullable)
{
"data": {
"discounts": [
{
"id": null,
"name": "Upzelo template money offer",
"duration": "once",
"duration_in_months": null,
"amount_off": 1000,
"percent_off": null,
"currency": "GBP"
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJjb3Vwb25zLmlkIjo3LCJfcG9pbnRzVG9OZXh0SXRlbXMiOnRydWV9",
"previous_cursor": null
}
}
api/discounts
curl --request POST \
"https://upzelo.com/api/discounts" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"et\",
\"name\": \"dolorum\",
\"duration\": \"forever\",
\"amount_off\": 6,
\"percent_off\": 5,
\"currency\": \"GBP\"
}"
const url = new URL(
"https://upzelo.com/api/discounts"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "et",
"name": "dolorum",
"duration": "forever",
"amount_off": 6,
"percent_off": 5,
"currency": "GBP"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/discounts',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'et',
'name' => 'dolorum',
'duration' => 'forever',
'amount_off' => 6,
'percent_off' => 5,
'currency' => 'GBP',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/discounts'
payload = {
"id": "et",
"name": "dolorum",
"duration": "forever",
"amount_off": 6,
"percent_off": 5,
"currency": "GBP"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string Unique ID for the Discount
.
name
string The name of the Discount
. (nullable).
duration
string The type of Discount
duration. (once
|repeating
|forever
).
duration_in_months
integer The duration of the Discount
in months, null unless duration
is
repeating
.
amount_off
integer The amount off in cent value (100 = $1 for example), null if percent_off
is set.
percent_off
integer The amount off in percent, null if amount_off
is set.
currency
string ISO4217 formatted currency code. Example: GBP
{
"data": {
"discount": {
"id": "upz_dis_64ed0421075ef4bbd0e4bcbd",
"name": "Test Discount",
"duration": "forever",
"duration_in_months": null,
"amount_off": 1,
"percent_off": null,
"currency": "gbp"
}
}
}
api/discounts/{id}
curl --request GET \
--get "https://upzelo.com/api/discounts/upz_dis_64ed0421075ef4bbd0e4bcbd" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/discounts/upz_dis_64ed0421075ef4bbd0e4bcbd"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/discounts/upz_dis_64ed0421075ef4bbd0e4bcbd',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/discounts/upz_dis_64ed0421075ef4bbd0e4bcbd'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers)
response.json()
id
string Unique ID for the Discount
.
name
string The name of the Discount
. (nullable).
duration
string The type of Discount
duration. (once
|repeating
|forever
).
duration_in_months
integer The duration of the Discount
in months, null unless duration
is
repeating
.
amount_off
integer The amount off in cent value (100 = $1 for example), null if percent_off
is set.
percent_off
integer The amount off in percent, null if amount_off
is set.
currency
string ISO4217 formatted currency code. Example: GBP
{
"data": {
"discount": {
"id": "upz_dis_64ed0421075ef4bbd0e4bcbd",
"name": "Test Discount",
"duration": "forever",
"duration_in_months": null,
"amount_off": 1,
"percent_off": null,
"currency": "gbp"
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_dis_doesntexist"
}
]
}
api/invoices
curl --request GET \
--get "https://upzelo.com/api/invoices?limit=1&cursor=null&include=quasi" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/invoices"
);
const params = {
"limit": 1,
"cursor": null,
"include": "quasi",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/invoices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
'include' => 'quasi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/invoices'
params = {
'limit': '1',
'cursor': 'null',
'include': 'quasi',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string The unique ID for the Invoice
.
total
integer The Invoice
total.
created
integer The Invoice
creation time.
period_start
integer The start period for the Invoice
.
period_end
integer The end period for the Invoice
.
currency
string ISO4217 formatted currency code.
customer_id
string The ID of the Customer
the Invoice
belongs to.
subscription_id
string The ID of the Subscription
the Invoice
belongs to.
pagination['has_more']
boolean If the response has more results or not.
pagination['next_cursor']
string The cursor for the next set of results. (nullable)
pagination['previous_cursor']
string The cursor for the previous set of results. (nullable)
{
"data": {
"invoices": [
{
"id": "upz_inv_eb40633bea97dbeff689909e",
"total": 10000,
"created": 1586044800,
"period_start": 1586044800,
"period_end": 1588636800,
"currency": "GBP",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"subscription_id": "upz_sub_3256ab69668e527ac869532f"
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJpbnZvaWNlcy5pZCI6NTMsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"previous_cursor": null
}
}
api/invoices
curl --request POST \
"https://upzelo.com/api/invoices" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"natus\",
\"total\": 15,
\"created\": \"2022-11-10T16:10:41\",
\"period_start\": \"2022-11-10T16:10:41\",
\"period_end\": \"2022-11-10T16:10:41\",
\"currency\": \"GBP\",
\"customer_id\": \"repellat\",
\"subscription_id\": \"est\",
\"discounts\": [
\"nostrum\"
],
\"line_items\": [
{
\"id\": \"minima\",
\"amount\": 11,
\"currency\": \"quia\",
\"quantity\": 20,
\"discount_amount\": 3,
\"tax_amount\": 5,
\"period_start\": \"2022-11-10T16:10:41\",
\"period_end\": \"2022-11-10T16:10:41\",
\"interval\": \"day\",
\"interval_count\": 12,
\"type\": \"recurring\"
}
]
}"
const url = new URL(
"https://upzelo.com/api/invoices"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "natus",
"total": 15,
"created": "2022-11-10T16:10:41",
"period_start": "2022-11-10T16:10:41",
"period_end": "2022-11-10T16:10:41",
"currency": "GBP",
"customer_id": "repellat",
"subscription_id": "est",
"discounts": [
"nostrum"
],
"line_items": [
{
"id": "minima",
"amount": 11,
"currency": "quia",
"quantity": 20,
"discount_amount": 3,
"tax_amount": 5,
"period_start": "2022-11-10T16:10:41",
"period_end": "2022-11-10T16:10:41",
"interval": "day",
"interval_count": 12,
"type": "recurring"
}
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/invoices',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'natus',
'total' => 15,
'created' => '2022-11-10T16:10:41',
'period_start' => '2022-11-10T16:10:41',
'period_end' => '2022-11-10T16:10:41',
'currency' => 'GBP',
'customer_id' => 'repellat',
'subscription_id' => 'est',
'discounts' => [
'nostrum',
],
'line_items' => [
[
'id' => 'minima',
'amount' => 11,
'currency' => 'quia',
'quantity' => 20,
'discount_amount' => 3,
'tax_amount' => 5,
'period_start' => '2022-11-10T16:10:41',
'period_end' => '2022-11-10T16:10:41',
'interval' => 'day',
'interval_count' => 12,
'type' => 'recurring',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/invoices'
payload = {
"id": "natus",
"total": 15,
"created": "2022-11-10T16:10:41",
"period_start": "2022-11-10T16:10:41",
"period_end": "2022-11-10T16:10:41",
"currency": "GBP",
"customer_id": "repellat",
"subscription_id": "est",
"discounts": [
"nostrum"
],
"line_items": [
{
"id": "minima",
"amount": 11,
"currency": "quia",
"quantity": 20,
"discount_amount": 3,
"tax_amount": 5,
"period_start": "2022-11-10T16:10:41",
"period_end": "2022-11-10T16:10:41",
"interval": "day",
"interval_count": 12,
"type": "recurring"
}
]
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string The unique ID for the Invoice
.
total
integer The Invoice
total.
created
integer The Invoice
creation time.
period_start
integer The start period for the Invoice
.
period_end
integer The end period for the Invoice
.
currency
string ISO4217 formatted currency code.
customer_id
string The ID of the Customer
the Invoice
belongs to.
subscription_id
string The ID of the Subscription
the Invoice
belongs to.
{
"data": {
"invoice": {
"id": "upz_inv_e4a7a78ef8627d991b50ea1b",
"total": 10000,
"created": 1586044800,
"period_start": 1586044800,
"period_end": 1588636800,
"currency": "GBP",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"subscription_id": "upz_sub_3256ab69668e527ac869532f"
}
}
}
api/invoices/{id}
curl --request GET \
--get "https://upzelo.com/api/invoices/1?include=aut" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/invoices/1"
);
const params = {
"include": "aut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/invoices/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'include' => 'aut',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/invoices/1'
params = {
'include': 'aut',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string The unique ID for the Invoice
.
total
integer The Invoice
total.
created
integer The Invoice
creation time.
period_start
integer The start period for the Invoice
.
period_end
integer The end period for the Invoice
.
currency
string ISO4217 formatted currency code.
customer_id
string The ID of the Customer
the Invoice
belongs to.
subscription_id
string The ID of the Subscription
the Invoice
belongs to.
{
"data": {
"invoice": {
"id": "upz_inv_e4a7a78ef8627d991b50ea1b",
"total": 10000,
"created": 1586044800,
"period_start": 1586044800,
"period_end": 1588636800,
"currency": "GBP",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"subscription_id": "upz_sub_3256ab69668e527ac869532f"
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_inv_doesntexist"
}
]
}
api/products
curl --request GET \
--get "https://upzelo.com/api/products?limit=1&cursor=null&include=deleniti" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/products"
);
const params = {
"limit": 1,
"cursor": null,
"include": "deleniti",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/products',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
'include' => 'deleniti',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/products'
params = {
'limit': '1',
'cursor': 'null',
'include': 'deleniti',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string Unique ID for the Product
.
name
string The name of the Product
.
pagination['has_more']
boolean If the response has more results or not.
pagination['next_cursor']
string The cursor for the next set of results. (nullable)
pagination['previous_cursor']
string The cursor for the previous set of results. (nullable)
{
"data": {
"products": [
{
"id": "upz_prod_cff859051a9c67c58b9f196",
"name": "Test Product"
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJwcm9kdWN0cy5pZCI6MTYsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"previous_cursor": null
}
}
api/products
curl --request POST \
"https://upzelo.com/api/products" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"product-1233\",
\"name\": \"Middle out compression\"
}"
const url = new URL(
"https://upzelo.com/api/products"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "product-1233",
"name": "Middle out compression"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/products',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'product-1233',
'name' => 'Middle out compression',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/products'
payload = {
"id": "product-1233",
"name": "Middle out compression"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string Unique ID for the Product
.
name
string The name of the Product
.
{
"data": {
"product": {
"id": "upz_prod_d500626f627e3d4a9023486",
"name": "Test Product"
}
}
}
api/products/{id}
curl --request GET \
--get "https://upzelo.com/api/products/3?include=in" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/products/3"
);
const params = {
"include": "in",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/products/3',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'include' => 'in',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/products/3'
params = {
'include': 'in',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string Unique ID for the Product
.
name
string The name of the Product
.
{
"data": {
"product": {
"id": "upz_prod_d500626f627e3d4a9023486",
"name": "Test Product"
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_prod_doesntexist"
}
]
}
api/subscriptions
curl --request GET \
--get "https://upzelo.com/api/subscriptions?limit=1&cursor=null" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/subscriptions"
);
const params = {
"limit": 1,
"cursor": null,
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/subscriptions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'query' => [
'limit' => 1,
'cursor' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/subscriptions'
params = {
'limit': '1',
'cursor': 'null',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
id
string The unique ID of the Subscription
.
customer_id
string The unique Upzelo ID of the Customer
.
current_period_start
integer The start of the current billing period.
current_period_end
integer The end of the current billing period.
cancel_at_period_end
boolean If the Subscription
is due to cancel.
status
string The status of the Subscription
.
start_date
integer The start date of the Subscription
.
canceled_at
?int The date the Subscription
was canceled.
{
"data": {
"subscriptions": [
{
"id": "upz_sub_3256ab69668e527ac869532f",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"current_period_start": 1659182400,
"current_period_end": 1661860800,
"cancel_at_period_end": false,
"status": "active",
"start_date": 1659182400,
"canceled_at": null
}
]
},
"pagination": {
"has_more": true,
"next_cursor": "eyJzdWJzY3JpcHRpb25zLmlkIjoyNCwiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
"previous_cursor": null
}
}
api/subscriptions
curl --request POST \
"https://upzelo.com/api/subscriptions" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"id\": \"subscription-1233\",
\"customer_id\": \"upz_cus_123344\",
\"customer\": {
\"id\": \"voluptatem\",
\"name\": \"eum\",
\"email\": \"jackie70@example.org\",
\"description\": \"et\",
\"created\": \"2022-11-10T16:10:41\",
\"phone\": \"sed\"
},
\"current_period_start\": \"dolores\",
\"current_period_end\": \"earum\",
\"cancel_at_period_end\": true,
\"status\": \"consequatur\",
\"start_date\": \"a\",
\"canceled_at\": \"ut\",
\"created\": \"quas\",
\"price_id\": \"cumque\",
\"metadata\": []
}"
const url = new URL(
"https://upzelo.com/api/subscriptions"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"id": "subscription-1233",
"customer_id": "upz_cus_123344",
"customer": {
"id": "voluptatem",
"name": "eum",
"email": "jackie70@example.org",
"description": "et",
"created": "2022-11-10T16:10:41",
"phone": "sed"
},
"current_period_start": "dolores",
"current_period_end": "earum",
"cancel_at_period_end": true,
"status": "consequatur",
"start_date": "a",
"canceled_at": "ut",
"created": "quas",
"price_id": "cumque",
"metadata": []
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://upzelo.com/api/subscriptions',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'id' => 'subscription-1233',
'customer_id' => 'upz_cus_123344',
'customer' => [
'id' => 'voluptatem',
'name' => 'eum',
'email' => 'jackie70@example.org',
'description' => 'et',
'created' => '2022-11-10T16:10:41',
'phone' => 'sed',
],
'current_period_start' => 'dolores',
'current_period_end' => 'earum',
'cancel_at_period_end' => true,
'status' => 'consequatur',
'start_date' => 'a',
'canceled_at' => 'ut',
'created' => 'quas',
'price_id' => 'cumque',
'metadata' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/subscriptions'
payload = {
"id": "subscription-1233",
"customer_id": "upz_cus_123344",
"customer": {
"id": "voluptatem",
"name": "eum",
"email": "jackie70@example.org",
"description": "et",
"created": "2022-11-10T16:10:41",
"phone": "sed"
},
"current_period_start": "dolores",
"current_period_end": "earum",
"cancel_at_period_end": true,
"status": "consequatur",
"start_date": "a",
"canceled_at": "ut",
"created": "quas",
"price_id": "cumque",
"metadata": []
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
id
string The unique ID of the Subscription
.
customer_id
string The unique Upzelo ID of the Customer
.
current_period_start
integer The start of the current billing period.
current_period_end
integer The end of the current billing period.
cancel_at_period_end
boolean If the Subscription
is due to cancel.
status
string The status of the Subscription
.
start_date
integer The start date of the Subscription
.
canceled_at
?int The date the Subscription
was canceled.
{
"data": {
"subscription": {
"id": "upz_sub_15178e786c1d72e393555e69",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"current_period_start": 1659182400,
"current_period_end": 1661860800,
"cancel_at_period_end": false,
"status": "active",
"start_date": 1659182400,
"canceled_at": null
}
}
}
api/subscriptions/{id}
curl --request GET \
--get "https://upzelo.com/api/subscriptions/1" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}"
const url = new URL(
"https://upzelo.com/api/subscriptions/1"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://upzelo.com/api/subscriptions/1',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/subscriptions/1'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('GET', url, headers=headers)
response.json()
id
string The unique ID of the Subscription
.
customer_id
string The unique Upzelo ID of the Customer
.
current_period_start
integer The start of the current billing period.
current_period_end
integer The end of the current billing period.
cancel_at_period_end
boolean If the Subscription
is due to cancel.
status
string The status of the Subscription
.
start_date
integer The start date of the Subscription
.
canceled_at
?int The date the Subscription
was canceled.
{
"data": {
"subscription": {
"id": "upz_sub_15178e786c1d72e393555e69",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"current_period_start": 1659182400,
"current_period_end": 1661860800,
"cancel_at_period_end": false,
"status": "active",
"start_date": 1659182400,
"canceled_at": null
}
}
}
{
"errors": [
{
"code": 404,
"title": "Entity not found",
"detail": "We cannot find an entity with an id matching upz_sub_doesntexist"
}
]
}
api/subscriptions/{id}
curl --request PUT \
"https://upzelo.com/api/subscriptions/upz_sub_7d061f3bfaf25e06e7327439" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "x-app-id: {YOUR_APP_ID}" \
--data "{
\"current_period_start\": \"magnam\",
\"current_period_end\": \"voluptates\",
\"cancel_at_period_end\": true,
\"status\": \"est\",
\"canceled_at\": \"autem\",
\"metadata\": []
}"
const url = new URL(
"https://upzelo.com/api/subscriptions/upz_sub_7d061f3bfaf25e06e7327439"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"x-app-id": "{YOUR_APP_ID}",
};
let body = {
"current_period_start": "magnam",
"current_period_end": "voluptates",
"cancel_at_period_end": true,
"status": "est",
"canceled_at": "autem",
"metadata": []
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://upzelo.com/api/subscriptions/upz_sub_7d061f3bfaf25e06e7327439',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-app-id' => '{YOUR_APP_ID}',
],
'json' => [
'current_period_start' => 'magnam',
'current_period_end' => 'voluptates',
'cancel_at_period_end' => true,
'status' => 'est',
'canceled_at' => 'autem',
'metadata' => [],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://upzelo.com/api/subscriptions/upz_sub_7d061f3bfaf25e06e7327439'
payload = {
"current_period_start": "magnam",
"current_period_end": "voluptates",
"cancel_at_period_end": true,
"status": "est",
"canceled_at": "autem",
"metadata": []
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-app-id': '{YOUR_APP_ID}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
id
string The unique ID of the Subscription
.
customer_id
string The unique Upzelo ID of the Customer
.
current_period_start
integer The start of the current billing period.
current_period_end
integer The end of the current billing period.
cancel_at_period_end
boolean If the Subscription
is due to cancel.
status
string The status of the Subscription
.
start_date
integer The start date of the Subscription
.
canceled_at
?int The date the Subscription
was canceled.
{
"data": {
"subscription": {
"id": "upz_sub_15178e786c1d72e393555e69",
"customer_id": "upz_cus_76061f3bfae24e02ef3e7528",
"current_period_start": 1659182400,
"current_period_end": 1661860800,
"cancel_at_period_end": false,
"status": "active",
"start_date": 1659182400,
"canceled_at": null
}
}
}