Invoices

Create

POST /v1/invoice

Creates an Account Receivables Invoice which represents a Sale where the customer pays for a product or service.

Create Invoice Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string Unique identifier. You can pass your own DocNumber
or allow QuickBooks to auto-increment.
Maximum of 21 characters

* customerId number Customer ID
SELECT * FROM Customer
* termId number Terms Id of the invoice. Example : "Net 30"
SELECT * FROM Term
* totalTaxOverride number If you want to calculate your own tax, put the value here.
Only for USD companies
* shipAmount number Amount of total shipping on the invoice
*Shipping must be enabled in settings.*
* shipTaxCodeRef number For CANADA pass the tax code id by calling
SELECT * FROM TaxRate
* shipTrackingNumber string Shipping carriers tracking number: UPS, FedEx, USPS...
* shipDate string Date of shipment
* shipMethod string Shipping carrier: UPS, FedEx, USPS...
* note string Information about the invoice
* lineItems array See Invoice Line Items below

Invoice Line Items: * required * conditionally required

An invoice must have at least one Line for either a sales item or an inline subtotal.

Parameter Data Type Description
* code string Your Item or Part Number
* productService string You will need to do a query on Item to get the ID.
SELECT * FROM Item
* units number Same as Qty
* classRef string If you have Track Classes enabled. .
SELECT * FROM Class
* description string Line item description
* billAmount number Amount of the invoice
* taxCodeRef boolean For USD you can pass either “NON” or “TAX”
For CAN you can pass the id from calling
SELECT * FROM TaxRate

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/invoice" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
USD Example:
 
{
  "invoiceNumber": 557822360,
  "invoiceDate": "1/23/2022",
  "customerId": 59,
  "company": "CBR Tulsa 2",
  "address": "P.O. Box 5816307",
  "phone": "9183556207",
  "city": "Tulsa",
  "state": "OK",
  "zip": "74158",
  "note": "From 10Man Claim # 9220034167",
  "termId": "6",
  "totalTaxOverride": 5.99,
  "lineItems": [
    {
      "code": "Test 3",
      "units": 1,
      "description": "Electrodes, pair",
      "billAmount": 10,
      "productService": "21",
      "classRef": "5000000000000138237",
      "taxCodeRef": "TAX"
    },
    {
      "code": "Test 3",
      "units": 1,
      "description": "PPO Access Fee",
      "billAmount": 5,
      "productService": "21",
      "classRef": "5000000000000138237",
      "taxCodeRef": "NON"
    }
  ]
}
 
CAN Example:
{
  "invoiceNumber": 1267,
  "customerId": 3,
  "invoiceDate": "1/23/2022",
  "company": "Benjamin Yeung",
  "address": "4333895 King Edward Ave.",
  "phone": "9189996207",
  "city": "Barrie",
  "state": "ON",
  "zip": "ON M2H 4G4",
  "note": "From SalesOrder # 219220034167",
  "termId": "3",
  "lineItems": [
    {
      "code": "Retreat",
      "units": 1,
      "description": "Servcies",
      "billAmount": 10,
      "productService": "12",
      "classRef": "200200000000000016356",
      "taxCodeRef": "5"
    },
    {
      "code": "Services",
      "units": 1,
      "description": "Access Fee",
      "billAmount": 5,
      "productService": "12",
      "classRef": "200200000000000016356",
      "taxCodeRef": "3"
    }
  ]
}'

Response:

