Skip to content

Instantly share code, notes, and snippets.

@cjgratacos
Created June 30, 2020 18:40
Show Gist options
  • Save cjgratacos/c84663159d7ae8ce1c6e4a6f9fe16b85 to your computer and use it in GitHub Desktop.
Save cjgratacos/c84663159d7ae8ce1c6e4a6f9fe16b85 to your computer and use it in GitHub Desktop.

SANDBOX

Notes

For sandbox the tax code with ID 19 is a hybrid tax.

Test #1

  • Account Type: Sandbox
  • Request Type: Invoice Sparse Update
  • Before request data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "InvoiceLink": "https://developer.intuit.com/comingSoonview/7fb94b30d1fb43c5a7f422837605961dd6f837fc8bf54243a9eabe186755afec3a50c782abef4d6c89ac86909260b286?locale=en_US&cta=v3invoicelink",
  "domain": "QBO",
  "sparse": false,
  "Id": "49",
  "SyncToken": "7",
  "MetaData": {
   "CreateTime": "2019-09-05T11:43:20-07:00",
   "LastUpdatedTime": "2020-06-30T09:43:05-07:00"
  },
  "CustomField": [
   {
    "DefinitionId": "1",
    "Name": "Crew #",
    "Type": "StringType"
   }
  ],
  "DocNumber": "1015",
  "TxnDate": "2019-09-05",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [
   {
    "TxnId": "48",
    "TxnType": "Estimate"
   }
  ],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Description": "Custom Design",
    "Amount": 300,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "4",
      "name": "Design"
     },
     "UnitPrice": 75,
     "Qty": 4,
     "ItemAccountRef": {
      "value": "82",
      "name": "Design income"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Installation of landscape design",
    "Amount": 250,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "7",
      "name": "Installation"
     },
     "UnitPrice": 50,
     "Qty": 5,
     "ItemAccountRef": {
      "value": "52",
      "name": "Landscaping Services:Labor:Installation"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "3",
    "LineNum": 3,
    "Description": "Rock Fountain",
    "Amount": 275,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "5",
      "name": "Rock Fountain"
     },
     "UnitPrice": 275,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "48",
      "name": "Landscaping Services:Job Materials:Fountains and Garden Lighting"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990101-V1-00020000"
     }
    }
   },
   {
    "Id": "4",
    "LineNum": 4,
    "Description": "Garden Rocks",
    "Amount": 180,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "13",
      "name": "Rocks"
     },
     "UnitPrice": 22.5,
     "Qty": 8,
     "ItemAccountRef": {
      "value": "48",
      "name": "Landscaping Services:Job Materials:Fountains and Garden Lighting"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "6",
    "LineNum": 5,
    "Amount": 0,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "482",
      "name": "Woioty"
     },
     "UnitPrice": 0,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "106",
      "name": "Job Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "10",
    "LineNum": 6,
    "Description": "This is a test",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Id": "12",
    "LineNum": 7,
    "Description": "This is a test 2",
    "Amount": 10,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "1",
      "name": "Services"
     },
     "UnitPrice": 10,
     "ItemAccountRef": {
      "value": "1",
      "name": "New Services"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Amount": 1015,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   },
   {
    "Amount": 50.75,
    "DetailType": "DiscountLineDetail",
    "DiscountLineDetail": {
     "PercentBased": true,
     "DiscountPercent": 5,
     "DiscountAccountRef": {
      "value": "86",
      "name": "Discounts given"
     }
    }
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "4"
   },
   "TotalTax": 0,
   "TaxLine": [
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "7"
      },
      "PercentBased": true,
      "TaxPercent": 0.5,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "6"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 6.25,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 0
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "18",
   "name": "Paulsen Medical Supplies"
  },
  "CustomerMemo": {
   "value": "Thank you for your business and have a great day!"
  },
  "BillAddr": {
   "Id": "18",
   "Line1": "900 Main St.",
   "City": "Middlefield",
   "CountrySubDivisionCode": "CA",
   "PostalCode": "94303",
   "Lat": "37.445013",
   "Long": "-122.1391443"
  },
  "ShipAddr": {
   "Id": "19",
   "Line1": "38921 S. Boise Ave",
   "City": "Middlefield",
   "CountrySubDivisionCode": "CA",
   "PostalCode": "94304",
   "Lat": "37.3989376",
   "Long": "-122.1443935"
  },
  "FreeFormAddress": true,
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2019-10-05",
  "TotalAmt": 964.25,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NotSet",
  "EmailStatus": "NotSet",
  "BillEmail": {
   "Address": "Medical@intuit.com"
  },
  "Balance": 964.25,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T09:49:19.510-07:00"
}
  • Sparse update:
{
"sparse": true,
"Id": "49",
"SyncToken": "7",
"TxnTaxDetail": {
"TxnTaxCodeRef": {
"value": "19"
}
}
}
  • Response data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "InvoiceLink": "https://developer.intuit.com/comingSoonview/7fb94b30d1fb43c5a7f422837605961dd6f837fc8bf54243a9eabe186755afec3a50c782abef4d6c89ac86909260b286?locale=en_US&cta=v3invoicelink",
  "domain": "QBO",
  "sparse": false,
  "Id": "49",
  "SyncToken": "8",
  "MetaData": {
   "CreateTime": "2019-09-05T11:43:20-07:00",
   "LastUpdatedTime": "2020-06-30T09:50:49-07:00"
  },
  "CustomField": [
   {
    "DefinitionId": "1",
    "Name": "Crew #",
    "Type": "StringType"
   }
  ],
  "DocNumber": "1015",
  "TxnDate": "2019-09-05",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [
   {
    "TxnId": "48",
    "TxnType": "Estimate"
   }
  ],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Description": "Custom Design",
    "Amount": 300,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "4",
      "name": "Design"
     },
     "UnitPrice": 75,
     "Qty": 4,
     "ItemAccountRef": {
      "value": "82",
      "name": "Design income"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Installation of landscape design",
    "Amount": 250,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "7",
      "name": "Installation"
     },
     "UnitPrice": 50,
     "Qty": 5,
     "ItemAccountRef": {
      "value": "52",
      "name": "Landscaping Services:Labor:Installation"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "3",
    "LineNum": 3,
    "Description": "Rock Fountain",
    "Amount": 275,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "5",
      "name": "Rock Fountain"
     },
     "UnitPrice": 275,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "48",
      "name": "Landscaping Services:Job Materials:Fountains and Garden Lighting"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990101-V1-00020000"
     }
    }
   },
   {
    "Id": "4",
    "LineNum": 4,
    "Description": "Garden Rocks",
    "Amount": 180,
    "LinkedTxn": [
     {
      "TxnId": "48",
      "TxnType": "Estimate"
     }
    ],
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "13",
      "name": "Rocks"
     },
     "UnitPrice": 22.5,
     "Qty": 8,
     "ItemAccountRef": {
      "value": "48",
      "name": "Landscaping Services:Job Materials:Fountains and Garden Lighting"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Id": "6",
    "LineNum": 5,
    "Amount": 0,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "482",
      "name": "Woioty"
     },
     "UnitPrice": 0,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "106",
      "name": "Job Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "10",
    "LineNum": 6,
    "Description": "This is a test",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Id": "12",
    "LineNum": 7,
    "Description": "This is a test 2",
    "Amount": 10,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "1",
      "name": "Services"
     },
     "UnitPrice": 10,
     "ItemAccountRef": {
      "value": "1",
      "name": "New Services"
     },
     "TaxCodeRef": {
      "value": "NON"
     },
     "TaxClassificationRef": {
      "value": "EUC-99990201-V1-00020000"
     }
    }
   },
   {
    "Amount": 1015,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   },
   {
    "Amount": 50.75,
    "DetailType": "DiscountLineDetail",
    "DiscountLineDetail": {
     "PercentBased": true,
     "DiscountPercent": 5,
     "DiscountAccountRef": {
      "value": "86",
      "name": "Discounts given"
     }
    }
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "4"
   },
   "TotalTax": 0,
   "TaxLine": [
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "7"
      },
      "PercentBased": true,
      "TaxPercent": 0.5,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "6"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 6.25,
      "NetAmountTaxable": 0
     }
    },
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 0
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "18",
   "name": "Paulsen Medical Supplies"
  },
  "CustomerMemo": {
   "value": "Thank you for your business and have a great day!"
  },
  "BillAddr": {
   "Id": "18",
   "Line1": "900 Main St.",
   "City": "Middlefield",
   "CountrySubDivisionCode": "CA",
   "PostalCode": "94303",
   "Lat": "37.445013",
   "Long": "-122.1391443"
  },
  "ShipAddr": {
   "Id": "19",
   "Line1": "38921 S. Boise Ave",
   "City": "Middlefield",
   "CountrySubDivisionCode": "CA",
   "PostalCode": "94304",
   "Lat": "37.3989376",
   "Long": "-122.1443935"
  },
  "FreeFormAddress": true,
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2019-10-05",
  "TotalAmt": 964.25,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NotSet",
  "EmailStatus": "NotSet",
  "BillEmail": {
   "Address": "Medical@intuit.com"
  },
  "Balance": 964.25,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T09:50:48.316-07:00"
}
  • Request intuit_tid:
{"intuit_tid": "1-5efb6d68-0c5180dcc10a7510cf69b3ac"}

