API Reference
Start developing plugins for BizFusion.

 
Credit Note (CreditNoteDTO)

You can create Customer and Vendor Credit Notes.

Customer Credit Note
Customer Credit Notes are linked to Invoices.
You can omit the Purchase Invoice Id value when you create Customer Credit Notes.
You can only link to posted invoices.

Vendor Credit Note
Vendor Credit Notes are linked to Purchase Invoices.
You can omit the Invoice Id value when you create Vendor Credit Notes.
You can only link to posted purchase invoices.

Credit Reason
There are two credit reasons that you can use on a credit note:
- Quantity Correction
- Amount/Price Correction

You use a quantity correction when the customer ordered more items than intended.
E.g. the customer ordered two items, but only wanted one item.

You use an amount/price correction when the price on the invoice was incorrect.
E.g. the price on the invoice is 120 euro, but should have been 100 euro.

You also use amount/price corrections when you need to perform a full customer refund.
E.g. the customer returned all products and wants her money back.


Properties
property data type reference
CreditNoteId Int32 Primary Key
VoucherDate DateTime
CustomerId Int32 CustomerDTO
InvoiceId Int32? (optional) InvoiceDTO
PurchaseInvoiceId Int32? (optional) PurchaseInvoiceDTO
CreditNoteTypeId Int32 CreditNoteTypeDTO
CreditReasonId Int32 CreditReasonDTO
Timestamp String
CreditNoteLine Array of: CreditNoteLineDTO


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


JSON sample
{
  "Timestamp": "AQIDIg==",
  "CreditNoteId": 1,
  "VoucherDate": "2016-01-01T00:00:00",
  "CustomerId": 2,
  "InvoiceId": 1,
  "PurchaseInvoiceId": null,
  "CreditNoteTypeId": 1,
  "CreditReasonId": 1,
  "CreditNoteLine": [
    {
      "CreditNoteLineId": 1,
      "CreditNoteId": 1,
      "ProductId": 1,
      "Quantity": 1,
      "Price": 299.0,
      "Timestamp": "AQIDIw==",
      "ProductPrice": 299.0,
      "CreditNoteVariant": []
    }
  ]
}


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.