API Reference
Start developing plugins for BizFusion.

 
Return (ReturnDTO)

You can receive returns on sales and purchase invoices.

Example
A customer ordered a Red T-Shirt, but received a Blue T-Shirt.
You can only post a new shipment on the invoice when you receive a return of the original item.

Customer Return
The Invoice Id must be set for Customer Returns. You can omit the Purchase Invoice Id value.

Vendor Return
The Purchase Invoice Id must be set for Vendor Returns. You can omit the Invoice Id value.

Note, the credit method should always be set to: 'Return and Replace' when dealing with returns.


Properties
property data type reference
ReturnId Int32 Primary Key
ReturnDate DateTime
ProductId Int32 ProductDTO
Quantity Int32
InvoiceId Int32? (optional) InvoiceDTO
PurchaseInvoiceId Int32? (optional) PurchaseInvoiceDTO
CreditMethodId Int32 CreditMethodDTO
Timestamp String
Price Decimal


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


JSON sample
{
  "Timestamp": "AQIDHw==",
  "ReturnId": 0,
  "ReturnDate": "2016-01-01T00:00:00",
  "ProductId": 1,
  "Quantity": 1,
  "InvoiceId": null,
  "PurchaseInvoiceId": null,
  "CreditMethodId": 1,
  "Price": 0.0
}


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.