Test #2

  • Account Type: Sandbox
  • Realm ID:
  • Request Type: Invoice Full Update
  • Before request data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "310",
  "SyncToken": "1",
  "MetaData": {
   "CreateTime": "2020-06-24T05:16:04-07:00",
   "LastUpdatedTime": "2020-06-24T05:16:05-07:00"
  },
  "CustomField": [
   {
    "DefinitionId": "1",
    "Name": "Crew #",
    "Type": "StringType"
   }
  ],
  "DocNumber": "I-16090-24",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [
   {
    "TxnId": "311",
    "TxnType": "Payment"
   }
  ],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Amount": 20,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "511",
      "name": "dddddd_all-parts"
     },
     "UnitPrice": 20,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "106",
      "name": "Job Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Subtotal: $20.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Id": "3",
    "LineNum": 3,
    "Description": "Item of type NON_INVENTORY with name This is a test 0022",
    "Amount": 50,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "510",
      "name": "This is a test 0022"
     },
     "UnitPrice": 50,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "85",
      "name": "Billable Expense Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "4",
    "LineNum": 4,
    "Description": "Subtotal: $50.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 70,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "11"
   },
   "TotalTax": 8.4,
   "TaxReviewStatus": "AST_TAX_OVERRIDE",
   "TaxLine": [
    {
     "Amount": 2,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "25"
      },
      "PercentBased": true,
      "TaxPercent": 2.25,
      "NetAmountTaxable": 70
     }
    },
    {
     "Amount": 5.52,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 6.25,
      "NetAmountTaxable": 70
     }
    },
    {
     "Amount": 0.88,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 70
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "69",
   "name": "Arianna Grande"
  },
  "BillAddr": {
   "Id": "527",
   "Line1": "Arianna Grande",
   "Line2": "235 Honeymoon Ave",
   "Line3": "Los Angeles, CA 28227"
  },
  "ShipAddr": {
   "Id": "528",
   "Line1": "Arianna Grande",
   "Line2": "235 Honeymoon Ave",
   "Line3": "Los Angeles, CA 28227"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "529",
   "Line1": "123 Sierra Way",
   "Line2": "San Pablo, CA  87999"
  },
  "SalesTermRef": {
   "value": "4"
  },
  "DueDate": "2020-08-23",
  "TotalAmt": 78.4,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 28.4,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T09:58:31.623-07:00"
}
  • Full update:
{
"AllowIPNPayment": false,
"AllowOnlinePayment": false,
"AllowOnlineCreditCardPayment": false,
"AllowOnlineACHPayment": false,
"domain": "QBO",
"sparse": false,
"Id": "310",
"SyncToken": "1",
"MetaData": {
"CreateTime": "2020-06-24T05:16:04-07:00",
"LastUpdatedTime": "2020-06-24T05:16:05-07:00"
},
"CustomField": [
{
"DefinitionId": "1",
"Name": "Crew #",
"Type": "StringType"
}
],
"DocNumber": "I-16090-24",
"TxnDate": "2020-06-24",
"CurrencyRef": {
"value": "USD",
"name": "United States Dollar"
},
"LinkedTxn": [
{
"TxnId": "311",
"TxnType": "Payment"
}
],
"Line": [
{
"Amount": 20,
"DetailType": "SalesItemLineDetail",
"SalesItemLineDetail": {
"ItemRef": {
"value": "511",
"name": "dddddd_all-parts"
},
"UnitPrice": 20,
"Qty": 1,
"ItemAccountRef": {
"value": "106",
"name": "Job Income"
},
"TaxCodeRef": {
"value": "TAX"
},
"TaxClassificationRef": {
"value": "EUC-09020802-V1-00120000"
}
}
},
{
"Description": "Subtotal: $20.00",
"DetailType": "DescriptionOnly",
"DescriptionLineDetail": {}
},
{
"Description": "Item of type NON_INVENTORY with name This is a test 0022",
"Amount": 50,
"DetailType": "SalesItemLineDetail",
"SalesItemLineDetail": {
"ItemRef": {
"value": "510",
"name": "This is a test 0022"
},
"UnitPrice": 50,
"Qty": 1,
"ItemAccountRef": {
"value": "85",
"name": "Billable Expense Income"
},
"TaxCodeRef": {
"value": "TAX"
},
"TaxClassificationRef": {
"value": "EUC-09020802-V1-00120000"
}
}
},
{
"Description": "Subtotal: $50.00",
"DetailType": "DescriptionOnly",
"DescriptionLineDetail": {}
},
{
"Amount": 70,
"DetailType": "SubTotalLineDetail",
"SubTotalLineDetail": {}
}
],
"TxnTaxDetail": {
"TxnTaxCodeRef": {
"value": "19"
} 
},
"CustomerRef": {
"value": "69",
"name": "Arianna Grande"
},
"BillAddr": {
"Id": "527",
"Line1": "Arianna Grande",
"Line2": "235 Honeymoon Ave",
"Line3": "Los Angeles, CA 28227"
},
"ShipAddr": {
"Id": "528",
"Line1": "Arianna Grande",
"Line2": "235 Honeymoon Ave",
"Line3": "Los Angeles, CA 28227"
},
"FreeFormAddress": true,
"ShipFromAddr": {
"Id": "529",
"Line1": "123 Sierra Way",
"Line2": "San Pablo, CA  87999"
},
"SalesTermRef": {
"value": "4"
},
"DueDate": "2020-08-23",
"TotalAmt": 78.4,
"ApplyTaxAfterDiscount": false,
"PrintStatus": "NeedToPrint",
"EmailStatus": "NotSet",
"Balance": 28.4,
"TaxExemptionRef": {}
}
  • Response data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "310",
  "SyncToken": "2",
  "MetaData": {
   "CreateTime": "2020-06-24T05:16:04-07:00",
   "LastUpdatedTime": "2020-06-30T10:02:39-07:00"
  },
  "CustomField": [
   {
    "DefinitionId": "1",
    "Name": "Crew #",
    "Type": "StringType"
   }
  ],
  "DocNumber": "I-16090-24",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [
   {
    "TxnId": "311",
    "TxnType": "Payment"
   }
  ],
  "Line": [
   {
    "Id": "8",
    "LineNum": 1,
    "Amount": 20,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "511",
      "name": "dddddd_all-parts"
     },
     "UnitPrice": 20,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "106",
      "name": "Job Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "9",
    "LineNum": 2,
    "Description": "Subtotal: $20.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Id": "10",
    "LineNum": 3,
    "Description": "Item of type NON_INVENTORY with name This is a test 0022",
    "Amount": 50,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "510",
      "name": "This is a test 0022"
     },
     "UnitPrice": 50,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "85",
      "name": "Billable Expense Income"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "11",
    "LineNum": 4,
    "Description": "Subtotal: $50.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 70,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "11"
   },
   "TotalTax": 6.65,
   "TaxLine": [
    {
     "Amount": 1.58,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "25"
      },
      "PercentBased": true,
      "TaxPercent": 2.25,
      "NetAmountTaxable": 70
     }
    },
    {
     "Amount": 4.37,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 6.25,
      "NetAmountTaxable": 70
     }
    },
    {
     "Amount": 0.7,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 1,
      "NetAmountTaxable": 70
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "69",
   "name": "Arianna Grande"
  },
  "BillAddr": {
   "Id": "527",
   "Line1": "Arianna Grande",
   "Line2": "235 Honeymoon Ave",
   "Line3": "Los Angeles, CA 28227"
  },
  "ShipAddr": {
   "Id": "528",
   "Line1": "Arianna Grande",
   "Line2": "235 Honeymoon Ave",
   "Line3": "Los Angeles, CA 28227"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "601",
   "Line1": "123 Sierra Way",
   "Line2": "San Pablo, CA 87999"
  },
  "SalesTermRef": {
   "value": "4"
  },
  "DueDate": "2020-08-23",
  "TotalAmt": 76.65,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 26.65,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T10:02:39.326-07:00"
}
  • Request intuit_tid:
{"intuit_tid": "1-5efb702f-9c6bfbcc867a0f38d18288d8"}

