Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://api.getenso.ai/contracts/{contractId}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PlanId": "100",
"startDate": "2026-04-01",
"planId": "100",
"name": "Annual Enterprise Subscription 2026",
"endDate": "2027-03-31",
"type": "standard",
"orderIndex": 0,
"ParentContractPlanId": "42",
"parentContractPlanId": "42",
"items": [
{
"SkuId": "sku_123",
"CurrencyId": "2",
"PlanTypeId": "3",
"config": {
"dayOfPeriod": 1,
"amount": 999,
"revenueRule": "immediate"
},
"id": "456",
"orderIndex": 0,
"description": "Per-user annual license",
"milestones": [
{
"type": "invoice_trigger",
"ContractMilestoneId": "123",
"config": {
"percentage_of_revenue": 25
}
}
]
}
]
}
'import requests
url = "https://api.getenso.ai/contracts/{contractId}/plans"
payload = {
"PlanId": "100",
"startDate": "2026-04-01",
"planId": "100",
"name": "Annual Enterprise Subscription 2026",
"endDate": "2027-03-31",
"type": "standard",
"orderIndex": 0,
"ParentContractPlanId": "42",
"parentContractPlanId": "42",
"items": [
{
"SkuId": "sku_123",
"CurrencyId": "2",
"PlanTypeId": "3",
"config": {
"dayOfPeriod": 1,
"amount": 999,
"revenueRule": "immediate"
},
"id": "456",
"orderIndex": 0,
"description": "Per-user annual license",
"milestones": [
{
"type": "invoice_trigger",
"ContractMilestoneId": "123",
"config": { "percentage_of_revenue": 25 }
}
]
}
]
}
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({
PlanId: '100',
startDate: '2026-04-01',
planId: '100',
name: 'Annual Enterprise Subscription 2026',
endDate: '2027-03-31',
type: 'standard',
orderIndex: 0,
ParentContractPlanId: '42',
parentContractPlanId: '42',
items: [
{
SkuId: 'sku_123',
CurrencyId: '2',
PlanTypeId: '3',
config: {dayOfPeriod: 1, amount: 999, revenueRule: 'immediate'},
id: '456',
orderIndex: 0,
description: 'Per-user annual license',
milestones: [
{
type: 'invoice_trigger',
ContractMilestoneId: '123',
config: {percentage_of_revenue: 25}
}
]
}
]
})
};
fetch('https://api.getenso.ai/contracts/{contractId}/plans', 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.getenso.ai/contracts/{contractId}/plans",
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([
'PlanId' => '100',
'startDate' => '2026-04-01',
'planId' => '100',
'name' => 'Annual Enterprise Subscription 2026',
'endDate' => '2027-03-31',
'type' => 'standard',
'orderIndex' => 0,
'ParentContractPlanId' => '42',
'parentContractPlanId' => '42',
'items' => [
[
'SkuId' => 'sku_123',
'CurrencyId' => '2',
'PlanTypeId' => '3',
'config' => [
'dayOfPeriod' => 1,
'amount' => 999,
'revenueRule' => 'immediate'
],
'id' => '456',
'orderIndex' => 0,
'description' => 'Per-user annual license',
'milestones' => [
[
'type' => 'invoice_trigger',
'ContractMilestoneId' => '123',
'config' => [
'percentage_of_revenue' => 25
]
]
]
]
]
]),
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.getenso.ai/contracts/{contractId}/plans"
payload := strings.NewReader("{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}")
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.getenso.ai/contracts/{contractId}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/contracts/{contractId}/plans")
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 = "{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}Attach a new (or existing) billing plan to a contract.
curl --request POST \
--url https://api.getenso.ai/contracts/{contractId}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PlanId": "100",
"startDate": "2026-04-01",
"planId": "100",
"name": "Annual Enterprise Subscription 2026",
"endDate": "2027-03-31",
"type": "standard",
"orderIndex": 0,
"ParentContractPlanId": "42",
"parentContractPlanId": "42",
"items": [
{
"SkuId": "sku_123",
"CurrencyId": "2",
"PlanTypeId": "3",
"config": {
"dayOfPeriod": 1,
"amount": 999,
"revenueRule": "immediate"
},
"id": "456",
"orderIndex": 0,
"description": "Per-user annual license",
"milestones": [
{
"type": "invoice_trigger",
"ContractMilestoneId": "123",
"config": {
"percentage_of_revenue": 25
}
}
]
}
]
}
'import requests
url = "https://api.getenso.ai/contracts/{contractId}/plans"
payload = {
"PlanId": "100",
"startDate": "2026-04-01",
"planId": "100",
"name": "Annual Enterprise Subscription 2026",
"endDate": "2027-03-31",
"type": "standard",
"orderIndex": 0,
"ParentContractPlanId": "42",
"parentContractPlanId": "42",
"items": [
{
"SkuId": "sku_123",
"CurrencyId": "2",
"PlanTypeId": "3",
"config": {
"dayOfPeriod": 1,
"amount": 999,
"revenueRule": "immediate"
},
"id": "456",
"orderIndex": 0,
"description": "Per-user annual license",
"milestones": [
{
"type": "invoice_trigger",
"ContractMilestoneId": "123",
"config": { "percentage_of_revenue": 25 }
}
]
}
]
}
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({
PlanId: '100',
startDate: '2026-04-01',
planId: '100',
name: 'Annual Enterprise Subscription 2026',
endDate: '2027-03-31',
type: 'standard',
orderIndex: 0,
ParentContractPlanId: '42',
parentContractPlanId: '42',
items: [
{
SkuId: 'sku_123',
CurrencyId: '2',
PlanTypeId: '3',
config: {dayOfPeriod: 1, amount: 999, revenueRule: 'immediate'},
id: '456',
orderIndex: 0,
description: 'Per-user annual license',
milestones: [
{
type: 'invoice_trigger',
ContractMilestoneId: '123',
config: {percentage_of_revenue: 25}
}
]
}
]
})
};
fetch('https://api.getenso.ai/contracts/{contractId}/plans', 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.getenso.ai/contracts/{contractId}/plans",
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([
'PlanId' => '100',
'startDate' => '2026-04-01',
'planId' => '100',
'name' => 'Annual Enterprise Subscription 2026',
'endDate' => '2027-03-31',
'type' => 'standard',
'orderIndex' => 0,
'ParentContractPlanId' => '42',
'parentContractPlanId' => '42',
'items' => [
[
'SkuId' => 'sku_123',
'CurrencyId' => '2',
'PlanTypeId' => '3',
'config' => [
'dayOfPeriod' => 1,
'amount' => 999,
'revenueRule' => 'immediate'
],
'id' => '456',
'orderIndex' => 0,
'description' => 'Per-user annual license',
'milestones' => [
[
'type' => 'invoice_trigger',
'ContractMilestoneId' => '123',
'config' => [
'percentage_of_revenue' => 25
]
]
]
]
]
]),
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.getenso.ai/contracts/{contractId}/plans"
payload := strings.NewReader("{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}")
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.getenso.ai/contracts/{contractId}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/contracts/{contractId}/plans")
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 = "{\n \"PlanId\": \"100\",\n \"startDate\": \"2026-04-01\",\n \"planId\": \"100\",\n \"name\": \"Annual Enterprise Subscription 2026\",\n \"endDate\": \"2027-03-31\",\n \"type\": \"standard\",\n \"orderIndex\": 0,\n \"ParentContractPlanId\": \"42\",\n \"parentContractPlanId\": \"42\",\n \"items\": [\n {\n \"SkuId\": \"sku_123\",\n \"CurrencyId\": \"2\",\n \"PlanTypeId\": \"3\",\n \"config\": {\n \"dayOfPeriod\": 1,\n \"amount\": 999,\n \"revenueRule\": \"immediate\"\n },\n \"id\": \"456\",\n \"orderIndex\": 0,\n \"description\": \"Per-user annual license\",\n \"milestones\": [\n {\n \"type\": \"invoice_trigger\",\n \"ContractMilestoneId\": \"123\",\n \"config\": {\n \"percentage_of_revenue\": 25\n }\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}JWT bearer token obtained from POST /auth/system-login using your client credentials.
Contract ID
Use PlanId or planId to reuse an existing billing plan. If neither is sent, the route creates a new plan and expects name, and typically items.
"100"
"2026-04-01"
"100"
"Annual Enterprise Subscription 2026"
"2027-03-31"
standard, extension, renewal "standard"
0
Show child attributes
"42"
"42"
When creating a new plan item, provide CurrencyId, PlanTypeId, config, and either SkuId or Sku. The route persists meter references from config.meter and config.quantityMeter.
Show child attributes
