Billing email templates

List billing email templates

Changed on

List the company's billing email templates that can be used to send a document.

kind decides which document accepts the template:

  • billing_email_invoice: a customer invoice or a proforma
  • billing_email_quote: a quote, a shipping order, or a purchasing order

Payment reminders, GoCardless subscription emails, and PDF footer templates are not included. These are not the PDF layout templates listed by customer_invoice_templates.

Liquid variables in subject and content are left unrendered.

ℹ️ This endpoint requires one of the following scopes: customer_invoices:all, customer_invoices:readonly, quotes:all, quotes:readonly, commercial_documents:all, commercial_documents:readonly

get/api/external/v2/billing_email_templates

Request

  • Base URL
    https://app.pennylane.com
  • URL
    https://app.pennylane.com/api/external/v2/billing_email_templates
  • Auth
    OAuth 2
    Authorization code: https://app.pennylane.com/oauth/authorize
    Token URL: https://app.pennylane.com/oauth/oauth/token scopes: customer_invoices:all, customer_invoices:readonly, quotes:all, quotes:readonly, commercial_documents:all, commercial_documents:readonly

Query parameters

cursorstring
Example:dXBkYXRlZF9hdDoxNjc0MTIzNDU2

Cursor for pagination. Use this to fetch the next set of results. The cursor is an opaque string returned in the previous response's metadata. Leave empty for the first request.

limitinteger
Example:20

Number of items to return per request. Defaults to 20 if not specified. Must be between 1 and 100.

filterstring
Example:[{"field": "kind", "operator": "eq", "value": "billing_email_invoice"}]

You can choose to filter items on specific fields. Available fields and operators:

  • id: lt, lteq, gt, gteq, eq, not_eq, in, not_in
  • kind: eq, not_eq, in, not_in
  • locale: eq, not_eq, in, not_in
sortstring
Example:id

You can choose to sort items on specific attributes Sort field may be prefixed with - for descending order. Example : id will sort by ascending order, -id will sort by descending order. Available fields : id

Headers

X-Company-Idstring
Example:12345

Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.

Response

A list of billing email templates

has_moreboolean required

Indicates whether additional results are available beyond this set. Use this flag to determine if another request is needed.

next_cursorstring nullable required

Cursor to retrieve the next set of results. Include this value in the cursor parameter of your next request to fetch subsequent items. A null next_cursor in the response indicates no further results.

Example response

{
  "has_more": true,
  "next_cursor": "dXBkYXRlZF9hdDoxNjc0MTIzNDU2",
  "items": [
    {
      "id": 42,
      "label": "Invoice email",
      "subject": "Your invoice {{ numero }}",
      "content": "Hello, please find your invoice attached.",
      "default": true,
      "cc_recipients": [
        "accounting@company.com"
      ],
      "bcc_recipients": []
    }
  ]
}

Changes