List all invoice rendering templates
GET/v1/invoice_rendering_templates
List all templates, ordered by creation date, with the most recently created template appearing first.
Query parameters
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.statusstringPossible valuesactivearchived
Returns
A list of invoice_rendering_template objects.
curl -G https://api.knoxapi.com/v1/invoice_rendering_templates \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/invoice_rendering_templates', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/invoice_rendering_templates", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/invoice_rendering_templates', {
limit: 3,
}){
"object": "list",
"url": "/v1/invoice_rendering_templates",
"has_more": false,
"data": [
{
"created": 1028554472,
"id": "obj_123",
"livemode": true,
"metadata": null,
"nickname": null,
"object": "invoice_rendering_template",
"status": "active",
"version": 351608024
}
]
}Retrieve an invoice rendering template
GET/v1/invoice_rendering_templates/{template}
Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.
Path parameters
templatestringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
versioninteger
Returns
The invoice_rendering_template object.
curl https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123 \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/invoice_rendering_templates/obj_123');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/invoice_rendering_templates/obj_123")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/invoice_rendering_templates/obj_123'){
"created": 1028554472,
"id": "obj_123",
"livemode": true,
"metadata": null,
"nickname": null,
"object": "invoice_rendering_template",
"status": "active",
"version": 351608024
}Archive an invoice rendering template
POST/v1/invoice_rendering_templates/{template}/archive
Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
Path parameters
templatestringRequired
Body parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The invoice_rendering_template object.
curl -X POST https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123/archive \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/invoice_rendering_templates/obj_123/archive');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/invoice_rendering_templates/obj_123/archive")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/invoice_rendering_templates/obj_123/archive'){
"created": 1028554472,
"id": "obj_123",
"livemode": true,
"metadata": null,
"nickname": null,
"object": "invoice_rendering_template",
"status": "active",
"version": 351608024
}Unarchive an invoice rendering template
POST/v1/invoice_rendering_templates/{template}/unarchive
Unarchive an invoice rendering template so it can be used on new Stripe objects again.
Path parameters
templatestringRequired
Body parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The invoice_rendering_template object.
curl -X POST https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123/unarchive \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/invoice_rendering_templates/obj_123/unarchive');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/invoice_rendering_templates/obj_123/unarchive")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/invoice_rendering_templates/obj_123/unarchive'){
"created": 1028554472,
"id": "obj_123",
"livemode": true,
"metadata": null,
"nickname": null,
"object": "invoice_rendering_template",
"status": "active",
"version": 351608024
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.