Skip to content

Conversation

@maxwellyoung
Copy link

@maxwellyoung maxwellyoung commented Jan 19, 2026

Summary

Fixes #105 - When updating an invoice, the deep link URL was always using /invoicing/view/ regardless of the invoice type. For bills (ACCPAY invoices), this URL does not work correctly in Xero's web interface.

The fix: Added the same type-checking logic that already exists in create-invoice.tool.ts to update-invoice.tool.ts:

  • Sales invoices (ACCREC) → DeepLinkType.INVOICE/invoicing/view/
  • Bills (ACCPAY) → DeepLinkType.BILL → correct bill URL

Changes

  • Added Invoice import from xero-node
  • Modified deep link generation to check invoice.type and use DeepLinkType.BILL for ACCPAY invoices

Test plan

  • Build passes (npm run build)
  • Lint passes (npm run lint)
  • Manual test: Update an ACCPAY invoice and verify the returned deep link uses the bills path

When updating an invoice, the deep link URL was always using /invoicing/view/
regardless of the invoice type. For bills (ACCPAY invoices), this URL doesn't
work correctly in Xero's web interface.

This fix adds the same type-checking logic that already exists in the create
invoice tool: bills (ACCPAY) now use DeepLinkType.BILL which generates the
correct /bills/view/ URL path.

Fixes XeroAPI#105
@maxwellyoung maxwellyoung force-pushed the fix/bill-deeplink-url-105 branch from 8bd68da to 1d43461 Compare January 20, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Incorrect URL construction for bills (ACCPAY invoices)

1 participant