PRODUCTION

Notes

On Production the tax code with ID 13 is a hybrid tax.

Test #1

  • Account Type: Production (Personal Test Account)
  • Request Type: Invoice Sparse Update
  • Before request data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "315",
  "SyncToken": "1",
  "MetaData": {
   "CreateTime": "2020-06-24T12:46:04-07:00",
   "LastUpdatedTime": "2020-06-30T10:34:13-07:00"
  },
  "CustomField": [],
  "DocNumber": "I-69-9",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Amount": 100,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "379",
      "name": "CLI 3"
     },
     "UnitPrice": 100,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "184",
      "name": "4/3.2 account"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Subtotal: $100.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 100,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "3"
   },
   "TotalTax": 7.25,
   "TaxLine": [
    {
     "Amount": 4.75,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "3"
      },
      "PercentBased": true,
      "TaxPercent": 4.75,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 2,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 2,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 0.5,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 0.5,
      "NetAmountTaxable": 100
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "48",
   "name": "Best Buy, Inc."
  },
  "BillAddr": {
   "Id": "1126",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "ShipAddr": {
   "Id": "1127",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "1128",
   "Line1": "8000 Corporate Center Dr",
   "Line2": "Charlotte, NC  28226 US"
  },
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2020-07-24",
  "TotalAmt": 107.25,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 107.25,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T10:34:12.985-07:00"
}
  • Sparse update:
{
"sparse": true,
"Id": "315",
"SyncToken": "1",
"TxnTaxDetail": {
"TxnTaxCodeRef": {
"value": "13"
}
}
}
  • Response data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "315",
  "SyncToken": "2",
  "MetaData": {
   "CreateTime": "2020-06-24T12:46:04-07:00",
   "LastUpdatedTime": "2020-06-30T10:35:25-07:00"
  },
  "CustomField": [],
  "DocNumber": "I-69-9",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Amount": 100,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "379",
      "name": "CLI 3"
     },
     "UnitPrice": 100,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "184",
      "name": "4/3.2 account"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Subtotal: $100.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 100,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "3"
   },
   "TotalTax": 7.25,
   "TaxLine": [
    {
     "Amount": 4.75,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "3"
      },
      "PercentBased": true,
      "TaxPercent": 4.75,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 2,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 2,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 0.5,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 0.5,
      "NetAmountTaxable": 100
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "48",
   "name": "Best Buy, Inc."
  },
  "BillAddr": {
   "Id": "1126",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "ShipAddr": {
   "Id": "1127",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "1128",
   "Line1": "8000 Corporate Center Dr",
   "Line2": "Charlotte, NC  28226 US"
  },
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2020-07-24",
  "TotalAmt": 107.25,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 107.25,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T10:35:25.022-07:00"
}
  • Request intuit_tid:
{"intuit_tid": "1-5efb77dc-5ae707bc655cc488735bceb8"}

