curl --request POST \
--url https://services.leadconnectorhq.com/invoices/{invoiceId}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"userId": "6578278e879ad2646715ba9c",
"action": "sms_and_email",
"liveMode": true,
"sentFrom": {
"fromName": "Alex",
"fromEmail": "alex@example.com"
},
"autoPayment": {
"enable": true,
"type": "<string>",
"paymentMethodId": "<string>",
"customerId": "<string>",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"usBankAccount": {
"bank_name": "<string>",
"last4": "<string>"
},
"sepaDirectDebit": {
"bank_code": "<string>",
"last4": "<string>",
"branch_code": "<string>"
},
"bacsDirectDebit": {
"sort_code": "<string>",
"last4": "<string>"
},
"becsDirectDebit": {
"bsb_number": "<string>",
"last4": "<string>"
},
"cardId": "<string>",
"provider": {}
}
}
'{
"invoice": {
"_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": {}
},
"smsData": {},
"emailData": {}
}API to send invoice by invoice id
curl --request POST \
--url https://services.leadconnectorhq.com/invoices/{invoiceId}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "location",
"userId": "6578278e879ad2646715ba9c",
"action": "sms_and_email",
"liveMode": true,
"sentFrom": {
"fromName": "Alex",
"fromEmail": "alex@example.com"
},
"autoPayment": {
"enable": true,
"type": "<string>",
"paymentMethodId": "<string>",
"customerId": "<string>",
"card": {
"brand": "<string>",
"last4": "<string>"
},
"usBankAccount": {
"bank_name": "<string>",
"last4": "<string>"
},
"sepaDirectDebit": {
"bank_code": "<string>",
"last4": "<string>",
"branch_code": "<string>"
},
"bacsDirectDebit": {
"sort_code": "<string>",
"last4": "<string>"
},
"becsDirectDebit": {
"bsb_number": "<string>",
"last4": "<string>"
},
"cardId": "<string>",
"provider": {}
}
}
'{
"invoice": {
"_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": {}
},
"smsData": {},
"emailData": {}
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-07-28 Invoice Id
"6578278e879ad2646715ba9c"
location Id / company Id based on altType
"6578278e879ad2646715ba9c"
Alt Type
location "location"
Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates.
"6578278e879ad2646715ba9c"
sms_and_email, send_manually, email, sms Show child attributes
Show child attributes
Was this page helpful?