List Products
curl --request GET \
--url https://api.example.com/v1/products \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.example.com/v1/products"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.example.com/v1/products', 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://api.example.com/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/products")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "prod_123",
"key": "starter",
"name": "Starter",
"type": "stripe",
"isDefault": false,
"version": 2,
"stripeProductId": "prod_stripe_123",
"prices": [
{
"id": "price_row_123",
"stripePriceId": "price_monthly_starter",
"currency": "usd",
"unitAmount": 2900,
"recurringInterval": "month",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": true
},
{
"id": "price_row_124",
"stripePriceId": "price_yearly_starter",
"currency": "usd",
"unitAmount": 29000,
"recurringInterval": "year",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": false
}
],
"featureAccess": [
{
"featureKey": "api_calls",
"name": "API Calls",
"type": "limit",
"hasAccess": true,
"limit": 10000,
"isUnlimited": false
},
{
"featureKey": "priority_support",
"name": "Priority Support",
"type": "boolean",
"hasAccess": true
}
]
}
]{
"error": "<string>"
}{
"error": "<string>"
}Products
List Products
List latest non-archived products for the project.
GET
/
v1
/
products
List Products
curl --request GET \
--url https://api.example.com/v1/products \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.example.com/v1/products"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.example.com/v1/products', 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://api.example.com/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/products")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "prod_123",
"key": "starter",
"name": "Starter",
"type": "stripe",
"isDefault": false,
"version": 2,
"stripeProductId": "prod_stripe_123",
"prices": [
{
"id": "price_row_123",
"stripePriceId": "price_monthly_starter",
"currency": "usd",
"unitAmount": 2900,
"recurringInterval": "month",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": true
},
{
"id": "price_row_124",
"stripePriceId": "price_yearly_starter",
"currency": "usd",
"unitAmount": 29000,
"recurringInterval": "year",
"recurringIntervalCount": 1,
"isActive": true,
"isDefault": false
}
],
"featureAccess": [
{
"featureKey": "api_calls",
"name": "API Calls",
"type": "limit",
"hasAccess": true,
"limit": 10000,
"isUnlimited": false
},
{
"featureKey": "priority_support",
"name": "Priority Support",
"type": "boolean",
"hasAccess": true
}
]
}
]{
"error": "<string>"
}{
"error": "<string>"
}Headers
API key from your PriceOS dashboard.
Response
Product list
Product ID.
Product key.
Product name.
Product type.
Available options:
stripe, custom Whether this is the default custom product.
Product version number.
Stripe product ID (Stripe products only).
Stripe prices linked to the product.
Show child attributes
Show child attributes
Feature access entries configured for this product.
Show child attributes
Show child attributes
⌘I