{
    "success": true,
    "type": "Operation",
    "message": "",
    "details": [],
    "id": "172",
    "docNumber": "12",
    "totalAmount": "20.00",
    "txnDate": "2019-12-23",
    "dueDate": "2020-02-21",
    "invoice": {
        "Deposit": "0",
        "AllowIPNPayment": "false",
        "AllowOnlinePayment": "false",
        "AllowOnlineCreditCardPayment": "false",
        "AllowOnlineACHPayment": "false",
        "EInvoiceStatus": null,
        "ECloudStatusTimeStamp": null,
        "invoiceStatus": null,
        "callToAction": null,
        "invoiceStatusLog": null,
        "InvoiceEx": null,
        "LessCIS": null,
        "InvoiceLink": null,
        "AutoDocNumber": null,
        "CustomerRef": "59",
        "CustomerMemo": "From Sales Claim # 5723",
        "BillAddr": {
            "Id": "98",
            "Line1": "P.O. Box 1234",
            "Line2": null,
            "Line3": null,
            "Line4": null,
            "Line5": null,
            "City": "Tulsa",
            "Country": null,
            "CountryCode": null,
            "CountrySubDivisionCode": "OK",
            "PostalCode": "74150",
            "PostalCodeSuffix": null,
            "Lat": null,
            "Long": null,
            "Tag": null,
            "Note": null
        },
        "ShipAddr": null,
        "FreeFormAddress": null,
        "ShipFromAddr": {
            "Id": "127",
            "Line1": "5223 N Commercial St",
            "Line2": "Tulsa, OK  74114",
            "Line3": null,
            "Line4": null,
            "Line5": null,
            "City": null,
            "Country": null,
            "CountryCode": null,
            "CountrySubDivisionCode": null,
            "PostalCode": null,
            "PostalCodeSuffix": null,
            "Lat": null,
            "Long": null,
            "Tag": null,
            "Note": null
        },
        "RemitToRef": null,
        "ClassRef": null,
        "SalesTermRef": "9",
        "DueDate": "2020-02-21",
        "SalesRepRef": null,
        "PONumber": null,
        "FOB": null,
        "ShipMethodRef": null,
        "ShipDate": null,
        "TrackingNum": null,
        "GlobalTaxCalculation": null,
        "TotalAmt": "20.00",
        "HomeTotalAmt": null,
        "ApplyTaxAfterDiscount": "false",
        "TemplateRef": null,
        "PrintStatus": "NeedToPrint",
        "EmailStatus": "NotSet",
        "BillEmail": null,
        "BillEmailCc": null,
        "BillEmailBcc": null,
        "ARAccountRef": null,
        "Balance": "20.00",
        "HomeBalance": null,
        "FinanceCharge": null,
        "PaymentMethodRef": null,
        "PaymentRefNum": null,
        "PaymentType": null,
        "CheckPayment": null,
        "CreditCardPayment": null,
        "DepositToAccountRef": null,
        "DeliveryInfo": null,
        "DiscountRate": null,
        "DiscountAmt": null,
        "GovtTxnRefIdentifier": null,
        "TaxExemptionRef": "",
        "DocNumber": "12",
        "TxnDate": "2019-12-23",
        "DepartmentRef": null,
        "CurrencyRef": "USD",
        "ExchangeRate": null,
        "PrivateNote": null,
        "TxnStatus": null,
        "LinkedTxn": null,
        "Line": [{
            "Id": "1",
            "LineNum": "1",
            "Description": "Electrodes, pair",
            "Amount": "10.00",
            "LinkedTxn": null,
            "DetailType": "SalesItemLineDetail",
            "PaymentLineDetail": null,
            "DiscountLineDetail": null,
            "TaxLineDetail": null,
            "SalesItemLineDetail": {
                "ServiceDate": null,
                "TaxInclusiveAmt": null,
                "DiscountRate": null,
                "DiscountAmt": null,
                "SalesItemLineDetailEx": null,
                "ItemRef": "22",
                "ClassRef": "5000000000000138237",
                "UnitPrice": "10",
                "RatePercent": null,
                "PriceLevelRef": null,
                "MarkupInfo": null,
                "Qty": "1",
                "UOMRef": null,
                "ItemAccountRef": "101",
                "InventorySiteRef": null,
                "TaxCodeRef": "NON",
                "TaxClassificationRef": "EUV-99990101-T1-00040000"
            },
            "DescriptionLineDetail": null,
            "ItemBasedExpenseLineDetail": null,
            "AccountBasedExpenseLineDetail": null,
            "DepositLineDetail": null,
            "PurchaseOrderItemLineDetail": null,
            "SalesOrderItemLineDetail": null,
            "ItemReceiptLineDetail": null,
            "JournalEntryLineDetail": null,
            "GroupLineDetail": null,
            "SubTotalLineDetail": null,
            "TDSLineDetail": null,
            "CustomField": null,
            "LineEx": null
        }, {
            "Id": "2",
            "LineNum": "2",
            "Description": "Access Fee",
            "Amount": "5.00",
            "LinkedTxn": null,
            "DetailType": "SalesItemLineDetail",
            "PaymentLineDetail": null,
            "DiscountLineDetail": null,
            "TaxLineDetail": null,
            "SalesItemLineDetail": {
                "ServiceDate": null,
                "TaxInclusiveAmt": null,
                "DiscountRate": null,
                "DiscountAmt": null,
                "SalesItemLineDetailEx": null,
                "ItemRef": "22",
                "ClassRef": "5000000000000138237",
                "UnitPrice": "5",
                "RatePercent": null,
                "PriceLevelRef": null,
                "MarkupInfo": null,
                "Qty": "1",
                "UOMRef": null,
                "ItemAccountRef": "101",
                "InventorySiteRef": null,
                "TaxCodeRef": "TAX",
                "TaxClassificationRef": "EUC-09020802-V1-00120000"
            },
            "DescriptionLineDetail": null,
            "ItemBasedExpenseLineDetail": null,
            "AccountBasedExpenseLineDetail": null,
            "DepositLineDetail": null,
            "PurchaseOrderItemLineDetail": null,
            "SalesOrderItemLineDetail": null,
            "ItemReceiptLineDetail": null,
            "JournalEntryLineDetail": null,
            "GroupLineDetail": null,
            "SubTotalLineDetail": null,
            "TDSLineDetail": null,
            "CustomField": null,
            "LineEx": null
        }, {
            "Id": null,
            "LineNum": null,
            "Description": null,
            "Amount": "15.00",
            "LinkedTxn": null,
            "DetailType": "SubTotalLineDetail",
            "PaymentLineDetail": null,
            "DiscountLineDetail": null,
            "TaxLineDetail": null,
            "SalesItemLineDetail": null,
            "DescriptionLineDetail": null,
            "ItemBasedExpenseLineDetail": null,
            "AccountBasedExpenseLineDetail": null,
            "DepositLineDetail": null,
            "PurchaseOrderItemLineDetail": null,
            "SalesOrderItemLineDetail": null,
            "ItemReceiptLineDetail": null,
            "JournalEntryLineDetail": null,
            "GroupLineDetail": null,
            "SubTotalLineDetail": "",
            "TDSLineDetail": null,
            "CustomField": null,
            "LineEx": null
        }],
        "TxnTaxDetail": {
            "DefaultTaxCodeRef": null,
            "TxnTaxCodeRef": "7",
            "TotalTax": "5.00",
            "TaxLine": [{
                "Id": null,
                "LineNum": null,
                "Description": null,
                "Amount": "1.91",
                "LinkedTxn": null,
                "DetailType": "TaxLineDetail",
                "PaymentLineDetail": null,
                "DiscountLineDetail": null,
                "TaxLineDetail": {
                    "TaxRateRef": "13",
                    "PercentBased": "true",
                    "TaxPercent": "3.55",
                    "NetAmountTaxable": "5.00",
                    "TaxInclusiveAmount": null,
                    "OverrideDeltaAmount": null,
                    "ServiceDate": null,
                    "TaxLineDetailEx": null
                },
                "SalesItemLineDetail": null,
                "DescriptionLineDetail": null,
                "ItemBasedExpenseLineDetail": null,
                "AccountBasedExpenseLineDetail": null,
                "DepositLineDetail": null,
                "PurchaseOrderItemLineDetail": null,
                "SalesOrderItemLineDetail": null,
                "ItemReceiptLineDetail": null,
                "JournalEntryLineDetail": null,
                "GroupLineDetail": null,
                "SubTotalLineDetail": null,
                "TDSLineDetail": null,
                "CustomField": null,
                "LineEx": null
            }, {
                "Id": null,
                "LineNum": null,
                "Description": null,
                "Amount": "0.75",
                "LinkedTxn": null,
                "DetailType": "TaxLineDetail",
                "PaymentLineDetail": null,
                "DiscountLineDetail": null,
                "TaxLineDetail": {
                    "TaxRateRef": "12",
                    "PercentBased": "true",
                    "TaxPercent": "1.3",
                    "NetAmountTaxable": "5.00",
                    "TaxInclusiveAmount": null,
                    "OverrideDeltaAmount": null,
                    "ServiceDate": null,
                    "TaxLineDetailEx": null
                },
                "SalesItemLineDetail": null,
                "DescriptionLineDetail": null,
                "ItemBasedExpenseLineDetail": null,
                "AccountBasedExpenseLineDetail": null,
                "DepositLineDetail": null,
                "PurchaseOrderItemLineDetail": null,
                "SalesOrderItemLineDetail": null,
                "ItemReceiptLineDetail": null,
                "JournalEntryLineDetail": null,
                "GroupLineDetail": null,
                "SubTotalLineDetail": null,
                "TDSLineDetail": null,
                "CustomField": null,
                "LineEx": null
            }, {
                "Id": null,
                "LineNum": null,
                "Description": null,
                "Amount": "2.34",
                "LinkedTxn": null,
                "DetailType": "TaxLineDetail",
                "PaymentLineDetail": null,
                "DiscountLineDetail": null,
                "TaxLineDetail": {
                    "TaxRateRef": "11",
                    "PercentBased": "true",
                    "TaxPercent": "4.5",
                    "NetAmountTaxable": "5.00",
                    "TaxInclusiveAmount": null,
                    "OverrideDeltaAmount": null,
                    "ServiceDate": null,
                    "TaxLineDetailEx": null
                },
                "SalesItemLineDetail": null,
                "DescriptionLineDetail": null,
                "ItemBasedExpenseLineDetail": null,
                "AccountBasedExpenseLineDetail": null,
                "DepositLineDetail": null,
                "PurchaseOrderItemLineDetail": null,
                "SalesOrderItemLineDetail": null,
                "ItemReceiptLineDetail": null,
                "JournalEntryLineDetail": null,
                "GroupLineDetail": null,
                "SubTotalLineDetail": null,
                "TDSLineDetail": null,
                "CustomField": null,
                "LineEx": null
            }]
        },
        "TxnSource": null,
        "TaxFormType": null,
        "TaxFormNum": null,
        "TransactionLocationType": null,
        "Id": "172",
        "SyncToken": "0",
        "MetaData": {
            "CreatedByRef": null,
            "CreateTime": "2020-01-01T09:20:09-08:00",
            "LastModifiedByRef": null,
            "LastUpdatedTime": "2020-01-01T09:20:09-08:00",
            "LastChangedInQB": null,
            "Synchronized": null
        },
        "CustomField": {
            "DefinitionId": "1",
            "Name": null,
            "Type": "StringType",
            "StringValue": null,
            "BooleanValue": null,
            "DateValue": null,
            "NumberValue": null
        },
        "AttachableRef": null,
        "domain": null,
        "status": null,
        "sparse": null
    }
}
Notes:
  • Reference number for the transaction. DocNumber is required if Preferences:CustomTxnNumber is enabled and will not be be automatically generated.
  • If not explicitly provided at create time, this field is populated based on the setting of Preferences:CustomTxnNumber as follows:
  • If Preferences:CustomTxnNumber is true a custom value can be provided. If no value is supplied, the resulting DocNumber is null.
  • If Preferences:CustomTxnNumber is false, resulting DocNumber is system generated by incrementing the last number by 1.
  • If Preferences:CustomTxnNumber is false then do not send a value as it can lead to unwanted duplicates.
  • If a DocNumber value is sent for an Update operation, then it just updates that particular invoice and does not alter the internal system DocNumber.

