API Reference
Start developing plugins for BizFusion.

 
Purchase Invoice (PurchaseInvoiceDTO)

Use a Purchase Invoice to register the purchase of physical goods that you will resell.

Specify a customer for the Vendor Id.
The linked customer plays the role of vendor/supplier on this document.


Properties
property data type reference
PurchaseInvoiceId Int32 Primary Key
PurchaseDate DateTime
VendorId Int32
Reference String
Timestamp String
PurchaseInvoiceLine Array of: PurchaseInvoiceLineDTO


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


JSON sample
{
  "PurchaseInvoiceId": 1,
  "PurchaseDate": "2015-12-31T00:00:00",
  "VendorId": 2,
  "Reference": "",
  "Timestamp": "AQIDJQ==",
  "PurchaseInvoiceLine": [
    {
      "PurchaseInvoiceLineId": 1,
      "PurchaseInvoiceId": 1,
      "ProductId": 2,
      "Quantity": 50,
      "Price": 5.0,
      "VatLineId": 1,
      "Timestamp": "AQIDJg==",
      "PurchaseVariant": [
        {
          "PurchaseVariantId": 1,
          "PurchaseInvoiceLineId": 1,
          "VariantValueId": 5,
          "Timestamp": "AQIDJw=="
        }
      ]
    }
  ]
}


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.