XeroAPI / Xero-OpenAPI

An OpenAPI description of the Xero API
https://developer.xero.com
MIT License
105 stars 125 forks source link

LineItems: DiscountRate returned but DiscountAmount does not depending on invoice call query #592

Open timwiel opened 6 months ago

timwiel commented 6 months ago

The lineitems field DiscountAmount should be returned in any response that also returns DiscountRate as they both apply equally to a lineitem.

Current Behavior

When a call is made to a single invoice the lineitem fields DiscountRate and DiscountAmount are both returned in the lineitems object HOWEVER if a call is made that retrieves a summary then only the DiscountRate is returned.

The API documentation states (see https://developer.xero.com/documentation/api/accounting/invoices#get-invoices) that when multiple invoices are returned then either no lineitems are returned OR a summary is returned depending on the invoice query.

I have verified this behaviour using the following:

Expected Behavior

The API should return lineitems with DiscountRate and DiscountAmount as documented for a call that returns multiple invoices if the lineitems field is populated

OR the API documentation needs to be updated with a specific breakdown of what lineitem fields are returned in a summarised response ... which would be all fields EXCEPT validationerrors and DiscountAmount which seems a bit strange why only those two would not be returned.

github-actions[bot] commented 6 months ago

PETOSS-429

github-actions[bot] commented 6 months ago

Thanks for raising an issue, a ticket has been created to track your request