Skip to main content
POST
/
v4
/
invoicing
/
previewInvoice
Preview an invoice
curl --request POST \
  --url https://sandbox.hurdlr.com/rest/v4/invoicing/previewInvoice \
  --header 'Authorization: Bearer <token>'
{
  "invoiceResult": "SUCCESS",
  "cloudStorageRetVal": {
    "url": "<string>",
    "fileName": "<string>",
    "result": "SUCCESS",
    "htmlReport": "<string>",
    "jsonReport": {}
  },
  "emailStatus": "SUCCESS",
  "result": "SUCCESS",
  "message": "<string>",
  "errors": {
    "fieldErrors": {},
    "globalErrors": [
      {
        "type": "DUPLICATE",
        "errorMessage": "<string>"
      }
    ]
  },
  "htmlReport": "<string>",
  "invoiceId": "<string>",
  "newlyCreatedInvoiceId": "<string>",
  "invoiceNo": 123,
  "webhook": {
    "userId": "<string>",
    "accountantUserId": "<string>",
    "type": "ENTITY_UPDATE"
  },
  "invoiceRetVal": {
    "xml": "<string>",
    "id": "<string>",
    "name": "<string>",
    "totalAmount": 123,
    "term": "DUE_NOW",
    "result": "SUCCESS",
    "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>",
        "status": "ACTIVE",
        "apiName": "GOOGLELOGIN",
        "apiClientId": "<string>",
        "bizType": "ADVISOR_COACH",
        "labelId": 123,
        "createdDate": "2023-11-07T05:31:56Z",
        "idPrefix": "COMPANY",
        "nameColumnNameForPagination": "<string>",
        "externalId": "<string>"
      },
      "businessId": 123,
      "companyId": "<string>",
      "name": "<string>",
      "date": "2023-11-07T05:31:56Z",
      "totalAmount": 123,
      "invoiceStatus": "OPEN",
      "discountAmount": 123,
      "discountPercent": 123,
      "invoiceTerm": "DUE_NOW",
      "dueDate": "2023-11-07T05:31:56Z",
      "email": "<string>",
      "invoiceNo": 123,
      "message": "<string>",
      "propertyId": "<string>",
      "lastReminderDate": "2023-11-07T05:31:56Z",
      "emailStatus": "SUCCESS",
      "clientId": "<string>",
      "lastViewedDate": "2023-11-07T05:31:56Z",
      "acceptCredit": true,
      "acceptCash": true,
      "reminderSchedule": "<string>",
      "lastCreatedRecurringInvoice": "2023-11-07T05:31:56Z",
      "parentId": "<string>",
      "invoiceFrequency": "ONE_TIME",
      "isRecurringParent": true,
      "refundStatus": "PENDING",
      "emailErrors": {
        "empty": true
      },
      "sendEmail": true,
      "sentDate": "2023-11-07T05:31:56Z",
      "billingInfoId": "<string>",
      "paymentErrors": "<string>",
      "acceptACH": true,
      "extensionId": "<string>",
      "apiName": "GOOGLELOGIN",
      "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>",
          "idPrefix": "COMPANY"
        }
      ],
      "calculateSalesTaxBeforeDiscount": true,
      "glSourceId": 123,
      "source": "EXPENSE",
      "ccemails": "<string>",
      "bccemails": "<string>",
      "invoicePrefix": "<string>",
      "glAccountId": 123,
      "glAmount": 123,
      "generalLedgerStatus": "ACTIVE",
      "invoiceNumberDigitLength": 123,
      "paymentErrorsAsJsonArray": {
        "empty": true
      },
      "reviewStatus": "PARTNER_REVIEW_REQUIRED",
      "bankAccountId": 123,
      "parentEntityId": 123,
      "externalId": "<string>",
      "idPrefix": "COMPANY"
    },
    "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>",
      "type": "INITIAL",
      "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
    },
    "invoiceStatus": "OPEN",
    "isDraftInvoice": true
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Response

200 - application/json

Successful operation

invoiceResult
enum<string>
Available options:
SUCCESS,
FAILURE_INVALID_INVOICE,
WORKITEMS_ALREADY_INVOICED,
FAILURE_ZERO_AMOUNT,
PAYMENT_NOT_SETUP,
FAILURE_OTHER
cloudStorageRetVal
object
emailStatus
enum<string>
Available options:
SUCCESS,
FAILURE_TOKEN_INVALIDATED,
FAILURE_TOKEN_POSSIBLY_EXPIRED,
FAILURE_INVOICE_NOT_FOUND,
FAILURE_OTHER,
SENDING,
NOT_SENT,
FAILURE_BOUNCED,
WARNING_AUTO_RESPONSE
result
enum<string>
Available options:
SUCCESS,
FAILURE_INVOICE,
FAILURE_CLOUDSTORAGE,
FAILURE_EMAIL,
FAILURE_OTHER
message
string
errors
object

Error object containing details errors incurred, if any

htmlReport
string
invoiceId
string
newlyCreatedInvoiceId
string
invoiceNo
integer<int32>
webhook
object
invoiceRetVal
object