Useful lookups with SQL commands to retrieve Account Settings:

curl -X "POST" "https://snapbooksapi.com/api/v1/query" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  			"query": "SELECT * FROM Preferences"
		}'

Response from Query (Abbreviated):

{
...
  "CustomTxnNumbers": "false",
...
}

If true, this means we are providing the invoice number. If false, QuickBooks automatically handles the invoice numbers. After making the call to the API to create the invoice, the invoiceNumber will get returned.

To get the productService, you need:

curl -X "POST" "https://snapbooksapi.com/api/v1/query" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  			"query": "SELECT * FROM Item"
		}'

Response from Query (Abbreviated):

{
...
  "id": "20",
...
}  	

To get the Id, you need:

curl -X "POST" "https://snapbooksapi.com/api/v1/query" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  			"query": "SELECT * FROM Class"
		}'

Response from Query (Abbreviated):

{
...
"Name":"Test",
"SubClass":"false",
"ParentRef":null,
"FullyQualifiedName":"Test",
"Active":"true",
"ClassEx":null,
"Id":"5000000000000138237",
"SyncToken":"0",
...
}

Update

Updates an invoice with all of the same parameters as Create Invoice with its line items.

Update Invoice Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string Unique identifier. You can pass your own DocNumber
or allow QuickBooks to auto-increment.
Maximum of 21 characters

