List all recurring invoices

GET /api/recurrings
<?xml version="1.0" encoding="UTF-8"?>
<recurrings type="array" page="1" per_page="100" total="2">
    <recurring>
        ...
    </recurring>
    <recurring>
        ...
    </recurring>
</recurrings>

You can filter the result by parameters:

GET /api/recurrings/?label=foo

Lists all recurring with “foo in the label text. Upper and lower case are ignored.
The following filter parameters are available:

ParameterDescription
client_idID of the client
contact_idID of the contact
nameThe Name of the recurring
payment_typePayment type (eg. CASH, BANK_TRANSFER, PAYPAL, …). More than one payment type could be given as a comma separated list. Theses payment types will be logically OR-connected. You can find a overview of all payment types at API documentation of payments.
cycleInterval (DAILY, WEEKLY, MONTHLY, YEARLY).
labelFree text search in label text
introFree text search in introductory text
noteFree text search in explanatory notes
tagsComma separated list of tags

Get a single recurring

GET /api/recurrings/{id}
<?xml version="1.0" encoding="UTF-8"?>
<recurring>
    <id type="integer">2</id>
    <created type="datetime">2012-03-02T16:17:41+01:00</created>
    <client_id type="integer">33234</client_id>
    <contact_id type="integer" />
    <template_id type="integer" />
    <email_template_id type="integer" />
    <currency_code>EUR</currency_code>
    <title>Invoice</title>
    <name>Monthly fee</name>
    <cycle_number>1</cycle_number>
    <cycle>MONTHLY</cycle>
    <action>EMAIL</action>
    <hour type="integer">16</hour>
    <start_date type="date">2012-03-03</start_date>
    <end_date type="date">2012-10-11</end_date>
    <last_creation_date type="date">2012-05-25</last_creation_date>
    <next_creation_date type="date">2012-06-01</next_creation_date>
    <iterations type="integer">0</iterations>
    <counter type="integer">9</counter>
    <address />
    <due_days type="integer">0</due_days>
    <discount_rate type="float">1.1</discount_rate>
    <discount_days type="integer">7</discount_days>
    <intro>We are pleased to offer you the following items into account:<</intro>
    <note>Thank you for your order!</note>
    <total_gross type="float">107.1</total_gross>
    <total_net type="float">90.0</total_net>
    <net_gross>NET</net_gross>
    <reduction>10</reduction>
    <total_gross_unreduced type="float">119.0</total_gross_unreduced>
    <total_net_unreduced type="float">100.0</total_net_unreduced>
    <quote type="float">1.0000</quote>
    <ultimo type="integer">1</ultimo>
    <label />
    <supply_date_type>SUPPLY_TEXT</supply_date_type>
    <supply_date>[Dates.month]</supply_date>
    <email_sender />
    <email_subject />
    <email_message />
    <email_filename />
    <email_bcc />
    <letter_color>0</letter_color>
    <letter_duplex>1</letter_duplex>
    <letter_paper_weight>90</letter_paper_weight>
    <payment_types />
    <offer_id>777</offer_id>
    <confirmation_id />
</recurring>

cycle can have the following values:
– DAILY
– WEEKLY
– MONTHLY
– YEARLY
action can have the following values:
– CREATE
– COMPLETE
– EMAIL
– MAIL
supply_date_type can have the following values:
– SUPPLY_DATE (supply date as date)
– DELIVERY_DATE (delivery date as date)
– SUPPLY_TEXT (supply date as free text)
– DELIVERY_TEXT (delivery date as free text)
net_gross can have the following values:
– NET
– GROSS
The accepted payment types are separated by comma. You can find a list of all payment types at payments documentation.
Recurring items can be accessed separately.

Create a recurring

POST /api/recurrings

Creates a recurring

XML elementDescriptionTypeDefault valueMandatory
client_idID of the clientINTyes
contact_idID of the contactINT
template_idID of the templateINT
email_template_idID of the email templateINT
titleDocument titleALNUM
addressthe addressALNUMPass an empty value to use the current customer address.
supply_datesupply/delivery dateMIXED (DATE/ALNUM)
supply_date_typetype of supply/delivery dateALNUM (“SUPPLY_DATE”, “DELIVERY_DATE”, “SUPPLY_TEXT”, “DELIVERY_TEXT”)
due_daysDue daysINTdue days taken from the settings
discount_rateCash discountFLOATValue from the settings
discount_daysCash discount daysINTValue from the settings
nameName of the recurringALNUM
labelLabel text to describe the projectALNUM
introIntroductory textALNUMDefault value taken from the settings
noteExplanatory notesALNUMdefault value taken from the settings
reductionReduction (absolute or percent: 10/10%)ALNUM
currency_codeCurrencyISO currency codeDefault currency
net_grossPrice basis (gross or net prices)ALNUM (“NET”, “GROSS”)Default value taken from the settings
quoteCurrency quote (for conversion into standard currency)FLOAT1.0000
payment_typesList (separated by comma) of all accepted payment types.FLOATDefault value taken from the settings
actionAction to be executed (CREATE, COMPLETE, EMAIL, MAIL)ALNUMCREATE
cycle_numberNumber of intervals. For example, 3 for “every 3 months”INT1
cycleInterval (DAILY, WEEKLY, MONTHLY, YEARLY)ALNUMMONTHLY
hourTime of Day (hour)INT2
start_dateStart dateDATEtomorrow
end_dateEnd dateDATE
next_creation_dateDate of the next creationDATEstart_date
email_senderSender when sending e-mail. If you pass an empty value, the sender will be used from the settings.ALNUM
email_subjectSubject when sending e-mail. If you pass an empty value, the subject will be used from the settings.ALNUM
email_messageMessage text when sending e-mail. If you pass an empty value, the message will be used from the settings.ALNUM
email_filenameFilename of the invoice when sending e-mail. If you pass an empty value, the filename will be used from the settings.ALNUM
email_bccSpecifies whether to set the sender in BCC.BOOL
letter_colorDetermines whether to use color printing.BOOL0
letter_duplexDetermines whether to use duplex printing.BOOL1
letter_paper_weightDetermines the paper weight in grams. Possible values are 80 or 90.INT90
offer_idThe ID of the estimate, if the recurring was created from an estimate.INT
confirmation_idThe ID of the confirmation, if the recurring was created from a confirmation.INT
free_text_idThe ID of the free text to set title, label, intro and note.INT

The remaining properties of the account are automatically calculated.
Recurring items (recurring-items) can be specified directly at creation. Please find a documentation of the XML elements at Create recurring items, but the XML element recurring_id need not be specified with.

<recurring>
    <client_id>1</client_id>
    <start_date>2011-11-18</start_date>
    <note>Thank you for your order</note>
    <recurring-items>
        <recurring-item>
            <unit>Piece</unit>
            <unit_price>1.23</unit_price>
            <quantity>1.5</quantity>
            <title>Model</title>
        </recurring-item>
        <recurring-item>
             <unit>hour</unit>
            <unit_price>90</unit_price>
            <quantity>8</quantity>
            <title>Work</title>
        </recurring-item>
    </recurring-items>
</recurring>
<?xml version="1.0" encoding="UTF-8"?>
<recurring>
    <id type="integer">1234</id>
    <client_id type="integer">1</client_id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <start_date type="date">2011-11-18</start_date>
    ...
</recurring>

Edit recurring

PUT /api/recurrings/{id}

Updates a recurring with the given parameters.
Recurring items could not be edited at the recurring. Please use the appropriate resource instead.

<recurring>
    <name>Monthly fee</name>
</recurring>

Delete recurring

DELETE /api/recurrings/{id}

Deletes a recurring with all items.