List all packages
curl --request POST \
--url https://api.metronome.com/v1/packages/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.metronome.com/v1/packages/list"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.metronome.com/v1/packages/list', 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.metronome.com/v1/packages/list",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.metronome.com/v1/packages/list"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.metronome.com/v1/packages/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/packages/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"name": "Test Package",
"usage_statement_schedule": {
"frequency": "MONTHLY"
},
"created_at": "2019-12-31T14:23:55.234Z",
"created_by": "Alice",
"commits": [
{
"id": "62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35",
"type": "PREPAID",
"name": "My test commit",
"description": "My test commit description",
"product": {
"id": "2e30f074-d04c-412e-a134-851ebfa5ceb2",
"name": "My product A"
},
"applicable_product_ids": [
"13a2179b-f0cb-460b-85a1-cd42964ca533"
],
"access_schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "2d45952c-5a6e-43a9-8aab-f61ee21be81a",
"amount": 10000000,
"starting_at_offset": {
"unit": "MONTHS",
"value": 1
},
"duration": {
"unit": "MONTHS",
"value": 3
}
}
]
},
"invoice_schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "f15e4e23-f74e-4de4-9b3a-8b07434116c4",
"unit_price": 10000000,
"quantity": 1,
"date_offset": {
"unit": "MONTHS",
"value": 4
}
}
],
"do_not_invoice": false
}
}
],
"overrides": [
{
"id": "6cf3292a-e85c-4be6-822c-e25ba9d19757",
"starting_at_offset": {
"unit": "MONTHS",
"value": 1
},
"type": "MULTIPLIER",
"multiplier": 0.1,
"override_specifiers": [
{
"product_id": "eae8903b-693b-41a7-8c0b-f23748c9a9c8"
}
]
}
],
"scheduled_charges": [
{
"id": "04dbca69-0bc2-45c6-ba22-a53934353b10",
"name": "Test Scheduled Charge",
"description": "Test Scheduled Charge Description",
"product": {
"id": "eae8903b-693b-41a7-8c0b-f23748c9a9c8",
"name": "My product B"
},
"schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "f15e4e23-f74e-4de4-9b3a-8b07434116c4",
"unit_price": 10000000,
"quantity": 1,
"date_offset": {
"unit": "MONTHS",
"value": 4
}
}
]
}
}
]
},
{
"id": "67ee9504-ae43-4317-b70e-1c449910e14f",
"name": "Test Package 2",
"commits": [],
"overrides": [],
"scheduled_charges": [],
"usage_statement_schedule": {
"frequency": "MONTHLY"
},
"created_at": "2021-07-10T00:00:00.000Z",
"created_by": "Bob"
}
],
"next_page": "eyJvZmZzZXQiOjF9"
}Packages
List all packages
Lists all packages with details including name, aliases, duration, and terms. To view contracts on a specific package, use the listContractsOnPackage endpoint.
POST
/
v1
/
packages
/
list
List all packages
curl --request POST \
--url https://api.metronome.com/v1/packages/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.metronome.com/v1/packages/list"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.metronome.com/v1/packages/list', 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.metronome.com/v1/packages/list",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.metronome.com/v1/packages/list"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.metronome.com/v1/packages/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/packages/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
"name": "Test Package",
"usage_statement_schedule": {
"frequency": "MONTHLY"
},
"created_at": "2019-12-31T14:23:55.234Z",
"created_by": "Alice",
"commits": [
{
"id": "62c0cb84-bf3f-48b9-9bcf-a8ddf8c1cf35",
"type": "PREPAID",
"name": "My test commit",
"description": "My test commit description",
"product": {
"id": "2e30f074-d04c-412e-a134-851ebfa5ceb2",
"name": "My product A"
},
"applicable_product_ids": [
"13a2179b-f0cb-460b-85a1-cd42964ca533"
],
"access_schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "2d45952c-5a6e-43a9-8aab-f61ee21be81a",
"amount": 10000000,
"starting_at_offset": {
"unit": "MONTHS",
"value": 1
},
"duration": {
"unit": "MONTHS",
"value": 3
}
}
]
},
"invoice_schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "f15e4e23-f74e-4de4-9b3a-8b07434116c4",
"unit_price": 10000000,
"quantity": 1,
"date_offset": {
"unit": "MONTHS",
"value": 4
}
}
],
"do_not_invoice": false
}
}
],
"overrides": [
{
"id": "6cf3292a-e85c-4be6-822c-e25ba9d19757",
"starting_at_offset": {
"unit": "MONTHS",
"value": 1
},
"type": "MULTIPLIER",
"multiplier": 0.1,
"override_specifiers": [
{
"product_id": "eae8903b-693b-41a7-8c0b-f23748c9a9c8"
}
]
}
],
"scheduled_charges": [
{
"id": "04dbca69-0bc2-45c6-ba22-a53934353b10",
"name": "Test Scheduled Charge",
"description": "Test Scheduled Charge Description",
"product": {
"id": "eae8903b-693b-41a7-8c0b-f23748c9a9c8",
"name": "My product B"
},
"schedule": {
"credit_type": {
"id": "2714e483-4ff1-48e4-9e25-ac732e8f24f2",
"name": "USD (cents)"
},
"schedule_items": [
{
"id": "f15e4e23-f74e-4de4-9b3a-8b07434116c4",
"unit_price": 10000000,
"quantity": 1,
"date_offset": {
"unit": "MONTHS",
"value": 4
}
}
]
}
}
]
},
{
"id": "67ee9504-ae43-4317-b70e-1c449910e14f",
"name": "Test Package 2",
"commits": [],
"overrides": [],
"scheduled_charges": [],
"usage_statement_schedule": {
"frequency": "MONTHLY"
},
"created_at": "2021-07-10T00:00:00.000Z",
"created_by": "Bob"
}
],
"next_page": "eyJvZmZzZXQiOjF9"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The maximum number of packages to return. Defaults to 10.
Required range:
1 <= x <= 100Cursor that indicates where the next page of results should start.
Body
application/json
Filter packages by archived status. Defaults to NOT_ARCHIVED.
Available options:
ARCHIVED, NOT_ARCHIVED, ALL, archived, not_archived, all ⌘I