Test #2

  • Account Type: Production (Personal Test Account)
  • Request Type: Invoice Full Update
  • Before request data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "315",
  "SyncToken": "2",
  "MetaData": {
   "CreateTime": "2020-06-24T12:46:04-07:00",
   "LastUpdatedTime": "2020-06-30T10:35:25-07:00"
  },
  "CustomField": [],
  "DocNumber": "I-69-9",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [],
  "Line": [
   {
    "Id": "1",
    "LineNum": 1,
    "Amount": 100,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "379",
      "name": "CLI 3"
     },
     "UnitPrice": 100,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "184",
      "name": "4/3.2 account"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "2",
    "LineNum": 2,
    "Description": "Subtotal: $100.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 100,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "3"
   },
   "TotalTax": 7.25,
   "TaxLine": [
    {
     "Amount": 4.75,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "3"
      },
      "PercentBased": true,
      "TaxPercent": 4.75,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 2,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "4"
      },
      "PercentBased": true,
      "TaxPercent": 2,
      "NetAmountTaxable": 100
     }
    },
    {
     "Amount": 0.5,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "5"
      },
      "PercentBased": true,
      "TaxPercent": 0.5,
      "NetAmountTaxable": 100
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "48",
   "name": "Best Buy, Inc."
  },
  "BillAddr": {
   "Id": "1126",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "ShipAddr": {
   "Id": "1127",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "1128",
   "Line1": "8000 Corporate Center Dr",
   "Line2": "Charlotte, NC  28226 US"
  },
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2020-07-24",
  "TotalAmt": 107.25,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 107.25,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T10:36:48.089-07:00"
}
  • Full update:
{
    "AllowIPNPayment": false,
    "AllowOnlinePayment": false,
    "AllowOnlineCreditCardPayment": false,
    "AllowOnlineACHPayment": false,
    "domain": "QBO",
    "sparse": false,
    "Id": "315",
    "SyncToken": "2",
    "MetaData": {
      "CreateTime": "2020-06-24T12:46:04-07:00",
      "LastUpdatedTime": "2020-06-30T10:35:25-07:00"
    },
    "CustomField": [],
    "DocNumber": "I-69-9",
    "TxnDate": "2020-06-24",
    "CurrencyRef": {
      "value": "USD",
      "name": "United States Dollar"
    },
    "LinkedTxn": [],
    "Line": [
      {
        "Amount": 100,
        "DetailType": "SalesItemLineDetail",
        "SalesItemLineDetail": {
          "ItemRef": {
            "value": "379",
            "name": "CLI 3"
          },
          "UnitPrice": 100,
          "Qty": 1,
          "ItemAccountRef": {
            "value": "184",
            "name": "4/3.2 account"
          },
          "TaxCodeRef": {
            "value": "TAX"
          },
          "TaxClassificationRef": {
            "value": "EUC-09020802-V1-00120000"
          }
        }
      },
      {
        "Description": "Subtotal: $100.00",
        "DetailType": "DescriptionOnly",
        "DescriptionLineDetail": {}
      },
      {
        "Amount": 100,
        "DetailType": "SubTotalLineDetail",
        "SubTotalLineDetail": {}
      }
    ],
    "TxnTaxDetail": {
      "TxnTaxCodeRef": {
        "value": "13"
      }
    },
    "CustomerRef": {
      "value": "48",
      "name": "Best Buy, Inc."
    },
    "BillAddr": {
      "Id": "1126",
      "Line1": "Best Buy, Inc.",
      "Line2": "505 S 58th St",
      "Line3": "Tacoma, WA 98408"
    },
    "ShipAddr": {
      "Id": "1127",
      "Line1": "Best Buy, Inc.",
      "Line2": "505 S 58th St",
      "Line3": "Tacoma, WA 98408"
    },
    "FreeFormAddress": true,
    "ShipFromAddr": {
      "Id": "1128",
      "Line1": "8000 Corporate Center Dr",
      "Line2": "Charlotte, NC  28226 US"
    },
    "SalesTermRef": {
      "value": "3"
    },
    "DueDate": "2020-07-24",
    "TotalAmt": 107.25,
    "ApplyTaxAfterDiscount": false,
    "PrintStatus": "NeedToPrint",
    "EmailStatus": "NotSet",
    "Balance": 107.25,
    "TaxExemptionRef": {}
  }
  • Response data:
{
 "Invoice": {
  "AllowIPNPayment": false,
  "AllowOnlinePayment": false,
  "AllowOnlineCreditCardPayment": false,
  "AllowOnlineACHPayment": false,
  "domain": "QBO",
  "sparse": false,
  "Id": "315",
  "SyncToken": "3",
  "MetaData": {
   "CreateTime": "2020-06-24T12:46:04-07:00",
   "LastUpdatedTime": "2020-06-30T10:38:52-07:00"
  },
  "CustomField": [],
  "DocNumber": "I-69-9",
  "TxnDate": "2020-06-24",
  "CurrencyRef": {
   "value": "USD",
   "name": "United States Dollar"
  },
  "LinkedTxn": [],
  "Line": [
   {
    "Id": "7",
    "LineNum": 1,
    "Amount": 100,
    "DetailType": "SalesItemLineDetail",
    "SalesItemLineDetail": {
     "ItemRef": {
      "value": "379",
      "name": "CLI 3"
     },
     "UnitPrice": 100,
     "Qty": 1,
     "ItemAccountRef": {
      "value": "184",
      "name": "4/3.2 account"
     },
     "TaxCodeRef": {
      "value": "TAX"
     },
     "TaxClassificationRef": {
      "value": "EUC-09020802-V1-00120000"
     }
    }
   },
   {
    "Id": "8",
    "LineNum": 2,
    "Description": "Subtotal: $100.00",
    "DetailType": "DescriptionOnly",
    "DescriptionLineDetail": {}
   },
   {
    "Amount": 100,
    "DetailType": "SubTotalLineDetail",
    "SubTotalLineDetail": {}
   }
  ],
  "TxnTaxDetail": {
   "TxnTaxCodeRef": {
    "value": "2"
   },
   "TotalTax": 0,
   "TaxLine": [
    {
     "Amount": 0,
     "DetailType": "TaxLineDetail",
     "TaxLineDetail": {
      "TaxRateRef": {
       "value": "2"
      },
      "PercentBased": true,
      "TaxPercent": 0,
      "NetAmountTaxable": 0
     }
    }
   ]
  },
  "CustomerRef": {
   "value": "48",
   "name": "Best Buy, Inc."
  },
  "BillAddr": {
   "Id": "1126",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "ShipAddr": {
   "Id": "1127",
   "Line1": "Best Buy, Inc.",
   "Line2": "505 S 58th St",
   "Line3": "Tacoma, WA 98408"
  },
  "FreeFormAddress": true,
  "ShipFromAddr": {
   "Id": "1176",
   "Line1": "8000 Corporate Center Dr",
   "Line2": "Charlotte, NC 28226 US"
  },
  "SalesTermRef": {
   "value": "3"
  },
  "DueDate": "2020-07-24",
  "TotalAmt": 100,
  "ApplyTaxAfterDiscount": false,
  "PrintStatus": "NeedToPrint",
  "EmailStatus": "NotSet",
  "Balance": 100,
  "TaxExemptionRef": {}
 },
 "time": "2020-06-30T10:38:52.134-07:00"
}
  • Request intuit_tid:
{"intuit_tid": "1-5efb78ab-782bbc58cc909a4d59b682dc"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment