Deep link to Xero


What are deep links?

Deep links enable an external application to create a link that directs the user to a specific resource within a specific Xero Organisation. They provide a high quality user experience for customers that are using both Xero and a connected app and need to jump between the two applications in order to complete certain tasks or view certain data.

What resources can you deep link to?

  • Invoices
  • Bills
  • Purchase Orders
  • Credit Notes
  • Contacts
  • Payments
  • Bank Transactions
  • Reports

How to create deep links

By using the Organisation ShortCode, you can construct a deep link to a resource in Xero that will reference the correct Xero Organisation, for example:

https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Contacts/View.aspx?contactID=3E776C4B-EA9E-4BB1-96BE-6B0C7A71A37F

The ShortCode for a Xero Organisation can be retrieved from the Organisation endpoint.

Examples of deep links

Note: These links will only work for you if you modify the ShortCode and other parameters to be relevant to your Demo Company or Xero Organisation.

View an invoice: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/AccountsReceivable/View.aspx?InvoiceID=1cf1a11c-a067-4a05-9c8b-06f281f7afed


View a bill: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/AccountsPayable/Edit.aspx?InvoiceID=16f93747-4794-422f-ad30-7340ca0309c0
View a purchase order: https://go.xero.com/organisationlogin/default.aspx?shortcode=!G4KH-&redirecturl=/Accounts/Payable/PurchaseOrders/View/e87d9be5-24bd-4e9b-92de-e18d0b87a7c3/
View a credit note: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/AccountsPayable/ViewCreditNote.aspx?creditNoteID=4aa20e93-ec11-441e-b5dc-1fdafdfdf06c
View a contact record: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Contacts/View.aspx?contactID=3E776C4B-EA9E-4BB1-96BE-6B0C7A71A37F
View an expense claim summary: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Expenses/ExpenseClaimSummary.aspx?expenseId=fae41464-0d0a-4767-8c52-cd3f9f9e6965
View a payment: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Bank/ViewTransaction.aspx?bankTransactionID=59fb3eb7-9884-4c75-a77c-d559a84e2e0b
View a bank transaction: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Bank/ViewTransaction.aspx?bankTransactionID=36fb9c72-aa18-4ab7-b737-3f15c1eb6c64
View a profit & loss report: https://go.xero.com/organisationlogin/default.aspx?shortcode=!NLglS&redirecturl=/Reports/report2.aspx?statement=a22c12ce-7b22-49ff-a674-1a509552f6de&reportClass=ProfitAndLoss

Invoice URL Link:

Invoices & Bills have an additional feature that enables a link to be created to an external product or source document. For integrations that create Invoices & Bills this feature enables a two way linkage between the Xero & 3rd party applications. The Invoice feature enables the Xero -> 3rd party link (see request example & image below), while a deep link can be utilised for the 3rd party -> Xero link.

deep links example

Invoice URL Link Request Example:

PUT/POST /Invoice

  <Invoices>
  <Invoice>
    <Type>ACCREC</Type>
    <Contact>
      <Name>Martin Hudson</Name>
    </Contact>
    <Date>2017-07-24T00:00:00</Date>
    <DueDate>2017-07-31T00:00:00</DueDate>
    <LineAmountTypes>Exclusive</LineAmountTypes>
    <Url>https://MyAppPortal.xero/Invoice/XYZ123</Url>
    <LineItems>
      <LineItem>
        <Description>Monthly rental for property at 56a Wilkins Avenue</Description>
        <Quantity>4.3400</Quantity>
        <UnitAmount>395.00</UnitAmount>
        <AccountCode>200</AccountCode>
      </LineItem>
    </LineItems>
  </Invoice>
</Invoices>