allow ItemID to be specified when adding line items
It seems to be possible to supply the ItemCode but not the ItemID. I guess the ID is unique for each item? It would be really great in my opinion if the API could be consistent and the ID field was always used to specify a join whenever you are creating or updating anything.
Consider the following use case:
A web app with integrations to xero to do all of the invoicing, and inventory price management. Contacts (users), orders (invoices) and products (items) are stored in the app, but also created in xero. The app then stores the xero id for each one and uses this when it makes calls to the xero api. When a user (contact) creates an order (invoice) it builds up an xml request with the invoice data, contact id and line items containing item ids and posts it to xero.
I understand it would be possible for the app to just store the ItemCode instead for products. However, if someone working with xero was to change one of the item codes then it would break the entire integration.
It would also make things a bit predictable if specifying an ID always just worked™ for relations in any of the API requests.
You are absolutely right Matt.