MoneyBird API

Introduction | Contacts | Estimates | Incoming invoices | Invoice profiles | Invoices | Products | Recurring invoices | Tax rates

Recurring templates API

This page contains all the information you need for managing recurring templates. Below you will find all the available attributes for the XML API and some examples to get you started.

Table 4. Recurring template commands
Description Method & URL
Get all recurring templates GET/api/v1.0/recurring_templates.xml
Get a recurring template GET/api/v1.0/recurring_templates/:id.xml
Create a new recurring template POST/api/v1.0/recurring_templates.xml
Update a recurring template PUT/api/v1.0/recurring_templates/:id.xml
Delete a recurring template DELETE/api/v1.0/recurring_templates/:id.xml
Table 2. Recurring template attributes
Attribute Type Required Note
active Boolean No Read-only. Default: true. Whether you want the recurring template to be active or not
contact-id Integer Yes Contact-id of existing contact
created-at Datetime No Read-only, for example: 2011-02-15T13:13:50+01:00
currency String No Default: EUR, for example: EUR, GBP or USD
discount Decimal No Default: 0.0. For example: 17.0 for 17% discount
frequency Integer Yes For example: 2 (for twice per frequency-type attribute)
frequency-type Integer Yes Values can be: 1 for weekly, 2 for monthly, 3 for quarterly, 4 for half_yearly or 5 for yearly
id Integer No Read-only, the unique id of the recurring template
invoice-profile-id Integer No Default: the id of the default document profile
last-date Date No Read-only
next-date Date No Read-only
number-of-occurences Integer No Read-only
occurences Integer No Default: 0. 0 means unlimited. The number of times the recurring template should run
send-invoice Boolean No Default: false. Whether the invoice should be send directly after creation or keep as concept
start-date Date No Default: Date of tomorrow. For example: 2011-02-28. Must be a date in the future!
template-id Integer No
total-price-excl-tax Decimal No Read-only
total-price-incl-tax Decimal No Read-only
updated-at Datetime No Read-only, for example: 2011-02-15T13:13:50+01:00
Table 3. Recurring template detail attributes
Attribute Type Required Note
amount String No For example: 1 x or 2 hours
created-at Datetime No Read-only, for example: 2011-02-15T13:13:50+01:00
description String Yes Description of invoice detail, for example: Table ABC format 140x90
id Integer No Read-only, unique id of recurring template detail
ledger-account-id Integer No For MoneyBird Plus users, you can provide a ledger-account-id
price Decimal No Default: 0.0. For example: 19.95
row-order Integer No Give a row a fixed position in table
tax-rate-id Integer Yes
total-price-excl-tax Decimal No Read-only
total-price-incl-tax Decimal No Read-only
updated-at Datetime No Read-only, for example: 2011-02-15T13:13:50+01:00

Create recurring template

POST /api/v1.0/recurring_templates.xml
Reponse code: 201


<recurring-template>
  <contact-id>1</contact-id>
  <frequency>1</frequency>
  <frequency-type>1</frequency-type>
  <start-date>2011-02-20</start-date>
  <details-attributes type="array">
    <detail>
      <amount>1x</amount>
      <description>Table size: 190x100</description>
      <price>100</price>
      <tax-rate-id>1</tax-rate-id>
    </detail>
  </details-attributes>
</recurring-template>
    

Delete or disable an existing recurring_template

DELETE /api/v1.0/recurring_templates/123.xml
Response code: 200