curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"id": 123,
"sendEmail": true,
"acceptCredit": true,
"acceptCash": true,
"acceptACH": true
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice"
payload = {
"id": 123,
"sendEmail": True,
"acceptCredit": True,
"acceptCash": True,
"acceptACH": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
id: 123,
sendEmail: true,
acceptCredit: true,
acceptCash: true,
acceptACH: true
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 123,
'sendEmail' => true,
'acceptCredit' => true,
'acceptCash' => true,
'acceptACH' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice"
payload := strings.NewReader("{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}"
response = http.request(request)
puts response.read_body{
"cloudStorageRetVal": {
"url": "<string>",
"fileName": "<string>",
"htmlReport": "<string>",
"jsonReport": {}
},
"message": "<string>",
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"errorMessage": "<string>"
}
]
},
"htmlReport": "<string>",
"invoiceId": "<string>",
"newlyCreatedInvoiceId": "<string>",
"invoiceNo": 123,
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>"
},
"invoicePaymentUrl": "<string>",
"invoiceRetVal": {
"xml": "<string>",
"id": "<string>",
"name": "<string>",
"totalAmount": 123,
"invoice": {
"id": "<string>",
"business": {
"id": "<string>",
"companyId": "<string>",
"companyIdLong": 123,
"customerPartnerId": 123,
"name": "<string>",
"showName": true,
"contactFirst": "<string>",
"contactLast": "<string>",
"showContactFirstLast": true,
"email": "<string>",
"showEmail": true,
"phoneWork": "<string>",
"showPhoneWork": true,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"showAddress": true,
"tin": "<string>",
"invoicePrefix": "<string>",
"plaidApiEntityIds": "<string>",
"apiClientId": "<string>",
"dimensionId": 123,
"level0Id": 123,
"createdDate": "2023-11-07T05:31:56Z",
"nameColumnNameForPagination": "<string>",
"externalId": "<string>"
},
"businessId": 123,
"companyId": "<string>",
"companyIdLong": 123,
"customerPartnerId": 123,
"createdDatetime": "2023-11-07T05:31:56Z",
"name": "<string>",
"date": "2023-11-07T05:31:56Z",
"totalAmount": 123,
"discountAmount": 123,
"discountPercent": 123,
"dueDate": "2023-11-07T05:31:56Z",
"email": "<string>",
"invoiceNo": 123,
"message": "<string>",
"propertyId": "<string>",
"lastReminderDate": "2023-11-07T05:31:56Z",
"clientId": "<string>",
"lastViewedDate": "2023-11-07T05:31:56Z",
"acceptCredit": true,
"acceptCash": true,
"reminderSchedule": "<string>",
"lastCreatedRecurringInvoice": "2023-11-07T05:31:56Z",
"parentId": "<string>",
"isRecurringParent": true,
"emailErrors": {
"empty": true
},
"sendEmail": true,
"sentDate": "2023-11-07T05:31:56Z",
"billingInfoId": "<string>",
"paymentErrors": "<string>",
"acceptACH": true,
"extensionId": "<string>",
"apiInvoiceId": "<string>",
"installments": [
{
"name": "First Payment",
"dueDate": "2025-01-15",
"amount": 500,
"id": "<string>",
"companyId": "<string>",
"arInvoice": "<unknown>",
"status": "ACTIVE",
"dateForPagination": "2023-11-07T05:31:56Z",
"externalId": "<string>"
}
],
"calculateSalesTaxBeforeDiscount": true,
"glSourceId": 123,
"ccemails": "<string>",
"bccemails": "<string>",
"invoicePrefix": "<string>",
"glAccountId": 123,
"invoiceNumberDigitLength": 123,
"paymentErrorsAsJsonArray": {
"empty": true
},
"glAmount": 123,
"bankAccountId": 123,
"parentEntityId": 123,
"externalId": "<string>"
},
"logoUrl": "<string>",
"invoiceReport": {
"invoiceName": "<string>",
"invoiceNo": 123,
"totalInvoiceAmount": 123,
"totalDiscountedInvoiceAmount": 123,
"personalNote": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"invoiceDate": "2023-11-07T05:31:56Z",
"discountAmount": 123,
"discountPercent": 123,
"invoiceTerm": "<string>",
"businessName": "<string>",
"showBusinessName": true,
"businessLogoUrl": "<string>",
"businessCity": "<string>",
"businessState": "<string>",
"businessZip": "<string>",
"businessAddress1": "<string>",
"businessAddress2": "<string>",
"clientName": "<string>",
"companyName": "<string>",
"companyPhone": "<string>",
"businessPhone": "<string>",
"companyAddress1": "<string>",
"companyAddress2": "<string>",
"companyCity": "<string>",
"companyState": "<string>",
"companyZip": "<string>",
"employeeName": "<string>",
"employeeEmail": "<string>",
"businessAddressExist": true,
"senderInfoExist": true,
"brandColor": "<string>",
"attachments": [
{
"id": 123,
"type": "FILE",
"caption": "<string>",
"publicFileUrl": "<string>",
"date": "2023-11-07T05:31:56Z",
"amount": 123,
"attachToTable": "<string>",
"attachToId": "<string>"
}
],
"showInvoiceIsDraft": true,
"salesTax": 123,
"invoiceItemByWorkItemType": {},
"invoiceLineItemList": [
{
"lineItemName": "<string>",
"workItemType": "<string>",
"lineItemDescription": "<string>",
"price": 123,
"workItemDate": "<string>",
"invoiceItemDiscountedPrice": 123,
"unitPrice": 123,
"quantity": 123,
"invoiceItemRegularPrice": 123,
"salesTax": 123
}
],
"clientAdditionalContactName": "<string>",
"clientBusinessName": "<string>",
"clientEmail": "<string>",
"clientPhoneWork": "<string>",
"clientAddress1": "<string>",
"clientAddress2": "<string>",
"clientCity": "<string>",
"clientState": "<string>",
"clientZip": "<string>",
"clientInfoExist": true,
"clientAddressExist": true
},
"isDraftInvoice": true
}
}Finalize invoice
Finalize a previously drafted invoice
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"id": 123,
"sendEmail": true,
"acceptCredit": true,
"acceptCash": true,
"acceptACH": true
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice"
payload = {
"id": 123,
"sendEmail": True,
"acceptCredit": True,
"acceptCash": True,
"acceptACH": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
id: 123,
sendEmail: true,
acceptCredit: true,
acceptCash: true,
acceptACH: true
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => 123,
'sendEmail' => true,
'acceptCredit' => true,
'acceptCash' => true,
'acceptACH' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice"
payload := strings.NewReader("{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/invoicing/finalizeInvoice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"id\": 123,\n \"sendEmail\": true,\n \"acceptCredit\": true,\n \"acceptCash\": true,\n \"acceptACH\": true\n}"
response = http.request(request)
puts response.read_body{
"cloudStorageRetVal": {
"url": "<string>",
"fileName": "<string>",
"htmlReport": "<string>",
"jsonReport": {}
},
"message": "<string>",
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"errorMessage": "<string>"
}
]
},
"htmlReport": "<string>",
"invoiceId": "<string>",
"newlyCreatedInvoiceId": "<string>",
"invoiceNo": 123,
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>"
},
"invoicePaymentUrl": "<string>",
"invoiceRetVal": {
"xml": "<string>",
"id": "<string>",
"name": "<string>",
"totalAmount": 123,
"invoice": {
"id": "<string>",
"business": {
"id": "<string>",
"companyId": "<string>",
"companyIdLong": 123,
"customerPartnerId": 123,
"name": "<string>",
"showName": true,
"contactFirst": "<string>",
"contactLast": "<string>",
"showContactFirstLast": true,
"email": "<string>",
"showEmail": true,
"phoneWork": "<string>",
"showPhoneWork": true,
"address1": "<string>",
"address2": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"showAddress": true,
"tin": "<string>",
"invoicePrefix": "<string>",
"plaidApiEntityIds": "<string>",
"apiClientId": "<string>",
"dimensionId": 123,
"level0Id": 123,
"createdDate": "2023-11-07T05:31:56Z",
"nameColumnNameForPagination": "<string>",
"externalId": "<string>"
},
"businessId": 123,
"companyId": "<string>",
"companyIdLong": 123,
"customerPartnerId": 123,
"createdDatetime": "2023-11-07T05:31:56Z",
"name": "<string>",
"date": "2023-11-07T05:31:56Z",
"totalAmount": 123,
"discountAmount": 123,
"discountPercent": 123,
"dueDate": "2023-11-07T05:31:56Z",
"email": "<string>",
"invoiceNo": 123,
"message": "<string>",
"propertyId": "<string>",
"lastReminderDate": "2023-11-07T05:31:56Z",
"clientId": "<string>",
"lastViewedDate": "2023-11-07T05:31:56Z",
"acceptCredit": true,
"acceptCash": true,
"reminderSchedule": "<string>",
"lastCreatedRecurringInvoice": "2023-11-07T05:31:56Z",
"parentId": "<string>",
"isRecurringParent": true,
"emailErrors": {
"empty": true
},
"sendEmail": true,
"sentDate": "2023-11-07T05:31:56Z",
"billingInfoId": "<string>",
"paymentErrors": "<string>",
"acceptACH": true,
"extensionId": "<string>",
"apiInvoiceId": "<string>",
"installments": [
{
"name": "First Payment",
"dueDate": "2025-01-15",
"amount": 500,
"id": "<string>",
"companyId": "<string>",
"arInvoice": "<unknown>",
"status": "ACTIVE",
"dateForPagination": "2023-11-07T05:31:56Z",
"externalId": "<string>"
}
],
"calculateSalesTaxBeforeDiscount": true,
"glSourceId": 123,
"ccemails": "<string>",
"bccemails": "<string>",
"invoicePrefix": "<string>",
"glAccountId": 123,
"invoiceNumberDigitLength": 123,
"paymentErrorsAsJsonArray": {
"empty": true
},
"glAmount": 123,
"bankAccountId": 123,
"parentEntityId": 123,
"externalId": "<string>"
},
"logoUrl": "<string>",
"invoiceReport": {
"invoiceName": "<string>",
"invoiceNo": 123,
"totalInvoiceAmount": 123,
"totalDiscountedInvoiceAmount": 123,
"personalNote": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"invoiceDate": "2023-11-07T05:31:56Z",
"discountAmount": 123,
"discountPercent": 123,
"invoiceTerm": "<string>",
"businessName": "<string>",
"showBusinessName": true,
"businessLogoUrl": "<string>",
"businessCity": "<string>",
"businessState": "<string>",
"businessZip": "<string>",
"businessAddress1": "<string>",
"businessAddress2": "<string>",
"clientName": "<string>",
"companyName": "<string>",
"companyPhone": "<string>",
"businessPhone": "<string>",
"companyAddress1": "<string>",
"companyAddress2": "<string>",
"companyCity": "<string>",
"companyState": "<string>",
"companyZip": "<string>",
"employeeName": "<string>",
"employeeEmail": "<string>",
"businessAddressExist": true,
"senderInfoExist": true,
"brandColor": "<string>",
"attachments": [
{
"id": 123,
"type": "FILE",
"caption": "<string>",
"publicFileUrl": "<string>",
"date": "2023-11-07T05:31:56Z",
"amount": 123,
"attachToTable": "<string>",
"attachToId": "<string>"
}
],
"showInvoiceIsDraft": true,
"salesTax": 123,
"invoiceItemByWorkItemType": {},
"invoiceLineItemList": [
{
"lineItemName": "<string>",
"workItemType": "<string>",
"lineItemDescription": "<string>",
"price": 123,
"workItemDate": "<string>",
"invoiceItemDiscountedPrice": 123,
"unitPrice": 123,
"quantity": 123,
"invoiceItemRegularPrice": 123,
"salesTax": 123
}
],
"clientAdditionalContactName": "<string>",
"clientBusinessName": "<string>",
"clientEmail": "<string>",
"clientPhoneWork": "<string>",
"clientAddress1": "<string>",
"clientAddress2": "<string>",
"clientCity": "<string>",
"clientState": "<string>",
"clientZip": "<string>",
"clientInfoExist": true,
"clientAddressExist": true
},
"isDraftInvoice": true
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Click 'Body Sample' below to see an example JSON Object
Id of the previously drafted invoice.
Whether the finalized invoice will be emailed to the client. Setting this to false is useful for when a client finalizes invoices for their own records, prior to sending them out to their clients.
true
Whether the client can pay by debit/credit card. At least one of acceptCredit, acceptCash, or acceptACH must be true.
Whether the client can pay by cash/check. At least one of acceptCash, acceptCredit, or acceptACH must be true.
Whether the client can pay by bank account. At least one of acceptACH, acceptCredit, or acceptCash must be true.
Response
Successful operation
SUCCESS, FAILURE_INVALID_INVOICE, WORKITEMS_ALREADY_INVOICED, FAILURE_ZERO_AMOUNT, PAYMENT_NOT_SETUP, FAILURE_OTHER Show child attributes
Show child attributes
SUCCESS, FAILURE_TOKEN_INVALIDATED, FAILURE_TOKEN_POSSIBLY_EXPIRED, FAILURE_INVOICE_NOT_FOUND, FAILURE_OTHER, SENDING, NOT_SENT, FAILURE_BOUNCED, WARNING_AUTO_RESPONSE SUCCESS, FAILURE_INVOICE, FAILURE_CLOUDSTORAGE, FAILURE_EMAIL, FAILURE_OTHER Error object containing details errors incurred, if any
Show child attributes
Show child attributes
Show child attributes
Show child attributes
URL at which the client can pay this invoice
Show child attributes
Show child attributes