Bills
Create
Create Bill Attributes: * required * conditionally required
Parameter | Data Type | Description |
---|---|---|
* transactionDate | string | Date of the transaction |
* account | string | You will need to do a lookup on the ItemSELECT * FROM Item |
* billNumber | string | Match to something in your system to match up so you can find it |
description | string | Description of the Invoice to pay |
* dueDate | string | Date invoice from vendor is due to pay |
* amount | string | Amount of the invoice to pay |
* classRef | string | You will need to do a lookup to get the classRefSELECT * FROM Class |
* vendorId | string | vendor IdSELECT * FROM Vendor |
Request
curl -X "POST" "https://snapbooksapi.com/api/v1/bill" \
-H 'X-Api-Key: xxx' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"transactionDate": "1/30/19",
"account": "63",
"billNumber": "BD-588444",
"description": "Estrada DOS: 11/21/18 Claim #000000038051",
"dueDate": "1/6/19",
"amount": "1600.00",
"classRef": "5000000000000111778",
"vendorId": 27
}'
Response
{
"success": true,
"message": "",
"details": [],
"id": "145",
"docNumber": "BD-588444",
"totalAmount": "1600.00",
"balance": "1600.00",
"txnDate": "2019-01-30",
"dueDate": "2019-01-06",
"bill": {
"PayerRef": null,
"SalesTermRef": null,
"DueDate": "2019-01-06",
"RemitToAddr": null,
"ShipAddr": null,
"Balance": "1600.00",
"HomeBalance": null,
"BillEx": null,
"LessCIS": null,
"VendorRef": "58",
"APAccountRef": "33",
"TotalAmt": "1600.00",
"BillEmail": null,
"ReplyEmail": null,
"Memo": null,
"GlobalTaxCalculation": null,
"DocNumber": "BD-588444",
"TxnDate": "2019-01-30",
"DepartmentRef": null,
"CurrencyRef": "USD",
"ExchangeRate": null,
"PrivateNote": null,
"TxnStatus": null,
"LinkedTxn": null,
"Line": {
"Id": "1",
"LineNum": "1",
"Description": "Estrada DOS: 11\/21\/18 Claim #000000038051",
"Amount": "1600.00",
"LinkedTxn": null,
"DetailType": "AccountBasedExpenseLineDetail",
"PaymentLineDetail": null,
"DiscountLineDetail": null,
"TaxLineDetail": null,
"SalesItemLineDetail": null,
"DescriptionLineDetail": null,
"ItemBasedExpenseLineDetail": null,
"AccountBasedExpenseLineDetail": {
"CustomerRef": null,
"ClassRef": "5000000000000135140",
"AccountRef": "63",
"BillableStatus": "NotBillable",
"MarkupInfo": null,
"TaxAmount": null,
"TaxCodeRef": "NON",
"TaxInclusiveAmt": null,
"ExpenseDetailLineDetailEx": null
},
"DepositLineDetail": null,
"PurchaseOrderItemLineDetail": null,
"SalesOrderItemLineDetail": null,
"ItemReceiptLineDetail": null,
"JournalEntryLineDetail": null,
"GroupLineDetail": null,
"SubTotalLineDetail": null,
"TDSLineDetail": null,
"CustomField": null,
"LineEx": null
},
"TxnTaxDetail": null,
"TxnSource": null,
"TaxFormType": null,
"TaxFormNum": null,
"TransactionLocationType": null,
"Id": "145",
"SyncToken": "0",
"MetaData": {
"CreatedByRef": null,
"CreateTime": "2019-11-13T09:41:57-08:00",
"LastModifiedByRef": null,
"LastUpdatedTime": "2019-11-13T09:41:57-08:00",
"LastChangedInQB": null,
"Synchronized": null
},
"CustomField": null,
"AttachableRef": null,
"domain": null,
"status": null,
"sparse": null
}
}
Sample Error Response
{
"success": false,
"message": "Request is not made successful. Response Code:[400] with body: [Invalid Reference IdInvalid Reference Id : Klasses element id 5000000000000111778 not found].",
"details": []
}
Update
Update Bill Attributes: * required * conditionally required
Parameter | Data Type | Description |
---|---|---|
* transactionDate | string | Date of transaction |
* account | string | You will need to do a lookup on the ItemSELECT * FROM Item |
* billNumber | string | Match to something in your system to match up so you can find it |
description | string | Description of the Invoice to pay |
* dueDate | string | Date invoice from vendor is due to pay |
* amount | string | Amount of the invoice to pay |
* classRef | string | You will need to do a lookup to get the classRef SELECT * FROM Class |
* vendorId | number | vendor IdSELECT * FROM Vendor |
Request
curl -X "PUT" "https://snapbooksapi.com/api/v1/bill" \
-H 'X-Api-Key: xxx' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"transactionDate": "1/30/19",
"account": "63",
"billNumber": "BD-588444",
"description": "Estrada DOS: 11/21/18 Claim #000000038051",
"dueDate": "1/6/19",
"amount": "1600.00",
"classRef": "5000000000000111778",
"vendorId": 27
}'
Response
{
"type": "Operation",
"success": true,
"message": "",
"details": [],
"id": "145",
"docNumber": "BD-588444",
"totalAmount": "1600.06",
"balance": "1600.06",
"txnDate": "2019-01-30",
"dueDate": "2019-01-07",
"bill": {
"PayerRef": null,
"SalesTermRef": null,
"DueDate": "2019-01-07",
"RemitToAddr": null,
"ShipAddr": null,
"Balance": "1600.06",
"HomeBalance": null,
"BillEx": null,
"LessCIS": null,
"VendorRef": "59",
"APAccountRef": "33",
"TotalAmt": "1600.06",
"BillEmail": null,
"ReplyEmail": null,
"Memo": null,
"GlobalTaxCalculation": null,
"DocNumber": "BD-588444",
"TxnDate": "2019-01-30",
"DepartmentRef": null,
"CurrencyRef": "USD",
"ExchangeRate": null,
"PrivateNote": null,
"TxnStatus": null,
"LinkedTxn": null,
"Line": {
"Id": "3",
"LineNum": "1",
"Description": "Estrada DOS: 11\/21\/18 Claim #000000038051",
"Amount": "1600.06",
"LinkedTxn": null,
"DetailType": "AccountBasedExpenseLineDetail",
"PaymentLineDetail": null,
"DiscountLineDetail": null,
"TaxLineDetail": null,
"SalesItemLineDetail": null,
"DescriptionLineDetail": null,
"ItemBasedExpenseLineDetail": null,
"AccountBasedExpenseLineDetail": {
"CustomerRef": null,
"ClassRef": "5000000000000135140",
"AccountRef": "63",
"BillableStatus": "NotBillable",
"MarkupInfo": null,
"TaxAmount": null,
"TaxCodeRef": "NON",
"TaxInclusiveAmt": null,
"ExpenseDetailLineDetailEx": null
},
"DepositLineDetail": null,
"PurchaseOrderItemLineDetail": null,
"SalesOrderItemLineDetail": null,
"ItemReceiptLineDetail": null,
"JournalEntryLineDetail": null,
"GroupLineDetail": null,
"SubTotalLineDetail": null,
"TDSLineDetail": null,
"CustomField": null,
"LineEx": null
},
"TxnTaxDetail": null,
"TxnSource": null,
"TaxFormType": null,
"TaxFormNum": null,
"TransactionLocationType": null,
"Id": "145",
"SyncToken": "2",
"MetaData": {
"CreatedByRef": null,
"CreateTime": "2019-11-13T09:41:57-08:00",
"LastModifiedByRef": null,
"LastUpdatedTime": "2019-11-13T10:28:16-08:00",
"LastChangedInQB": null,
"Synchronized": null
},
"CustomField": null,
"AttachableRef": null,
"domain": null,
"status": null,
"sparse": null
}
}
Delete
Delete Bill Attributes: * required * conditionally required
Parameter | Data Type | Description |
---|---|---|
* billNumber | string | bill number you want to delete in QuickBooks Online. |
Request
curl -X "DELETE" "https://snapbooksapi.com/api/v1/bill" \
-H 'X-Api-Key: xxx' \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"billNumber": "BD-588444"
}'
Response
{
"type": "Operation",
"success": true,
"message": "",
"details": []
}
Query
Query for a Bill Attributes: * required * conditionally required
Parameter | Data Type | Description |
---|---|---|
* html url | string | You could build your own query or use this specific lookup for bills - |
Request
curl "https://snapbooksapi.com/api/v1/bill?docNumber=SO-5698" \
-H 'X-Api-Key: xxx'
Response
{
"type": "Operation",
"success": true,
"message": "",
"details": [],
"bill": {
"PayerRef": null,
"SalesTermRef": null,
"DueDate": "2019-01-06",
"RemitToAddr": null,
"ShipAddr": null,
"Balance": "1600.00",
"HomeBalance": null,
"BillEx": null,
"LessCIS": null,
"VendorRef": "58",
"APAccountRef": "33",
"TotalAmt": "1600.00",
"BillEmail": null,
"ReplyEmail": null,
"Memo": null,
"GlobalTaxCalculation": null,
"DocNumber": "BD-588444",
"TxnDate": "2019-01-30",
"DepartmentRef": null,
"CurrencyRef": "USD",
"ExchangeRate": null,
"PrivateNote": null,
"TxnStatus": null,
"LinkedTxn": null,
"Line": {
"Id": "1",
"LineNum": "1",
"Description": "Estrada DOS: 11\/21\/18 Claim #000000038051",
"Amount": "1600.00",
"LinkedTxn": null,
"DetailType": "AccountBasedExpenseLineDetail",
"PaymentLineDetail": null,
"DiscountLineDetail": null,
"TaxLineDetail": null,
"SalesItemLineDetail": null,
"DescriptionLineDetail": null,
"ItemBasedExpenseLineDetail": null,
"AccountBasedExpenseLineDetail": {
"CustomerRef": null,
"ClassRef": null,
"AccountRef": "63",
"BillableStatus": "NotBillable",
"MarkupInfo": null,
"TaxAmount": null,
"TaxCodeRef": "NON",
"TaxInclusiveAmt": null,
"ExpenseDetailLineDetailEx": null
},
"DepositLineDetail": null,
"PurchaseOrderItemLineDetail": null,
"SalesOrderItemLineDetail": null,
"ItemReceiptLineDetail": null,
"JournalEntryLineDetail": null,
"GroupLineDetail": null,
"SubTotalLineDetail": null,
"TDSLineDetail": null,
"CustomField": null,
"LineEx": null
},
"TxnTaxDetail": null,
"TxnSource": null,
"TaxFormType": null,
"TaxFormNum": null,
"TransactionLocationType": null,
"Id": "146",
"SyncToken": "0",
"MetaData": {
"CreatedByRef": null,
"CreateTime": "2019-11-13T10:52:02-08:00",
"LastModifiedByRef": null,
"LastUpdatedTime": "2019-11-13T10:52:02-08:00",
"LastChangedInQB": null,
"Synchronized": null
},
"CustomField": null,
"AttachableRef": null,
"domain": null,
"status": null,
"sparse": null
}
}
Query Payments
Query for a Bill Payments: * required * conditionally required
Parameter | Data Type | Description |
---|---|---|
* html url | string | You could build your own query or use this specific lookup for bill payments |
Request
curl "https://snapbooksapi.com/api/v1/bill/payment?id=3800" \
-H 'X-Api-Key: xxx'
Response
{
"type": "Operation",
"success": false,
"message": "",
"details": []
}