curl --request POST \
--url https://services.leadconnectorhq.com/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data @- <<EOF
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"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": "USD",
"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
}
],
"discount": {
"type": "percentage",
"value": 10,
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"contactDetails": {
"id": "6578278e879ad2646715ba9c",
"name": "Alex",
"phoneNo": "+1234567890",
"email": "alex@example.com",
"additionalEmails": [
{
"email": "alex@example.com"
}
],
"companyName": "ABC Corp.",
"address": {
"addressLine1": "9931 Beechwood",
"addressLine2": "Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "US",
"postalCode": "559-6993"
},
"customFields": [
"<string>"
]
},
"issueDate": "2023-01-01",
"sentTo": {
"email": [
"alex@example.com"
],
"emailCc": [
"alex@example.com"
],
"emailBcc": [
"alex@example.com"
],
"phoneNo": [
"+1-214-559-6993"
]
},
"liveMode": true,
"termsNotes": "<p>This is a default terms.</p>",
"title": "INVOICE",
"invoiceNumber": "1001",
"dueDate": "2023-01-14",
"automaticTaxesEnabled": true,
"paymentSchedule": {
"type": "percentage",
"schedules": [
"<string>"
]
},
"lateFeesConfiguration": {
"enable": true,
"value": 10,
"type": "fixed",
"frequency": {
"intervalCount": 10,
"interval": "day"
},
"grace": {
"intervalCount": 10,
"interval": "day"
},
"maxLateFees": {
"type": "fixed",
"value": "10"
}
},
"tipsConfiguration": {
"tipsPercentage": [
5,
10,
15
],
"tipsEnabled": true
},
"invoiceNumberPrefix": "INV-",
"paymentMethods": {
"stripe": {
"enableBankDebitOnly": false
}
},
"attachments": [
{
"id": "6241712be68f7a98102ba272",
"name": "Electronics.pdf",
"url": "https://example.com/digital-delivery",
"type": "<string>",
"size": 10000
}
],
"miscellaneousCharges": {
"charges": [
"<array>"
],
"collectedMiscellaneousCharges": 10,
"paidCharges": [
{
"name": "Processing Fee",
"charge": 10,
"amount": 10,
"_id": "673d01d7d547648a8dab6211"
}
]
}
}
EOF{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"invoiceItems": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"total": 999,
"title": "INVOICE",
"amountDue": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z",
"discount": {
"type": "percentage",
"value": 0
},
"automaticTaxesEnabled": true,
"automaticTaxesCalculated": true,
"paymentSchedule": {}
}API to create an invoice
curl --request POST \
--url https://services.leadconnectorhq.com/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data @- <<EOF
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"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": "USD",
"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
}
],
"discount": {
"type": "percentage",
"value": 10,
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"contactDetails": {
"id": "6578278e879ad2646715ba9c",
"name": "Alex",
"phoneNo": "+1234567890",
"email": "alex@example.com",
"additionalEmails": [
{
"email": "alex@example.com"
}
],
"companyName": "ABC Corp.",
"address": {
"addressLine1": "9931 Beechwood",
"addressLine2": "Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "US",
"postalCode": "559-6993"
},
"customFields": [
"<string>"
]
},
"issueDate": "2023-01-01",
"sentTo": {
"email": [
"alex@example.com"
],
"emailCc": [
"alex@example.com"
],
"emailBcc": [
"alex@example.com"
],
"phoneNo": [
"+1-214-559-6993"
]
},
"liveMode": true,
"termsNotes": "<p>This is a default terms.</p>",
"title": "INVOICE",
"invoiceNumber": "1001",
"dueDate": "2023-01-14",
"automaticTaxesEnabled": true,
"paymentSchedule": {
"type": "percentage",
"schedules": [
"<string>"
]
},
"lateFeesConfiguration": {
"enable": true,
"value": 10,
"type": "fixed",
"frequency": {
"intervalCount": 10,
"interval": "day"
},
"grace": {
"intervalCount": 10,
"interval": "day"
},
"maxLateFees": {
"type": "fixed",
"value": "10"
}
},
"tipsConfiguration": {
"tipsPercentage": [
5,
10,
15
],
"tipsEnabled": true
},
"invoiceNumberPrefix": "INV-",
"paymentMethods": {
"stripe": {
"enableBankDebitOnly": false
}
},
"attachments": [
{
"id": "6241712be68f7a98102ba272",
"name": "Electronics.pdf",
"url": "https://example.com/digital-delivery",
"type": "<string>",
"size": 10000
}
],
"miscellaneousCharges": {
"charges": [
"<array>"
],
"collectedMiscellaneousCharges": 10,
"paidCharges": [
{
"name": "Processing Fee",
"charge": 10,
"amount": 10,
"_id": "673d01d7d547648a8dab6211"
}
]
}
}
EOF{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"name": "New Invoice",
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"invoiceItems": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"total": 999,
"title": "INVOICE",
"amountDue": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z",
"discount": {
"type": "percentage",
"value": 0
},
"automaticTaxesEnabled": true,
"automaticTaxesCalculated": true,
"paymentSchedule": {}
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-07-28 location Id / company Id based on altType
"6578278e879ad2646715ba9c"
Alt Type
location "location"
Invoice Name
"New Invoice"
Show child attributes
Currency code
"USD"
An array of items for the invoice.
Show child attributes
Show child attributes
Show child attributes
Issue date in YYYY-MM-DD format
"2023-01-01"
Show child attributes
Terms notes, Also supports HTML markups
"<p>This is a default terms.</p>"
Title for the invoice
"INVOICE"
Invoice Number
"1001"
Due date in YYYY-MM-DD format
"2023-01-14"
Automatic taxes enabled for the Invoice
true
Show child attributes
Show child attributes
Show child attributes
prefix for invoice number
"INV-"
Show child attributes
attachments for the invoice
Show child attributes
Show child attributes
Successful response
Invoice Id
"6578278e879ad2646715ba9c"
Invoice Status
draft, sent, payment_processing, paid, void, partially_paid "draft"
Live Mode
false
Amount Paid
0
Location Id or Agency Id
"6578278e879ad2646715ba9c"
location Name of the invoice
"New Invoice"
Business Details
{
"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"
}Invoice Number
"19"
Currency
"USD"
Contact Details
{
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": { "countryCode": "US" }
}Issue date in YYYY-MM-DD format
"2023-01-01"
Due date in YYYY-MM-DD format
"2023-01-01"
Invoice Items
[
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
]Total Amount
999
Title
"INVOICE"
Total Amount Due
999
created at
"2023-12-12T09:27:42.355Z"
updated at
"2023-12-12T09:27:42.355Z"
Discount
{ "type": "percentage", "value": 0 }Automatic taxes enabled for the Invoice
true
Is Automatic taxes calculated for the Invoice items
true
split invoice into payment schedule summing up to full invoice amount
Was this page helpful?