Question about API format

Question about API format

Hi,

I am trying to write deluge to fix some bug that without Tax/Discount due to API V2.0.
But it is strange that error will be pop up in some record(not all), could you please have a look for my coding?