API reference

Invoice Rendering Templates

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

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_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

  • statusstring
    Possible values
    • active
    • archived

Returns

A list of invoice_rendering_template objects.

GET /v1/invoice_rendering_templates
curl -G https://api.knoxapi.com/v1/invoice_rendering_templates \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode limit=3
Response
{
  "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 strings

    Specifies which fields in the response should be expanded.

  • versioninteger

Returns

The invoice_rendering_template object.

GET /v1/invoice_rendering_templates/{template}
curl https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123 \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "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 strings

    Specifies which fields in the response should be expanded.

Returns

The invoice_rendering_template object.

POST /v1/invoice_rendering_templates/{template}/archive
curl -X POST https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123/archive \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "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 strings

    Specifies which fields in the response should be expanded.

Returns

The invoice_rendering_template object.

POST /v1/invoice_rendering_templates/{template}/unarchive
curl -X POST https://api.knoxapi.com/v1/invoice_rendering_templates/obj_123/unarchive \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "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.