Repeating Invoices


Overview

URL https://api.xero.com/api.xro/2.0/RepeatingInvoices
Methods Supported GET
Description Allows you to retrieve any repeating invoice templates

GET RepeatingInvoices

Use this method to retrieve either one or many repeating invoices.

TypeSee Invoice Types
ContactSee Contacts
ScheduleSee Schedule
LineItemsSee LineItems. The LineItems collection can contain any number of individual LineItem sub-elements.
LineAmountTypesLine amounts are exclusive of tax by default if you don't specify this element. See Line Amount Types
ReferenceACCREC only - additional reference number
BrandingThemeIDSee BrandingThemes
CurrencyCodeThe currency that invoice has been raised in (see Currencies)
StatusOne of the following : DRAFT or AUTHORISED - See Invoice Status Codes
SubTotalTotal of invoice excluding taxes
TotalTaxTotal tax on invoice
TotalTotal of Invoice tax inclusive (i.e. SubTotal + TotalTax)
RepeatingInvoiceIDXero generated unique identifier for repeating invoice template
HasAttachmentsboolean to indicate if an invoice has an attachment
Elements for Schedule
PeriodInteger used with the unit e.g. 1 (every 1 week), 2 (every 2 months)
UnitOne of the following : WEEKLY or MONTHLY
DueDateInteger used with due date type e.g 20 (of following month), 31 (of current month)
DueDateType See Payment Terms
StartDateDate the first invoice of the current version of the repeating schedule was generated (changes when repeating invoice is edited)
NextScheduledDateThe calendar date of the next invoice in the schedule to be generated
EndDateInvoice end date - only returned if the template has an end date set
Elements for LineItems
DescriptionDescription needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a Description element that contains at least 1 character
QuantityLineItem Quantity
UnitAmountLineItem Unit Amount
ItemCodeSee Items
AccountCodeSee Accounts
TaxTypeUsed as an override if the default Tax Code for the selected AccountCode is not correct - see TaxTypes.
TaxAmountThe tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated TaxAmount is not correct.
LineAmountIf you wish to omit either of the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100)
TrackingOptional Tracking Category - see Tracking. Any LineItem can have a maximum of 2 TrackingCategory elements.
DiscountRatePercentage discount being applied to a line item (only supported on ACCREC invoices - ACC PAY invoices and credit notes in Xero do not support discounts

Optional parameters

RepeatingInvoiceID You can specify an individual record by appending the RepeatingInvoiceID to the url
Where Filter by an any element (see Filters)
order Order by any element returned (see Order By)

Example response retrieving RepeatingInvoices

GET https://api.xero.com/api.xro/2.0/RepeatingInvoices
<RepeatingInvoices>
  <RepeatingInvoice>
    <Contact>
      <ContactID>9b9ba9e5-e907-4b4e-8210-54d82b0aa479</ContactID>
      <Name>PowerDirect</Name>
    </Contact>
    <Status>DRAFT</Status>
    <LineAmountTypes>Inclusive</LineAmountTypes>
    <LineItems>
      <LineItem>
        <Description>Monthly electricity</Description>
        <UnitAmount>78.26</UnitAmount>
        <TaxType>INPUT2</TaxType>
        <TaxAmount>11.74</TaxAmount>
        <LineAmount>78.26</LineAmount>
        <AccountCode>445</AccountCode>
        <Quantity>1.0000</Quantity>
      </LineItem>
    </LineItems>
    <SubTotal>78.26</SubTotal>
    <TotalTax>11.74</TotalTax>
    <Total>90.00</Total>
    <CurrencyCode>NZD</CurrencyCode>
    <Schedule>
      <Period>1</Period>
      <Unit>MONTHLY</Unit>
      <DueDate>10</DueDate>
      <DueDateType>OFFOLLOWINGMONTH</DueDateType>
      <StartDate>2013-01-21T00:00:00</StartDate>
      <NextScheduledDate>2014-03-23T00:00:00</NextScheduledDate>
    </Schedule>
    <RepeatingInvoiceID>ad3550bc-1ae0-45c0-a782-48c6d2061127</RepeatingInvoiceID>
    <Type>ACCPAY</Type>
    <Reference>RPT445-1</Reference>
    <HasAttachments>false</HasAttachments>
  </RepeatingInvoice>
  .....
</RepeatingInvoices>