API - Email invoice or reminder

Send out invoices or reminders as PDF


Resource:
/acumulus/stable/invoices/invoice_mail.php
Since API:
Available for authenticated:
API invoerder
Available for authenticated:
API gebruiker
Available for authenticated:
API beheerder
Communication:
Basic submit, including below structure


Submit

<?xml version="1.0" encoding="UTF-8"?>
<myxml>
     ...
    <token>01234567890abcdef01234567890abcd</token>
    <invoicetype></invoicetype>
    <invoicenotes></invoicenotes>
    <emailaspdf>
        <emailto></emailto>
        <emailbcc></emailbcc>
        <emailfrom></emailfrom>
        <subject></subject>
        <message></message>
        <confirmreading></confirmreading>
        <ubl></ubl>
    </emailaspdf>
    <docids>
        <docid></docid>
        <docid></docid>
        ...
    </docids>
</myxml>

token Mandatory
Unique 32-character identifier(hash) for the invoice.

invoicetype non mandatory

Option
Description
0
Regular Invoice - Factuur (DEFAULT)
1
Reminder - Herinnering

invoicenotes non mandatory
Multiline field for additional remarks. Use \n for newlines and \t for tabs. Contents is placed in notes/comments section of the invoice. Content will not appear on the actual invoice or associated emails.

emailaspdf mandatory
Use when sending invoice or reminder as pdf file using email.

emailto non mandatory
Mandatory when using emailaspdf. Use valid email addresses. Muliple addresses can be used when separated with a comma or semicolon. If emailto is not set, the email address from the contact of the invoice will be used. Addresses will be checked on format. Inconsistent or incorrect addresses will raise a warning and no mail will be sent.

emailbcc non mandatory
Use valid email addresses. Muliple addresses can be used when separated with a comma or semicolon. If emailto is not set, the emailbcc will be ignored and skipped. Addresses will be checked on format. Inconsistent or incorrect addresses will raise a warning and no mail will be sent. When emailto is set and emailbcc is not set the emailbcc settings from the invoice template will be used as a fall-back for emailbcc.

emailfrom non mandatory
Use a single valid emailaddress. If omitted, the email address of the invoice template, with fallback to the account owner will be used. Most pretty results are obtained when using fully configured invoice templates in Acumulus and leaving this option empty (recommended).

subject non mandatory
Currently ASCII-only allowed. If omitted or left empty a default subject suitable for an invoice or reminder will be used.

message non mandatory
Currently ASCII-only allowed. Mileage may vary when trying to submit multiple lines. Use \n when doing so. If omitted, the email text composed in the template will be used (recommended).

confirmreading non mandatory
Ask the recipient to confirm the delivery of the email message.

Option
Description
0
Do not ask for confirmation (DEFAULT)
1
Ask for confirmation

ubl
Include e-Invoice / UBL-document.
Option
Description
0
Do not include UBL [default]
1
Include UBL attachment

docid (embedded in docids)
Document identifier for automatically attaching available documents in Acumulus.
Please note that the documents are limited to in-Acumulus shared documents when using the role of API-invoerder.

Response

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <invoice>
        <token>01234567890abcdef01234567890abcd</token>
        <invoicetype>0</invoicetype>
    </invoice>
    <errors>
        <count_errors>0</count_errors>
    </errors>
    <warnings>
        <count_warnings>0</count_warnings>
    </warnings>
    <status>0</status>
</response>

token Mandatory
Unique 32-character identifier(hash) for the invoice.

invoicetype non mandatory

Option
Description
0
Regular Invoice / Factuur (DEFAULT)
1
Reminder / Herinnering