TripleBooks
Sales

Subscriptions

GET
/api/sales/subscriptions

Authorization: Bearer ak_.... Required scope: read:sales. Pass entityId query (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid
status?string

Response Body

curl -X GET "https://example.com/api/sales/subscriptions?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
POST
/api/sales/subscriptions

Authorization: Bearer ak_.... Required scope: write:sales. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/api/sales/subscriptions?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "planId": "string"  }'
Empty
PATCH
/api/sales/subscriptions/{subscriptionId}

Authorization: Bearer ak_.... Required scope: write:sales. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

subscriptionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/api/sales/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
Empty
Empty
POST
/api/sales/subscriptions/{subscriptionId}/generate-invoice

Authorization: Bearer ak_.... Required scope: write:sales. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

subscriptionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/sales/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/generate-invoice?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{  "error": "string"}
POST
/api/sales/subscriptions/{subscriptionId}/dunning

Authorization: Bearer ak_.... Required scope: write:sales. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

subscriptionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/api/sales/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/dunning?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "action": "remind"  }'
Empty
POST
/api/sales/subscriptions/{subscriptionId}/change-plan

Authorization: Bearer ak_.... Required scope: write:sales. Pass entityId query or JSON body (must match the key’s entity). Session cookie auth with x-entity-id is also supported in the browser.

Authorization

bearerAuth
AuthorizationBearer <token>

Create keys under Settings → API keys. Prefix ak_. Send as Authorization: Bearer ak_....

In: header

Path Parameters

subscriptionId*string
Formatuuid

Query Parameters

entityId*string

Entity UUID; must match the API key’s entity when using Bearer auth.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/sales/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/change-plan?entityId=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "newPlanId": "f1f5c646-a768-4f15-ab7e-5e3088389de0"  }'
Empty
{  "error": "string"}

On this page