API - Add Expense

Expense, purchase, investment. Inkoopfactuur, zakelijke uitgave en/of investering.


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

Support voor testmode :

Submit

<?xml version="1.0" encoding="UTF-8"?>
<myxml>
    ...
    <supplier>
        <type></type>
        <contactid></contactid>
        <vattypeid></vattypeid>
        <companyname1></companyname1>
        <companyname2></companyname2>
        <fullname></fullname>
        <salutation></salutation>
        <address1></address1>
        <address2></address2>
        <postalcode></postalcode>
        <city></city>
        <countrycode></countrycode>
        <vatnumber></vatnumber>
        <telephone></telephone>
        <fax></fax>
        <email></email>
        <overwriteifexists></overwriteifexists>
        <bankaccountnumber></bankaccountnumber>
        <mark></mark>
        <expense>
            <description></description>
            <amountexvat></amountexvat>
            <amountinclvat></amountinclvat>
            <vatrate></vatrate>
            <vattype></vattype>
            <issuedate></issuedate>
            <costheading></costheading>
            <costcenter></costcenter>
            <disablelimiteddeduction></disablelimiteddeduction>
            <accountnumber></accountnumber>
            <paymentstatus></paymentstatus>
            <paymentdate></paymentdate>
            <privatepercentage></privatepercentage>
            <recurrences></recurrences>
            <monthly></monthly>
            <investment></investment>
            <writeoffinyears></writeoffinyears>
            <scrapvalue></scrapvalue>
        </expense>
    </supplier>
</myxml>

It is advised to always provide the supplier section. In case of reverse charge of VAT, the supplier section including the VAT-number is mandatory. Default values for costheading, costcenter and accountnumber are applied unless provided otherwise.

<supplier> mandatory section


contactid
Optional numeric Acumulus-specific contactid when updating a known supplier as part of the expense process. Leave blank when adding a new supplier as part of the process.

type
Option
Description
1
Debtor
2
Creditor DEFAULT
3
Debtor/Creditor (neutral)

vattypeid
Numeric and strings describing name of the vattype of contact.

vattypeid
description
description
1
Private and/or VAT exempt
Particulier en/of btw-vrijgesteld
2 [default]
Business VAT taxable
Zakelijk btw-plichtig

companyname1
Field for company name and e.g. department.

companyname2
Additional fields for company name and e.g. department.

fullname
Field for providing a full personal name or reference.

salutation
Complete salutation e.g. "Geachte heer van der Molen" or "Beste Peter" without trailing comma. Defaults to: "Geachte mevrouw/heer".

address1
Address field.

address2
Address field.

postalcode
Address field.

city
City.

countrycode mandatory
Use two-letter international standard country code (ISO 3166-1 alpha 2).

vatnumber non mandatory / mandatory
Supplier VAT-number. Mandatory when using vattype 2 or 3 (national reverse charge or international reverse charge). See vattype below for more information.

fax
Supplier fax number.

telephone
Supplier telephone number.

email
Lookup is based on string comparison. If a contact with this email address exists, this contact will be selected. When multiple contacts with the same email address are found only the most recent added contact is used. When no matches are made a new contact will be added as part of the expense add transaction. Matching contact will be overruled when a contactid is provided.

overwriteifexists
If a supplier match has been made using the email address as an identifier, all supplier details can be overwritten with the information provided within the request. Even if this means that some fields will be cleared.
Option
Description
0
No update made DEFAULT
1
Overwrite all supplier contact details


bankaccountnumber
Customer bank account or IBAN number.

mark
Extra label or mark e.g. "BSN: 1234.56.789".

<expense> mandatory section


description
Description for the expense. Although not mandatory it defaults to: "DESCRIPTION NOT PROVIDED" and throws a warning when leaving this empty.

amountinclvat new
Total amount of the expense including VAT. Has a higher priority over amountexvat.

amountexvat mandatory, unless amountinclvat is provided
Total amount of the expense excluding VAT. Please note that only expenses with a single VAT-rate can be processed. Expenses with multiple VAT-levels will need to be provided as separate API-requests to this call in which case the amountexvat value will have to be self-calculated.

vatrate
Applicable vatrate for the expense. Defaults to "21". Please note that only expenses with a single VAT-rate can be processed. Expenses with multiple VAT-levels will need to be provided as separate API-requests to this call.
Option
Description
-1
No VAT
0
0% VAT
6
6%
Valid prior to October 1st 2012.
9
9%
19
19%
Valid prior to October 1st 2012.
21
21%
DEFAULT

vattype
A single digit indicating the vattype of the invoice.
Option
Description
Description
1
National
Gewone nationale factuur DEFAULT
2
National reverse charge
Verlegde BTW binnen Nederland
3
International reverse charge
BTW-verlegd naar ondernemer in de EU. Een intracommunautaire levering.
4
Export outside EU (export)
Een factuur voor goederen buiten de EU


issuedate
Invoice date, if omitted, today is selected. Format: YYYY-MM-DD.

costheading (kostensoort)
Numeric identifier of an active costheading. Defaults to "17" (Various / Diversen).

costcenter (kostenplaats)
Numeric identifier of an active costcenter. Default to the first available costcenter.

accountnumber
Numeric identifier of an active accountnumber. Inactive accountnumber will be reactivated when used.

paymentstatus
Option
Description
1
Due DEFAULT
2
Paid


paymentdate
Date of payment. Default = issue date. Format: YYYY-MM-DD.

disablelimiteddeduction
Option to overwrite the fiscal internal applied limited deduction rules for specific costheadings (courses and representational costs). By setting this to 1 you enforce the expense to be treated as you wish. This should only applies 100% business-costs. This is tax-wise not valid unless you can clarify the reasons for doing so. Please be advised. Defaults to 0.

Option
Description
0
Limited deduction enabled DEFAULT
1
Limited deduction disabled


privatepercentage
Percentage value between 0 and 100 (including 0 and 100) to be applied to the expense. Defaults to 0 (no privatepercentage applied).

recurrences
Amount of recurrences you want to be processed. To be used with below monthly identifier. Integer, defaults to 0. Limited to year of issuedate.

monthly
When treating this expense as a recurring item (see recurrences) you can use the monthly identifier to state the intermediate periods. Only integers from 0 up to 12 are allowed. Defaults to 0.

Example 1: Same expense (supplier/price) to be paid for every month for the next 6 months -> Set recurrences to 6 and monthly to 1.
Example 2: Same expense (supplied/price) to be paid for every 3 months for the next 12 months -> Set recurrences to 4 and monthly to 3.

investment
Indicator if the expense should be treated as an investment. When so the recurrences and monthly nodes are set to 0.

Option
Description
0
no investment DEFAULT
1
investment


writeoffinyears
Amount of years to be used for writing off the investment. Defaults to 0. Max 30.

scrapvalue
Remainder value after write-off. Up to 2 decimals. Defaults to 0.

Response

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <expense>
        <entryid></entryid>
    </expense>
</response>
</xml>

Plus the default error and warning-reporting as described in the global legend page.

entryid
The entryid, also known as boekstuknummer assigned to the newly added expense.