Update Prepayments and Overpayments via API
We can currently create Prepayment Invoices using the Bank Transaction endpoint (all of this also post applies to Overpayment Invoices too). This returns a list of information about the created bank transactions including Prepayment (or Overpayment) IDs.
The Invoice Number is autogenerated by Xero, and we're only able to change it using the UI.
There are are Prepayment and Overpayment endpoints in the API, but these only allow us to GET one (or multiple) invoices, and PUT allocations for an invoice.
It would be great to see either:
- A POST method on the Prepayment and Overpayment endpoints (this would allow us to map over the returned IDs from the Bank Transaction response and update the Invoice Number); or
- Have the ability to specify an Invoice Number when creating a Prepayment or Overpayment Invoice via the Bank Transaction endpoint (this may be the more efficient method, as it prevents incrementing the auto-number of the invoice)
Most likely, the more generic POST endpoint for both Prepayment and Overpayment endpoints would be more appropriate to implement as it seems it would benefit a number of other users who have left feedback.
Until then, our accounting team will be updating the invoice number manually for every Prepayment we create.
-
Maga commented
It would be beneficial if payment date, reference and amount fields can be updated via the API.