* customerId string the id of the customer
SELECT * FROM Customer
* termId number Terms Id of the invoice. Example : "Net 30"
SELECT * FROM Terms
* disableTax boolean No tax will get calculated if set to true
* totalTaxOverride number If you want to calculate your own tax, put the value here
* shipAmount number Amount of total shipping on the invoice
* shipTrackingNumber string Shipping carriers tracking number: UPS, FedEx, USPS...
* shipDate string Date of shipment
* shipMethod string Shipping carrier: UPS, FedEx, USPS...
* note string Information about the invoice.
* lineItems array See Invoice Line Items below

Invoice Line Items: * required * conditionally required

**Parameter       ** Data Type Description
* code string Your Item or Part Number
* productService string You will need to do a query on Item to get the ID.
SELECT * FROM Item
* units number Same as Qty
* classRef string If you have Track Classes enabled.
You will need to do a query on Class to get the Id.
SELECT * FROM Class

* description string Line item description
* billAmount number Amount of the invoice
* taxable boolean True or false if the item is taxable

Request

curl -X "PUT" "https://snapbooksapi.com/api/v1/invoice" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "invoiceNumber": "INV-666666665346",
  "invoiceDate": "03/04/2019",
  "customerId": 322,
  "createCustomer": true,
  "termId": 5,
  "disableTax": false,
  "totalTaxOverride": 212.65,
  "shipAmount": 22.33,
  "shipTrackingNumber": "1Z023423432343414",
  "shipDate":"03/04/2019",
  "shipMethod":"UPS",
  "Note": "Claim # 9220034167",

  "lineItems": [
    {
      "code": "A4556",
      "productService": "5",
      "units": 1,
      "classRef": "5000000000000111780",
      "description": "Electrodes, pair",
      "billAmount": 11.69,
      "taxable": false
    },
    {
      "code": "PPOAF",
      "productService": "5",
      "units": 1,
      "classRef": "5000000000000111780",
      "description": "PPO Access Fee",
      "billAmount": 5,
      "taxable": true
    }
  ]
}'

