Customer email templates

Customer email templates can be used to standardize messages sent to multiple customers.

List customer email templates

get/objects/accounts-receivable/customer-email-template

Returns a collection with a key, ID, and link for each customer email template. This operation is mostly for use in testing; use the query service to find objects that meet certain criteria and to specify properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "1",
      • "id": "1",
      • "href": "/objects/accounts-receivable/customer-email-template/1"
      },
    • {
      • "key": "6",
      • "id": "6",
      • "href": "/objects/accounts-receivable/customer-email-template/6"
      },
    • {
      • "key": "8",
      • "id": "8",
      • "href": "/objects/accounts-receivable/customer-email-template/8"
      }
    ],
  • "ia::meta": {
    • "totalCount": 3,
    • "start": 1,
    • "pageSize": 100,
    • "next": null,
    • "previous": null
    }
}

Create a customer email template

post/objects/accounts-receivable/customer-email-template

Creates a new customer email template.

SecurityOAuth2
Request
Request Body schema: application/json
required
object

Customer associated with the email template.

Example: "127"
key
required
string

System-assigned key for the customer.

Example: "127"
id
string

Unique identifier for the customer.

Example: "014"
object

Transaction definition, which is the template that contains accounting settings, workflow rules, and other configuration settings for a transaction.

id
string

Document template ID.

Example: "Customer Invoice"
object

Associated email template.

Example: "1"
key
required
string

System-assigned key for the email template.

Example: "1"
id
string

Unique identifier for the email template.

Example: "1"
Responses
201

Created

400

Bad Request

Request samples
application/json
{
  • "customer": {
    • "key": "127"
    },
  • "emailTemplate": {
    • "key": "4"
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "10",
    • "id": "10",
    • "href": "/objects/accounts-receivable/customer-email-template/10"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Get a customer email template

get/objects/accounts-receivable/customer-email-template/{key}

Returns detailed information for a specified customer email template.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the customer email template.

Example: 2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "10",
    • "id": "10",
    • "customer": {
      • "key": "127",
      • "id": "Cust_Dif_Con_PnEtmp",
      • "href": "/objects/accounts-receivable/customer/127"
      },
    • "txnDefinition": {
      • "key": "12",
      • "id": "Customer Sales Invoice"
      },
    • "emailTemplate": {
      • "id": "4",
      • "key": "4",
      • "name": "SimpleARInvTemp",
      • "templateType": "arInvoice",
      • "href": "/objects/company-config/email-template/4"
      },
    • "href": "/objects/accounts-receivable/customer-email-template/2"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Update a customer email template

patch/objects/accounts-receivable/customer-email-template/{key}

Updates an existing customer email template by setting field values. Any fields not provided remain unchanged.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the customer email template.

Example: 2
Request Body schema: application/json
object

Customer associated with the email template.

key
string

System-assigned key for the customer.

Example: "127"
id
string

Unique identifier for the customer.

Example: "014"
object

Transaction definition, which is the template that contains accounting settings, workflow rules, and other configuration settings for a transaction.

id
string

Document template ID.

Example: "Customer Invoice"
object

Associated email template.

key
string

System-assigned key for the email template.

Example: "1"
id
string

Unique identifier for the email template.

Example: "1"
Responses
200

OK

400

Bad Request

Request samples
application/json
{
  • "emailTemplate": {
    • "key": "10"
    }
}
Response samples
application/json
{
  • "ia::result": {
    • "key": "10",
    • "id": "10",
    • "href": "/objects/accounts-receivable/customer-email-template/10"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Delete a customer email template

delete/objects/accounts-receivable/customer-email-template/{key}

Deletes a customer email template.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned key for the customer email template.

Example: 2
Responses
204

No Content

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}