Call
https://app.avasam.com/api/SellerOrdersView/SellerGetOrdersListWithFilter
When using the Avasam API, remember that it must be called correctly, using the appropriate method (such as POST) described in this article, and with a valid token (Which can be obtained using the Login call). Otherwise the server may return an error.
Parameters
The header details for this call are as follows:
Field name |
Type |
Description |
Is Required |
FromDate |
DateTime |
Order range start date |
True |
ToDate |
DateTime |
Order range end date |
True |
DateDispaly |
string |
String value to define range (eg Today, Yesterday) |
True |
Customer |
string |
Search parameter for filtering for specific customer(s) |
False |
OrderStatus |
string |
Specifies the current status of the orders that should be returned (inc ‘Dispatched’, ‘Return’) |
False |
PaymentStatus |
string |
Specify a payment status to filter by |
False |
Sortby |
string |
Specify sort direction for SortStatus (up or down) |
True |
SortStatus |
string |
Specify a field name from AvasamOrder to sort the list by |
True |
limit |
int |
Specify the number of records per page |
True |
page |
int |
Specify which page number to return |
True |
Request body
The call is structured as follows:
{
"FromDate":"2020-11-23T18:30:00.000Z",
"ToDate":"2021-01-23T06:11:28.328Z",
"DateDispaly":"Last 60 days",
"Customer":"",
"OrderStatus":"All",
"PaymentStatus":"All",
"Sortby":"ChRecdDate",
"SortStatus":"down",
"limit":"60",
"page":0
}
Response
Field |
Type |
Description |
data |
List<AvasamOrder> |
Includes a list of all matching orders and details |
Total |
long |
Display total count of orders returned |
AvasamOrder
Field |
Type |
Description |
_id |
string |
Display the order’s unique ID |
Number |
string |
Display the internal Avasam order number |
SellerRef |
string |
Display the order’s reference number from channel |
SellerOrderId |
string |
Display the order reference number (may be same as SellerRef) |
SellerOtherRef |
string |
Display the order reference number (may be same as SellerRef and SellerOtherId) |
SupplierOtherRef |
string |
Supports additional order reference from external order management software |
IsChild |
bool |
If order has been merged or split &order is the child ("True") else "False" |
ParentId |
string |
Display parent order ID if IsChild=True |
IsParent |
bool |
If order has been merged or split &order is the parent("True") else "False" |
Status |
OrderStatus |
Order status value list – QUEUE, AWAITING_PAYMENT, DRAFT, CREATED, ERROR, CANCELLED_REQUEST, CANCELLED, DISPATCH_QUEUE, DISPATCH, RETURN_REQUEST, RETURN, QUEUE_EDIT, AWAITING_PAYMENT_EDIT, UPDATE_PENDING_SUPPLIER, CREATE_PENDING_SUPPLIER, DISPATCH_ERROR, REPAYMENT, MERGE, INPROCESS, CANCEL_PARTIAL_ORDER |
PaymentStatus |
string |
Order payment status |
Channel |
string |
Order channel name |
Account |
string |
Order channel account name |
InvId |
string |
Order invoice unique id |
InvNumber |
string |
Order invoice number |
SellerId |
string |
Seller unique id |
SupplierId |
string |
Always blank |
AuthKey |
string |
Supplier unique code |
Customer |
OrderCustomer |
Display order customer details |
Shipping |
OrderShipping |
Display order shipping details |
Payment |
OrderPayment |
Display order payment details. |
Option |
OrderOption |
Display other details associated with order |
Items |
List<OrderItem> |
List of order items. |
RetrunItem |
List<OrderItem> |
List of order items flagged for return. |
UnpiadAmount |
double |
If order not fully paid, show balance owing |
PaidAmount |
double |
Show balance paid for order |
VAT |
double |
Show VAT amount on order |
SubTotal |
double |
Order subtotal (Ex VAT) |
Total |
double |
Order total value (Inc VAT) |
Discount |
double |
Show total discount applied to order |
DiscountPer |
double |
Discount applied per product |
Surcharge |
double |
The value of any surcharges applied to order |
Error |
List<string> |
Display for the order error list data details |
ErrorType |
OrderErrorType |
Display order error type (Value list here – NONE, PRODUCTNOTMAPP, PRODUCTMISSING, PRODUCTNOTSOURCE, PARENTPRODUCT, SHIPPINGNOTMAPP, SHIPPINGNOTFOUND, PROCESSORDERERROR, RESTRICTEDPRODUCT, OUTOFSTOCK, OTHERERROR, PAYMENTERROR |
IsShipperPayout |
bool |
Confirm if order payment has been disbursed to supplier. |
GeneralInfoStatus |
int |
General info sting |
Processed |
bool |
Is order marked as processed? |
IsProcessAtSeeker |
bool |
If order processed, was order processed by seller instead of supplier? (default False) |
IsDeleted |
bool |
If order is marked as deleted, set as True |
IsReturnRequestDraft |
bool |
If order has a return request in process, but not submitted, set as True |
IsReturnRequest |
bool |
If order has had a return request submitted, set as True |
ManifestPrinted |
bool |
If supplier has printed a label and manifest has been printed for it |
SellerName |
string |
Sellername |
LabelPrinted |
bool |
Order label printed |
IsInvoiced |
bools |
Order Invoice raised in Avasam |
Notes |
List<OrderNotes> |
Order notes (as list) |
DespatchBy |
DateTime |
Latest date and time order must be dispatched by |
MetaData |
Dictionary<string, string> |
Misc order data not covered in other fields for completeness |
Histories |
List<History> |
List of actions taken against order |
Created |
DateTime |
Order placed on channel (date and time) |
ChRecdDate |
DateTime |
Order created in Avasam (date and time) |
Dispatch |
DateTime |
If order dispatched, specify date and time |
LastUpdate |
DateTime |
Last action or change on order (date and time) |
IsCreditNotes |
bool |
If credit note has been raised against order set True |
ReturnStatus |
string |
If order has been returned, set True |
Currency |
string |
Currency that order was placed in (GBP) |
OrderItem
Field |
Type |
Description |
ItemId |
string |
Display for the order item unique id |
SKU |
string |
Display for the order item supplier SKU value |
sCode |
string |
Display for the order item avasam SKU value |
Title |
string |
Display for the order item title value |
Barcode |
string |
Display for the order item barcode value |
Qty |
int |
Display for the order item total quantity |
UnitPrice |
double |
Display for the order item unit price value |
VATPer |
double |
Display for the order item vat percentage |
VAT |
double |
Display for the order item vat |
DiscountPer |
double |
Display for the order item discount percentage |
Discount |
double |
Display for the order item discount |
SubTotal |
double |
Display for the order item subtotal count value |
Total |
double |
Display for the order item total value |
Authkey |
string |
Display for the order item supplier code |
ReturnQuantity |
int |
Display for the order item return quantity total value |
Reason |
string |
Display for the order item return reason value |
CostIncTax |
double |
Display for the order item cost price including tax value |
Weight |
double |
Display for the order item weight value |
Height |
double |
Display for the order item height value |
Width |
double |
Display for the order item width value |
Depth |
double |
Display for the order item depth value |
VatExcl |
bool |
Display for the order item vat excluding boolean value |
VatIncuding |
double |
Display for the order item vat including value |
OrderNotes
Field |
Type |
Description |
User |
string |
Display for the order type value like – Avasam, Import, Channel name |
Notes |
string |
Display for the order notes message |
On |
DateTime |
Display for the create order date time |
Self |
bool |
Display for the boolean value |
OrderCustomer
Field |
Type |
Description |
Name |
string |
Display for the delivery user name |
Address |
Address |
Display for the address detail see Address |
BillingAddress |
Address |
Display for the billing address detail see Address |
Address
Field |
Type |
Description |
EmailAddress |
string |
Display for the user email id |
Address1 |
string |
Display for the user address line 1 |
Address2 |
string |
Display for the user address line 2 |
Address3 |
string |
Display for the user address line 3 |
Town |
string |
Display for the user town name |
PostCode |
string |
Display for the user postcode |
Country |
string |
Display for the user country name |
FullName |
string |
Display for the user full name |
PhoneNumber |
string |
Display for the user phone number |
OrderShipping
Field |
Type |
Description |
ShippingName |
string |
Display for the order shipping name |
ShippingId |
string |
Display for the order shipping id |
Weight |
double |
Display for the order shipping weight value |
Total |
double |
Display for the order shipping total value |
VATPer |
double |
Display for the order shipping vat percentage value |
VAT |
double |
Display for the order shipping vat |
TrackingNumber |
string |
Display for the order tracking number |
OrderPayment
Field |
Type |
Description |
RefNumber |
string |
Display for the order payment reference number |
Type |
string |
Display for the order payment type |
Total |
double |
Display for the order payment total value |
On |
DateTime |
Display for the order payment date time |
History
Field |
Type |
Description |
Name |
string |
Display for the order action name |
Action |
string |
Display for the order updated action type name |
On |
DateTime |
Display for the order action updated date time |
Response body
The response from Avasam will come in the following form:
{
"data":[{"_id":"00000000-0000-0000-0000-000000000000",
"Number":"29350248331",
"SellerRef":"ODS59413",
"SellerOrderId":"ODS59413",
"SellerOtherRef":null,
"SupplierOtherRef":"29350248331",
"IsChild":false,"ParentId":"00000000-0000-0000-0000-000000000000",
"IsParent":false,
"Status":9,
"PaymentStatus":"Paid",
"Channel":"Web",
"Account":"Avasam Seller",
"InvId":"00000000-0000-0000-0000-000000000000",
"InvNumber":"INGB0132935210122",
"SellerId":"00000000-0000-0000-0000-000000000000",
"SupplierId":"",
"AuthKey":"GB01003",
"Customer":{"Name":"Testing User",
"Address":
{
"EmailAddress":"",
"Address1":"Z-211",
"Address2":"",
"Address3":"",
"Town":"Baroda",
"PostCode":"350015",
"Country":"India",
"FullName":"Testing User",
"PhoneNumber":"+918899776655"
},
"BillingAddress":
{
"EmailAddress":"",
"Address1":"Z-211",
"Address2":"",
"Address3":"",
"Town":"Ahmedabad",
"PostCode":"350015",
"Country":"India",
"FullName":"Testing User",
"PhoneNumber":"+918899776655"
}
},
"Shipping":
{
"ShippingName":"Standard",
"ShippingId":"2",
"Weight":22.0,
"Total":6.0,
"VATPer":20.0,
"VAT":1.0,
"TrackingNumber":""},
"Payment":
{
"RefNumber":"00000000-0000-0000-0000-000000000000",
"Type":"Deposit",
"Total":19.68,
"On":"2021-01-22T14:22:29.999Z"
},
"Items":
[
{
"ItemId":"00000000-0000-0000-0000-000000000000",
"SKU":"S036570016",
"sCode":"Test56789",
"Title":"New Product T-shirt",
"Barcode":"",
"Qty":1,
"UnitPrice":12.0,
"VATPer":20.0,
"VAT":2.28,
"DiscountPer":5.0,
"Discount":0.6,
"SubTotal":12.0,
"Total":13.68,
"authkey":"GB01003",
"ReturnQuantity":0,
"Reason":null,
"CostIncTax":0.0,
"Weight":22.0,
"Height":20.0,
"Width":20.0,
"Depth":20.0,
"VatExcl":true,
"VatIncuding":0.0}
],
"RetrunItem":
[
{
"ItemId":"00000000-0000-0000-0000-000000000000",
"SKU":"S036570016",
"sCode":"Test56789",
"Title":"New Product T-shirt",
"Barcode":"",
"Qty":1,
"UnitPrice":12.0,
"VATPer":20.0,
"VAT":2.28,
"DiscountPer":5.0,
"Discount":0.6,
"SubTotal":12.0,
"Total":13.68,
"authkey":"GB01003",
"ReturnQuantity":1,
"Reason":"Faulty item",
"CostIncTax":0.0,
"Weight":22.0,
"Height":0.0,
"Width":0.0,
"Depth":0.0,
"VatExcl":true,
"VatIncuding":0.0
}
],
"UnpiadAmount":0.0,
"PaidAmount":19.68,
"VAT":2.28,
"SubTotal":12.0,
"Total":19.68,
"Discount":0.6,
"DiscountPer":0.0,
"Surcharge":0.0,
"Error":[],
"ErrorType":0,
"IsShipperPayout":false,
"GeneralInfoStatus":0,
"Processed":true,
"IsProcessAtSeeker":true,
"IsDeleted":false,
"IsReturnRequestDraft":false,
"IsReturnRequest":true,
"ManifestPrinted":false,
"SellerName":null,
"LabelPrinted":false,
"IsInvoiced":true,"Notes":
[
{
User: "Import",
Notes: "demo order",
On: "2020-12-30T10:38:37.187Z",
Self: false}],
"DespatchBy":"2021-01-25T23:59:00Z",
"MetaData":
{
"ReturnNo":"RTN5186729"},
"Histories":
[
{
"Name":"OrderCreate",
"Action":"OrderCreateDate",
"On":"2021-01-22T14:22:27.333Z"
},
{
"Name":"Stock S036570016",
"Action":"1",
"On":"2021-01-22T14:22:28.895Z"
}
],
"Created":"2021-01-22T14:22:27.334Z",
"ChRecdDate":"2021-01-22T14:22:27.334Z",
"Dispatch":"2021-01-22T14:26:03.859Z",
"LastUpdate":"2021-01-23T00:27:08.099Z",
"IsCreditNotes":false,
"ReturnStatus":"Return requested","Currency":"GBP"}],
"total":1
}