Home > OS >  Invoice API response with only 2 decimal places for field UnitAmount (Unit Price)
Invoice API response with only 2 decimal places for field UnitAmount (Unit Price)

Time:01-13

Today i noticed, that Xero Accounting API, endpoint Invoices, Get Invoice returns array with LineItems. The problem is, that API returns 2 decimal places for field UnitAmount, enter image description here but on UI we can see 3 decimal places (Unit Price) enter image description here

FUN FACT: Quantity is with 4 decimal places :)

How can i get UnitAmount with 3 decimal places?

CodePudding user response:

Can you try adding the unitdp=4 parameter in your GET call, this should override the default 2dp response

  • Related