Response

{
  "success": true,
  "message": null,
  "details": []
}

Delete

Delete Invoice Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string The invoice number you want to delete in QuickBooks Online.

Request

curl -X "DELETE" "https://snapbooksapi.com/api/v1/invoice" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "invoiceNumber": "INV-666666665346"
}'

Response

{
  "success": true,
  "message": null,
  "details": [],
  "id": "330"
}

Search Invoice Attributes: * required * conditionally required

Parameter Data Type Description
* docNumber string The invoice number you want to search for in QuickBooks Online.

Request

curl "https://snapbooksapi.com/api/v1/invoice?docNumber=6777" \
     -H 'X-Api-Key: xxx'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "invoice": {
    "Deposit": "0",
    "AllowIPNPayment": "false",
    "AllowOnlinePayment": "false",
    "AllowOnlineCreditCardPayment": "false",
    "AllowOnlineACHPayment": "false",
    "EInvoiceStatus": null,
    "ECloudStatusTimeStamp": null,
    "invoiceStatus": null,
    "callToAction": null,
    "invoiceStatusLog": null,
    "InvoiceEx": null,
    "LessCIS": null,
    "InvoiceLink": null,
    "ConvenienceFeeDetail": null,
    "AutoDocNumber": null,
    "CustomerRef": "162",
    "CustomerMemo": "From Billing System Claim # 214000095",
    "BillAddr": {
      "Id": "9210",
      "Line1": "P.O. Box 211630",
      "Line2": null,
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": "Tulsa",
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": "OK",
      "PostalCode": "74128",
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "ShipAddr": {
      "Id": "9211",
      "Line1": "P.O. Box 211630",
      "Line2": null,
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": "Tulsa",
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": "OK",
      "PostalCode": "74128",
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "FreeFormAddress": "true",
    "ShipFromAddr": {
      "Id": "8543",
      "Line1": "13401 Smith Drive",
      "Line2": "Oklahoma City, OK  73111 US",
      "Line3": null,
      "Line4": null,
      "Line5": null,
      "City": null,
      "Country": null,
      "CountryCode": null,
      "CountrySubDivisionCode": null,
      "PostalCode": null,
      "PostalCodeSuffix": null,
      "Lat": null,
      "Long": null,
      "Tag": null,
      "Note": null
    },
    "RemitToRef": null,
    "ClassRef": null,
    "SalesTermRef": "1",
    "DueDate": "2020-01-09",
    "SalesRepRef": null,
    "PONumber": null,
    "FOB": null,
    "ShipMethodRef": null,
    "ShipDate": null,
    "TrackingNum": null,
    "GlobalTaxCalculation": null,
    "TotalAmt": "654.03",
    "HomeTotalAmt": null,
    "ApplyTaxAfterDiscount": "false",
    "TemplateRef": null,
    "PrintStatus": "NeedToPrint",
    "EmailStatus": "NotSet",
    "BillEmail": null,
    "BillEmailCc": null,
    "BillEmailBcc": null,
    "ARAccountRef": null,
    "Balance": "0",
    "HomeBalance": null,
    "FinanceCharge": null,
    "PaymentMethodRef": null,
    "PaymentRefNum": null,
    "PaymentType": null,
    "CheckPayment": null,
    "CreditCardPayment": null,
    "DepositToAccountRef": null,
    "DeliveryInfo": null,
    "DiscountRate": null,
    "DiscountAmt": null,
    "GovtTxnRefIdentifier": null,
    "TaxExemptionRef": "",
    "DocNumber": "15987",
    "TxnDate": "2020-01-09",
    "DepartmentRef": null,
    "CurrencyRef": "USD",
    "ExchangeRate": null,
    "PrivateNote": null,
    "TxnStatus": null,
    "LinkedTxn": {
      "TxnId": "35488",
      "TxnType": "Payment",
      "TxnLineId": null
    },
    "Line": [
      {
        "Id": "4",
        "LineNum": "1",
        "Description": "Rocker assembly Arm",
        "Amount": "630.00",
        "Received": null,
        "LinkedTxn": null,
        "DetailType": "SalesItemLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": {
          "ServiceDate": null,
          "TaxInclusiveAmt": null,
          "DiscountRate": null,
          "DiscountAmt": null,
          "SalesItemLineDetailEx": null,
          "ItemRef": "5",
          "ClassRef": "1300000000000486296",
          "UnitPrice": "630",
          "RatePercent": null,
          "PriceLevelRef": null,
          "MarkupInfo": null,
          "Qty": "1",
          "UOMRef": null,
          "ItemAccountRef": "40",
          "InventorySiteRef": null,
          "TaxCodeRef": "NON",
          "TaxClassificationRef": "EUC-99990101-V1-00020000"
        },
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": null,
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      },
      {
        "Id": "5",
        "LineNum": "2",
        "Description": "Roller Bearings",
        "Amount": "19.03",
        "Received": null,
        "LinkedTxn": null,
        "DetailType": "SalesItemLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": {
          "ServiceDate": null,
          "TaxInclusiveAmt": null,
          "DiscountRate": null,
          "DiscountAmt": null,
          "SalesItemLineDetailEx": null,
          "ItemRef": "5",
          "ClassRef": "1300000000000486296",
          "UnitPrice": "19.03",
          "RatePercent": null,
          "PriceLevelRef": null,
          "MarkupInfo": null,
          "Qty": "1",
          "UOMRef": null,
          "ItemAccountRef": "40",
          "InventorySiteRef": null,
          "TaxCodeRef": "NON",
          "TaxClassificationRef": "EUC-99990101-V1-00020000"
        },
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": null,
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      },
      
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": null,
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      },
      {
        "Id": null,
        "LineNum": null,
        "Description": null,
        "Amount": "654.03",
        "Received": null,
        "LinkedTxn": null,
        "DetailType": "SubTotalLineDetail",
        "PaymentLineDetail": null,
        "DiscountLineDetail": null,
        "TaxLineDetail": null,
        "SalesItemLineDetail": null,
        "DescriptionLineDetail": null,
        "ItemBasedExpenseLineDetail": null,
        "AccountBasedExpenseLineDetail": null,
        "DepositLineDetail": null,
        "PurchaseOrderItemLineDetail": null,
        "SalesOrderItemLineDetail": null,
        "ItemReceiptLineDetail": null,
        "JournalEntryLineDetail": null,
        "GroupLineDetail": null,
        "SubTotalLineDetail": "",
        "TDSLineDetail": null,
        "CustomField": null,
        "LineEx": null
      }
    ],
    "TxnTaxDetail": {
      "DefaultTaxCodeRef": null,
      "TxnTaxCodeRef": null,
      "TotalTax": "0",
      "TaxReviewStatus": null,
      "TaxLine": null
    },
    "TxnSource": null,
    "TaxFormType": null,
    "TaxFormNum": null,
    "TransactionLocationType": null,
    "Id": "33407",
    "SyncToken": "2",
    "MetaData": {
      "CreatedByRef": null,
      "CreateTime": "2020-01-09T09:24:36-08:00",
      "LastModifiedByRef": null,
      "LastUpdatedTime": "2020-02-03T13:56:45-08:00",
      "LastChangedInQB": null,
      "Synchronized": null
    },
    "CustomField": null,
    "AttachableRef": null,
    "domain": null,
    "status": null,
    "sparse": null
  }
}

Void

Void Invoice Attributes: * required * conditionally required

Parameter Data Type Description
* invoiceNumber string The invoice number you want to void in QuickBooks Online.

Request

curl -X "PUT" "https://snapbooksapi.com/api/v1/invoice-void" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "invoiceNumber": "INV-9999999998"
}'

Response

{
  "success": true,
  "message": null,
  "details": []
}

Payment

Invoice Payment Attributes: * required * conditionally required

Parameter Data Type Description
* amount string The invoice number you want to make a payment to.
* invoiceNumber string Invoice number you want to record a payment against
* paymentDate string Date the payment was made
* paymentReference string Check number or something that identifies the payment method
* paymentMemo string Note about the payment if needed
* customerId string Customer ID
SELECT * FROM Customer
* paymentMethodId number Id of Method Type Example "Check", "Cash" or Credit Card"
SELECT * FROM paymentMethod

Request

curl -X "POST" "https://snapbooksapi.com/api/v1/invoice/payment" \
     -H 'X-Api-Key: xxx' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": "10",
  "invoiceNumber": "5882",
  "paymentDate": "12/18/18",
  "paymentReference": "10521700",
  "vqbPaymentMemo": "Check #: 10521700",
  "customerId": "1234"
}'

Response

{
  "success": true,
  "type": "Operation",
  "message": "",
  "details": [],
  "id": "175",
  "totalAmount": "10.00",
  "payment": {
    "CustomerRef": "59",
    "RemitToRef": null,
    "ARAccountRef": null,
    "DepositToAccountRef": "97",
    "PaymentMethodRef": "9",
    "PaymentRefNum": "10521700",
    "PaymentType": null,
    "CheckPayment": null,
    "CreditCardPayment": null,
    "TotalAmt": "10.00",
    "UnappliedAmt": "0",
    "ProcessPayment": "false",
    "PaymentEx": null,
    "DocNumber": null,
    "TxnDate": "2018-12-18",
    "DepartmentRef": null,
    "CurrencyRef": "USD",
    "ExchangeRate": null,
    "PrivateNote": "Check #: 10521700",
    "TxnStatus": null,
    "LinkedTxn": null,
    "Line": {
      "Id": null,
      "LineNum": null,
      "Description": null,
      "Amount": "10.00",
      "Received": null,
      "LinkedTxn": {
        "TxnId": "172",
        "TxnType": "Invoice",
        "TxnLineId": null
      },
      "DetailType": null,
      "PaymentLineDetail": null,
      "DiscountLineDetail": null,
      "TaxLineDetail": null,
      "SalesItemLineDetail": null,
      "DescriptionLineDetail": null,
      "ItemBasedExpenseLineDetail": null,
      "AccountBasedExpenseLineDetail": null,
      "DepositLineDetail": null,
      "PurchaseOrderItemLineDetail": null,
      "SalesOrderItemLineDetail": null,
      "ItemReceiptLineDetail": null,
      "JournalEntryLineDetail": null,
      "GroupLineDetail": null,
      "SubTotalLineDetail": null,
      "TDSLineDetail": null,
      "CustomField": null,
      "LineEx": {}
    },
    "TxnTaxDetail": null,
    "TxnSource": null,
    "TaxFormType": null,
    "TaxFormNum": null,
    "TransactionLocationType": null,
    "Id": "175",
    "SyncToken": "0",
    "MetaData": {
      "CreatedByRef": null,
      "CreateTime": "2020-02-03T17:06:00-08:00",
      "LastModifiedByRef": null,
      "LastUpdatedTime": "2020-02-03T17:06:00-08:00",
      "LastChangedInQB": null,
      "Synchronized": null
    },
    "CustomField": null,
    "AttachableRef": null,
    "domain": null,
    "status": null,
    "sparse": null
  }
}