List plan drafts
curl --request GET \
--url https://commet.co/api/v1/plans/{id}/drafts \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/plans/{id}/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/plans/{id}/drafts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/plans/{id}/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://commet.co/api/v1/plans/{id}/drafts")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/plans/{id}/drafts",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}[
{
"id": "plr_d1r2a3f4",
"fromVersionId": "plr_9i0j1k2l",
"changes": [
{
"key": "price:pp_1a2b3c4d",
"section": "Price",
"country": null,
"label": "Monthly price",
"before": "$49.00",
"after": "$59.00"
},
{
"key": "country:UY",
"section": "Uruguay",
"country": "UY",
"label": "Currency",
"before": null,
"after": "USD at 1 per USD"
}
],
"createdAt": "2026-11-04T12:00:00.000Z",
"updatedAt": "2026-11-04T12:05:00.000Z",
"object": "plan_draft"
}
]{
"error": {
"type": "validation_error",
"code": "validation_error",
"message": "The request contains an invalid parameter.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/validation_error.md"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "A valid API key is required.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/unauthorized.md"
}
}{
"error": {
"type": "authentication_error",
"code": "forbidden",
"message": "You do not have permission to perform this operation.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/forbidden.md"
}
}{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/not_found.md"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval specified in the Retry-After header.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/rate_limited.md"
}
}{
"error": {
"type": "internal_error",
"code": "internal_error",
"message": "An unexpected error occurred while processing the request.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/internal_error.md"
}
}Plans
List plan drafts
List the plan’s open drafts, oldest first, each with the version it started from and what it changes. Drafts sell nothing until published.
GET
/
plans
/
{id}
/
drafts
List plan drafts
curl --request GET \
--url https://commet.co/api/v1/plans/{id}/drafts \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/plans/{id}/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/plans/{id}/drafts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/plans/{id}/drafts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://commet.co/api/v1/plans/{id}/drafts")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/plans/{id}/drafts",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}[
{
"id": "plr_d1r2a3f4",
"fromVersionId": "plr_9i0j1k2l",
"changes": [
{
"key": "price:pp_1a2b3c4d",
"section": "Price",
"country": null,
"label": "Monthly price",
"before": "$49.00",
"after": "$59.00"
},
{
"key": "country:UY",
"section": "Uruguay",
"country": "UY",
"label": "Currency",
"before": null,
"after": "USD at 1 per USD"
}
],
"createdAt": "2026-11-04T12:00:00.000Z",
"updatedAt": "2026-11-04T12:05:00.000Z",
"object": "plan_draft"
}
]{
"error": {
"type": "validation_error",
"code": "validation_error",
"message": "The request contains an invalid parameter.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/validation_error.md"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "A valid API key is required.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/unauthorized.md"
}
}{
"error": {
"type": "authentication_error",
"code": "forbidden",
"message": "You do not have permission to perform this operation.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/forbidden.md"
}
}{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/not_found.md"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval specified in the Retry-After header.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/rate_limited.md"
}
}{
"error": {
"type": "internal_error",
"code": "internal_error",
"message": "An unexpected error occurred while processing the request.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/internal_error.md"
}
}List the plan’s open drafts, oldest first, each with the version it started from and what it changes. Drafts sell nothing until published.
Autorizaciones
Encabezados
API version used by this reference. Send this header to select this contract explicitly.
Parámetros de ruta
¿Esta página le ayudó?