JavaScript
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const contract = await client.v1.contracts.retrieve('x');
console.log(contract.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
contract = client.v1.contracts.retrieve(
id="x",
)
print(contract.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
contract, err := client.V1.Contracts.Get(
context.TODO(),
"x",
stigg.V1ContractGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", contract.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.contracts.ContractRetrieveParams;
import io.stigg.models.v1.contracts.ContractRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
ContractRetrieveResponse contract = client.v1().contracts().retrieve("x");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
contract = stigg.v1.contracts.retrieve("x")
puts(contract)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Contracts;
StiggClient client = new();
ContractRetrieveParams parameters = new() { ID = "x" };
var contract = await client.V1.Contracts.Retrieve(parameters);
Console.WriteLine(contract);stigg v1:contracts retrieve \
--api-key 'My API Key' \
--id xcurl --request GET \
--url https://api.stigg.io/api/v1/contracts/{id} \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/contracts/{id}",
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;
}{
"data": {
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Contracts
Get a single contract by ID
Retrieves a single contract by its ID, enriched with a preview of its upcoming (next) invoice when one is available. Returns 404 when no contract with that ID exists in the environment.
GET
/
api
/
v1
/
contracts
/
{id}
JavaScript
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const contract = await client.v1.contracts.retrieve('x');
console.log(contract.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
contract = client.v1.contracts.retrieve(
id="x",
)
print(contract.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
contract, err := client.V1.Contracts.Get(
context.TODO(),
"x",
stigg.V1ContractGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", contract.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.contracts.ContractRetrieveParams;
import io.stigg.models.v1.contracts.ContractRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
ContractRetrieveResponse contract = client.v1().contracts().retrieve("x");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
contract = stigg.v1.contracts.retrieve("x")
puts(contract)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Contracts;
StiggClient client = new();
ContractRetrieveParams parameters = new() { ID = "x" };
var contract = await client.V1.Contracts.Retrieve(parameters);
Console.WriteLine(contract);stigg v1:contracts retrieve \
--api-key 'My API Key' \
--id xcurl --request GET \
--url https://api.stigg.io/api/v1/contracts/{id} \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/contracts/{id}",
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;
}{
"data": {
"contractId": "contract-acme-2026",
"billingId": "ct_1a2b3c4d",
"id": "3452155b-deca-4d7f-91e5-82d486dc8bb0",
"refId": "contract-acme-2026",
"poNumber": "PO-4821",
"externalId": "contract-acme-2026",
"customerExternalId": "customer-acme",
"name": "PO-4821",
"state": "ACTIVE",
"activationStartDate": "2026-01-01T00:00:00.000Z",
"activationEndDate": "2026-12-31T00:00:00.000Z",
"createdAt": "2025-12-15T09:30:00.000Z",
"nextInvoice": {
"amount": {
"amount": 4900,
"currency": "usd"
},
"dueDate": "2026-08-01T00:00:00.000Z",
"periodStart": "2026-07-01T00:00:00.000Z",
"periodEnd": "2026-08-01T00:00:00.000Z"
},
"latestInvoice": {
"billingId": "inv_abc123",
"status": "OPEN",
"createdAt": "2026-07-01T00:00:00.000Z",
"total": 4900,
"amountDue": 4900,
"currency": "usd",
"pdfUrl": null,
"requiresAction": false,
"billingReason": null
},
"subscriptions": [
{
"subscriptionId": "subscription-acme-platform",
"planDisplayName": "Enterprise Platform",
"productDisplayName": "Revvenu"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The unique identifier of the entity
Required string length:
1 - 255Response
The contract, including its attached subscriptions and next-invoice preview when available.
Response object
A billing contract as reported by the connected billing provider.
Show child attributes
Show child attributes
⌘I
