The PurchaseList resource provides list of Purchases for preview. Detailed Purchase information is available at Purchase endpoint for each individual Purchase. Here are some example URIs:
- /PurchaseList?page=2 - returns the second page of 100 Purchases;
- /PurchaseList - returns the first 100 Purchases because page number 1 is the default;
- /PurchaseList?page=2&limit=500 - returns the second page of 500 Purchases; i.e. the 501st to 1000th Purchase;
- /PurchaseList?search=ABC - returns the first page of 100 Purchases matching search criteria for ABC;
The full range of URIs and HTTP Verbs supported are:
Operation |
HTTP Action |
List of paginated data |
GET /PurchaseList?page={pageNumber} |
List of purchases created or updated after specified datetime |
GET /PurchaseList?updatedSince ={creation date} |
These filters can be used with the GET PurchaseList endpoint:
Filter |
Description |
limit |
Specifies the page size for pagination. Default page size is 100. |
search |
Only return Purchases with search value contained in one of these fields: OrderNumber, Status, Supplier, invoiceNumber, CreditNoteNumber |
requiredBy |
Only return Purchases with Required By date on or before specified date |
updatedSince |
Only return Purchases with changes happened after specified date |
OrderStatus |
Only return Purchases with specified order status |
StockReceivedStatus |
Only return Purchases with specified stock received status |
InvoiceStatus |
Only return Purchases with specified invoice status |
CreditNoteStatus |
Only return Purchases with specified credit note status |
UnstockStatus |
Only return Purchases with specified unstock status |
Status |
Only return Purchases with specified Purchase status |
Filters are used by adding the filter and value to the URI: /PurchaseList?search=ABC
Available Fields for PurchaseList:
Property |
Type |
Length |
Required |
Notes |
ID |
Guid |
Yes |
Unique DEAR Purchase identifier |
|
BlindReceipt |
bool |
Yes |
Specifies, if Purchase is a Blind Receipt order (no purchase order) |
|
OrderNumber |
String |
256 |
Yes |
Purchase Order number generated by DEAR |
Status |
String |
50 |
Yes |
Current Purchase status. See possible statuses below |
OrderDate |
Date |
Yes |
Date when Purchase Order was created |
|
InvoiceDate |
Date |
Date when Invoice was issued |
||
Supplier |
String |
256 |
Yes |
Name of the Supplier |
SupplierID |
Guid |
Yes |
Identifier of Supplier. |
|
InvoiceNumber |
String |
256 |
Invoice number issued by Supplier |
|
InvoiceAmount |
Decimal |
Yes |
Total Invoice amount minus total Credit note amount in Supplier currency |
|
PaidAmount |
Decimal |
Yes |
Total Paid amount minus Refunded amount in Supplier currency |
|
InvoiceDueDate |
Date |
Date when invoice is due according to selected payment terms |
||
RequiredBy |
Date |
Date when shipment is due |
||
BaseCurrency |
String |
3 |
Yes |
3 digit Base currency code (as configured in General Settings) |
SupplierCurrency |
String |
3 |
Yes |
3 digit Supplier currency code |
CreditNoteNumber |
String |
256 |
Credit note number issued by Supplier. Is empty unless credit note is created |
|
OrderStatus |
String |
20 |
Yes |
Purchase Order status. Possible Values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
StockReceivedStatus |
String |
20 |
Yes |
Purchase stock received status. Possible Values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
InvoiceStatus |
String |
20 |
Yes |
Invoice status. Possible Values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
UnstockStatus |
String |
20 |
Yes |
Purchase unstock status. Possible Values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
CreditNoteStatus |
String |
20 |
Yes |
Credit Note status. Possible Values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE” |
LastUpdatedDate |
datetime |
Date and time when purchase task was created of last time modified |
Available Purchase Statuses:
Status |
Description |
DRAFT |
No data is added to Purchase details. |
VOIDED |
Task has been voided |
ORDERING |
OrderStatus = DRAFT |
ORDERED |
OrderStatus = AUTHORISED |
RECEIVING |
OrderStatus = AUTHORISED, StockReceivedStatus = DRAFT |
RECEIVED |
StockReceivedStatus = AUTHORISED |
INVOICED |
InvoiceStatus = AUTHORISED |
CREDITED |
CreditNoteStatus = AUTHORISED |
COMPLETED |
InvoiceStatus =AUTHORISED, RestockReceivedStatus = AUTHORISED |