Skip to main content
POST
/
invoices
/
template
Create template
curl --request POST \
  --url https://services.leadconnectorhq.com/invoices/template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Version: <version>' \
  --data @- <<EOF
{
  "altId": "6578278e879ad2646715ba9c",
  "altType": "location",
  "name": "New Template",
  "businessDetails": {
    "logoUrl": "https://example.com/logo.png",
    "name": "ABC Corp.",
    "phoneNo": "+1-214-559-6993",
    "address": "9931 Beechwood, TX",
    "website": "wwww.example.com",
    "customValues": [
      "<string>"
    ]
  },
  "currency": "<string>",
  "items": [
    {
      "name": "ABC Product",
      "currency": "USD",
      "amount": 999,
      "qty": 1,
      "description": "ABC Corp.",
      "productId": "6578278e879ad2646715ba9c",
      "priceId": "6578278e879ad2646715ba9c",
      "taxes": [
        {
          "_id": "<string>",
          "name": "<string>",
          "rate": 123,
          "calculation": "exclusive",
          "description": "<string>",
          "taxId": "<string>"
        }
      ],
      "automaticTaxCategoryId": "6578278e879ad2646715ba9c",
      "isSetupFeeItem": true,
      "type": "one_time",
      "taxInclusive": true
    }
  ],
  "internal": true,
  "automaticTaxesEnabled": true,
  "discount": {
    "type": "percentage",
    "value": 10,
    "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
  },
  "termsNotes": "<string>",
  "title": "New Template",
  "tipsConfiguration": {
    "tipsPercentage": [
      5,
      10,
      15
    ],
    "tipsEnabled": true
  },
  "lateFeesConfiguration": {
    "enable": true,
    "value": 10,
    "type": "fixed",
    "frequency": {
      "intervalCount": 10,
      "interval": "day"
    },
    "grace": {
      "intervalCount": 10,
      "interval": "day"
    },
    "maxLateFees": {
      "type": "fixed",
      "value": "10"
    }
  },
  "invoiceNumberPrefix": "INV-",
  "paymentMethods": {
    "stripe": {
      "enableBankDebitOnly": false
    }
  },
  "attachments": [
    "<string>"
  ],
  "miscellaneousCharges": {
    "charges": [
      "<array>"
    ],
    "collectedMiscellaneousCharges": 10,
    "paidCharges": [
      {
        "name": "Processing Fee",
        "charge": 10,
        "amount": 10,
        "_id": "673d01d7d547648a8dab6211"
      }
    ]
  }
}
EOF
{
  "_id": "6578278e879ad2646715ba9c",
  "altId": "6578278e879ad2646715ba9c",
  "altType": "location",
  "name": "New Template",
  "businessDetails": {
    "name": "Alex",
    "address": {
      "addressLine1": "9931 Beechwood",
      "city": "St. Houston",
      "state": "TX",
      "countryCode": "USA",
      "postalCode": "559-6993"
    },
    "phoneNo": "+1-214-559-6993",
    "website": "www.example.com"
  },
  "currency": "USD",
  "items": [
    {
      "taxes": [],
      "_id": "c6tZZU0rJBf30ZXx9Gli",
      "productId": "c6tZZU0rJBf30ZXx9Gli",
      "priceId": "c6tZZU0rJBf30ZXx9Gli",
      "currency": "USD",
      "name": "Macbook Pro",
      "qty": 1,
      "amount": 999
    }
  ],
  "total": 999,
  "createdAt": "2023-12-12T09:27:42.355Z",
  "updatedAt": "2023-12-12T09:27:42.355Z",
  "discount": {
    "type": "percentage",
    "value": 0
  },
  "invoiceNumberPrefix": "INV-"
}

Authorizations

Authorization
string
header
required

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Headers

Version
enum<string>
required

API Version

Available options:
2021-07-28

Body

application/json
altId
string
required

location Id / company Id based on altType

Example:

"6578278e879ad2646715ba9c"

altType
enum<string>
required

Alt Type

Available options:
location
Example:

"location"

name
string
required

Name of the template

Example:

"New Template"

businessDetails
object
required
currency
string
required
items
object[]
required
internal
boolean
automaticTaxesEnabled
boolean

Automatic taxes enabled for the Invoice

Example:

true

discount
object
termsNotes
string
title
string

Template title

Example:

"New Template"

tipsConfiguration
object
lateFeesConfiguration
object
invoiceNumberPrefix
string

prefix for invoice number

Example:

"INV-"

paymentMethods
object
attachments
string[]

attachments for the invoice

miscellaneousCharges
object

Response

Successful response

_id
string
required

Template Id

Example:

"6578278e879ad2646715ba9c"

altId
string
required

Location Id or Agency Id

Example:

"6578278e879ad2646715ba9c"

altType
enum<string>
required
Available options:
location
name
string
required

Name of the Template

Example:

"New Template"

businessDetails
object
required
Example:
{
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "USA",
"postalCode": "559-6993"
},
"phoneNo": "+1-214-559-6993",
"website": "www.example.com"
}
currency
string
required

Currency

Example:

"USD"

items
string[]
required

Invoice Items

Example:
[
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
]
total
number
required

Total Amount

Example:

999

createdAt
string
required

created at

Example:

"2023-12-12T09:27:42.355Z"

updatedAt
string
required

updated at

Example:

"2023-12-12T09:27:42.355Z"

discount
object
Example:
{ "type": "percentage", "value": 0 }
invoiceNumberPrefix
string

prefix for invoice number

Example:

"INV-"

Last modified on March 4, 2026