API Reference
Start developing plugins for BizFusion.

 
Expense Voucher (ExpenseVoucherDTO)

You use Expense Vouchers to register your bills & expenses.

Note, don't use an expense voucher to register the purchase of goods that you are going
to resell. You should use a purchase invoice for those goods.

The specified customer plays the role of 'Creditor'.
You owe this person/company money.

The quantity should always be one when registering expenses.
You can specify a quantity larger than one when registering assets.


Properties
property data type reference
VoucherId Int32
VoucherDate DateTime
CustomerId Int32 CustomerDTO
Reference String
Timestamp String
VoucherLine Array of: VoucherLineDTO


Methods
method parameters URL
Get
/api/ExpenseVoucher
Get
Int32 id
/api/ExpenseVoucher?id={value}
Get
Int32 pageIndex, Int32 recordsPerPage
/api/ExpenseVoucher?pageIndex={value}&recordsPerPage={value}
Post /api/ExpenseVoucher
Put /api/ExpenseVoucher?id={value}
Delete
Int32 id, String timestamp
/api/ExpenseVoucher?id={value}&timestamp={value}
GetJournalTransactionId
Int32 id
/api/ExpenseVoucherSet/JournalTransactionId?id={value}
GetByYear
Int32 year
/api/ExpenseVoucherSet/ByYear?year={value}
GetByPeriod
DateTime startDate, DateTime endDate
/api/ExpenseVoucherSet/ByPeriod?startDate={value}&endDate={value}
GetRecordCount
/api/ExpenseVoucherSet/RecordCount
PostCashPayment
Int32 journalTransactionId
/api/ExpenseVoucherSet/CashPayment?journalTransactionId={value}
GetPayments
Int32 id
/api/ExpenseVoucherSet/Payments?id={value}
GetByCustomerId
Int32 id
/api/ExpenseVoucherSet/ByCustomerId?id={value}
PutUnpost
Int32 id, String timestamp
/api/ExpenseVoucherSet/Unpost?id={value}&timestamp={value}
PutUnpostAndDelete
Int32 id, String timestamp
/api/ExpenseVoucherSet/UnpostAndDelete?id={value}&timestamp={value}
GetByField
String field, String value
/api/ExpenseVoucherSet/ByField?field={value}&value={value}
GetAfterId
Int32 id
/api/ExpenseVoucherSet/AfterId?id={value}
GetBeforeId
Int32 id
/api/ExpenseVoucherSet/BeforeId?id={value}
GetMaxId
/api/ExpenseVoucherSet/MaxId


JSON sample
{
  "Timestamp": "AQIDKg==",
  "VoucherId": 1,
  "VoucherDate": "2014-12-31T00:00:00",
  "CustomerId": 1,
  "Reference": "Laptop",
  "VoucherLine": [
    {
      "Timestamp": "AQIDKw==",
      "VoucherLineId": 1,
      "VoucherId": 1,
      "AccountId": 11,
      "Amount": 900.0,
      "VatLineId": 1,
      "Quantity": 1,
      "Description": "Laptop"
    }
  ]
}


General Info

- Numbers should be in English format: 124.99
- Dates look like: 2014-12-31T00:00:00
- Time information is ignored.
- Concurrency is handled through timestamps

Create Record (POST)

- Primary keys are not required when doing a post.
- Timestamps are not required when doing a post.
- Provide the JSON record in the body of the post request.

Update Record (PUT)

- Timestamps are required.
- Provide the JSON record in the body of the put request.

Delete Record (DELETE)

- Primary key and Timestamp are required.