1. API
  2. Supplier API

GetAllTheOrdersWithFilter

You can retrieve orders placed by your sellers from Avasam via the API

Call

/apiseeker/OrdersView/GetAllTheOrdersWithFilter

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:

Name Type Is required Description
Email String Required Email address for login
Customer Id String Required Unique customer ID. See customer list
From Date String Required Earliest date to limit the returned results by
To Date String Required Latest date to limit the returned results by
Is Today Boolean Required If ‘True’, call will only retrieve information for current day. Supersedes ‘From Date’ and ‘To Date’
Payment String Required Filter returned results by payment method
Shipping String Required Filter returned results based on shipping provider used to dispatch order where processed
Sub-Source String Required Filter returned results based on the selling channel they originated from
Type String Required Not actively used now. Retained for future usage
Limit Integer Required Specify the maximum number of results to return in a page
If used, must also specify ‘Page’
Page Integer Required Specify the page number to return
If used, must specify ‘Limit’
Shipper-Type String Required Filter results based on shipping method used to dispatch order where processed

 

Request body

The call is structured as follows:

Request Data: {
   "Email":"",
   "CustomerID":"",
   "IsToday":"TRUE",
   "Limit":"20",
   "Page":"2"
}

 

Response

Processed Bool Required If TRUE, then order has been dispatched, if FALSE then order still awaiting dispatch
Processed Date Time String Not required Date and time of dispatch, if ‘Dispatch’ is TRUE.

 

General info

Name Type Is required Description
Reference Num String Required Avasam order reference number
External Reference Num String Not required Selling channel order reference number
Received Date String Required Date/time order received
Source String Not required Source (channel type) for order
Subsource String Not required Subsource (name) of channel for order
Label Printed Bool Not required Shows TRUE if shipping label has been printed for order
Label Error String Not required Includes error message returned if shipping label could not be printed
Invoice Printed Bool Not required Shows TRUE if invoice has been printed for order
PickList Printed Bool Not required Shows TRUE if pick list has been printed for order
Notes Int Not required Returns number of Notes for order, if any
Part Shipped Bool Required If TRUE, not all of order has been dispatched and some awaits delivery
Dispatch By Date String Required Latest date order can/should be dispatched
NumItems Inte Required Total number of items in the order

 

Shipping info

Name Type Is required Description
Vendor String Not required Customer’s email address for ID purposes
Postal Service ID String Required Customer’s address
Postal Service Name String Required Customer’s address/city
Total Weight String Required Customer’s postcode
Item Weight String Required Customer’s address/country
Package Category ID String Not required Packaging category ID
Package Category String Not required Packaging category
Package Type ID String Not required Packaging type ID
Package Type String Not required Packaging type
Postage Cost Double Required Cost of postage including sales tax/VAT
Postage Cost Ex-Tax Double Required Cost of postage without sales tax/VAT
Tracking number String Not required If sent using tracked shipping method, holds tracking number
Manual Adjust Bool Required Only set to TRUE if order edited in Avasam following download

 

Customer info

Name Type Is required Description
Channel Buyer Name String Not required Customer IDon sales channel
Email Address String Not required Customer’s email address for Id purposes
Address1 String Required Customer’s shipping address
Address2 String Not required Customer’s shipping address
Address3 String Not required Customer’s shipping address
Town String Required Customer’s shipping address/town
Region String Required Customer’s shipping address/region
Postcode String Required Customer’s shipping address/postcode
Country String Required Customer’s shipping address/country
Full Name String Required Customer’s name
Company String Not required Customer’s company name
Phone Number String Not required Customer’s telephone number
Country ID String Required Avasam ID for the specified country

 

Billing address

Name Type Is required Description
Email Address String Not required Customer’s email address
Address1 String Required Customer’s billing address
Address2 String Not required Customer’s billing address
Address2 String Not required Customer’s billing address
Town String Not required Customer’s billing address/town
Region String Not required Customer’s billing address/(region/county)
Postcode String Not required Customer’s billing address/postcode
Country String Required Customer’s address/country
Full Name String Not required Customer’s full name
Company String Not required Customer’s business name
Telephone String Not required Customer’s telephone number
Country ID String Required Avasam ID for the specified country

 

Totals info

Name Type Is required Description
Subtotal Double Required Total value of the items in the order, ex tax and postage
Postage Cost Double Required Cost of shipping ex tax
Tax Double Required Tax for total order value
Total Charge Double Required Total order value ex tax
Payment Method String Required Avasam recorded payment method
Payment Method ID String Required Avasam internal ID for recorded payment method
Profit Margin Double Required Profit (total value excluding tax less cost)
Total Discount Double Required Total value of any discounts applied to the order cost
Currency String Required The currency the order was invoiced and paid in
Country Tax-Rate Double Required Basic sales tax rate for the country the order was placed in

 

Items

Name Type Is required Description
Order ID String Not required Avasam order ID
Item ID String Required -
Stock Item ID String Required -
Item Number String Required -
SKU String Required -
Item Source Object Not required Supplier of item
Title String Required Item title/name
Quantity Int Required Item title/name
Category Name String Not required Avasam category
Composite Availability Object Not required Confirms items available, where item is a composite/bundle
Row ID String Not required Row ID within order
Stock Levels Specified Bool Not required If true, then supplier holds levels for an item. Often false for services
On Order Int Not required Quantity on order from supplier
In Order Book Int Not required Quantity currently in unfulfilled orders
Level Int Not required Quantity on shelf
Minimum Level Int Not required Minimum level specified for supplier to trigger re-order
Available Stock Int Not required Stock on shelf less items in unfulfilled orders – usually the value sent to listings to avoid overselling
Price Per Unit Double Required Cost per item
Unit Cost Double Required Item cost ex tax
Discount Double Not required Discount amount (if applied)
Tax Double Not required -
Tax Rate Double Not required Sales tax rate
Cost Double Not required Item cost price to seller ex VAT
Cost Inc Tax Double Not required Item cost price inc VAT/sales tax
Composite Sub-Items List Not required If composite - list of parent items that will be shipped/included in the order
Is Service Bool Not required If true, the item line represents a service, not a product (i.e.giftwrap)
Sales Tax Double Not required Total sales tax paid
Tax Cost Inclusive Bool Not required Does cost price include tax? TRUE/FALSE
Part shipped Bool Not required If ‘true’, only part of the items in this row has been dispatched, possibly due to stock availability
Weight Double Not required Total weight of items in this row
Barcode Number String Not required Barcode for item
Market Int Not required -
Channel SKU String Not required SKU of item in original listing
Channel Title String Not required Title of Item in original listing
Has Image Bool Not required If TRUE, the item has one or more images saved in Avasam
Image ID Object Not required Reference for item main image in Avasam
Additional Info List Not required Contains a list of entries containing additional item information
Stock Level Indicator Int Not required -
Bin Rack Object Not required Item’s physical location reference
Return Quantity Int Not required If any return requests have been made against this order, shows the number of items returned
Amount Double Not required If any return requests have been made against this order, shows the value of items returned
Reason String Not required If any return requests have been made against this order, shows the reason given for the return(s)

 

Response body

The response from Avasam will come in the following form:

{
"data":[
{
"_id":"cb2d8e7d-2d83-4926-ba61-b6b9037fd30a",
"ShipperId":null,
"OrderId":"cb2d8e7d-2d83-4926-ba61-b6b9037fd30a",
"NumOrderId":"20600",
"Processed":true,
"ProcessedDateTime":"2018-12-14T10:17:24.271Z",
"FulfilmentLocationId":"",
"GeneralInfo":{
"Status":1,
"LabelPrinted":false,
"LabelError":"",
"InvoicePrinted":false,
"PickListPrinted":false,
"Notes":0,
"PartShipped":false,
"Marker":0,
"ReferenceNum":"ODS1245873",
"ExternalReferenceNum":"ODS1245873",
"ReceivedDate":"2018-12-14T10:11:39.722Z",
"Source":"DIRECT",
"SubSource":"-",
"HoldOrCancel":false,
"DespatchByDate":"2018-12-14T10:11:39.72Z",
"NumItems":1
},
"ShippingInfo":{
"Vendor":"",
"PostalServiceId":"FEDEX",
"PostalServiceName":"FEDEX",
"TotalWeight":0.0,
"ItemWeight":0.0,
"PackageCategoryId":"00000000-0000-0000-0000-000000000000",
"PackageCategory":"",
"PackageTypeId":"00000000-0000-0000-0000-000000000000",
"PackageType":"",
"PostageCost":10.0,
"PostageCostExTax":10.0,
"TrackingNumber":"testing for process sync",
"ManualAdjust":false
},
"CustomerInfo":{
"ChannelBuyerName":"",
"Address":{
"EmailAddress":"",
"Address1":"test",
"Address2":"",
"Address3":"",
"Town":"test",
"Region":"",
"PostCode":"test",
"Country":"Anguilla",
"FullName":"test",
"Company":"",
"PhoneNumber":"",
"CountryId":"8eed01c8-df37-40e6-bf74-c8d0376047b8"
},
"BillingAddress":{
"EmailAddress":"",
"Address1":"test",
"Address2":"",
"Address3":"",
"Town":"test",
"Region":"",
"PostCode":"test",
"Country":"Anguilla",
"FullName":"test",
"Company":"",
"PhoneNumber":"",
"CountryId":"8eed01c8-df37-40e6-bf74-c8d0376047b8"
}
},
"TotalsInfo":{
"Subtotal":156.0,
"PostageCost":10.0,
"Tax":9.85,
"TotalCharge":160.25,
"PaymentMethod":"",
"PaymentMethodId":"00000000-0000-0000-0000-000000000000",
"ProfitMargin":0.0,
"TotalDiscount":15.6,
"Currency":null,
"CountryTaxRate":0.0
},
"FolderName":[
],
"Items":[
{
"OrderId":"00000000-0000-0000-0000-000000000000",
"ItemId":"722bd9c6-af78-406c-9e70-1bc6abc4369b",
"StockItemId":"722bd9c6-af78-406c-9e70-1bc6abc4369b",
"ItemNumber":"",
"SKU":"Producttest1",
"ItemSource":"",
"Title":"Producttest1",
"Quantity":1,
"CategoryName":"",
"CompositeAvailablity":"",
"RowId":null,
"StockLevelsSpecified":true,
"OnOrder":0,
"InOrderBook":0,
"Level":0,
"MinimumLevel":0,
"AvailableStock":0,
"PricePerUnit":48.65,
"UnitCost":51.0,
"Discount":10.0,
"Tax":2.75,
"TaxRate":6.0,
"Cost":51.0,
"CostIncTax":48.65,
"CompositeSubItems":[
],
"IsService":false,
"SalesTax":0.0,
"TaxCostInclusive":false,
"PartShipped":false,
"Weight":0.0,
"BarcodeNumber":"",
"Market":0,
"ChannelSKU":"Producttest1",
"ChannelTitle":"Producttest1",
"HasImage":false,
"ImageId":"",
"AdditionalInfo":[
],
"StockLevelIndicator":0,
"BinRack":"",
"ReturnQuantity":0,
"Amount":0.0,
"Reason":null
},
{
"OrderId":"00000000-0000-0000-0000-000000000000",
"ItemId":"746753a3-4577-4fdd-8573-3a98cccd6b06",
"StockItemId":"746753a3-4577-4fdd-8573-3a98cccd6b06",
"ItemNumber":"",
"SKU":"Producttest2",
"ItemSource":"",
"Title":"Producttest2",
"Quantity":1,
"CategoryName":"",
"CompositeAvailablity":"",
"RowId":null,
"StockLevelsSpecified":true,
"OnOrder":0,
"InOrderBook":0,
"Level":0,
"MinimumLevel":0,
"AvailableStock":0,
"PricePerUnit":50.08,
"UnitCost":52.0,
"Discount":10.0,
"Tax":3.28,
"TaxRate":7.0,
"Cost":52.0,
"CostIncTax":50.08,
"CompositeSubItems":[
],
"IsService":false,
"SalesTax":0.0,
"TaxCostInclusive":false,
"PartShipped":false,
"Weight":0.0,
"BarcodeNumber":"",
"Market":0,
"ChannelSKU":"Producttest2",
"ChannelTitle":"Producttest2",
"HasImage":false,
"ImageId":"",
"AdditionalInfo":[
],
"StockLevelIndicator":0,
"BinRack":"",
"ReturnQuantity":0,
"Amount":0.0,
"Reason":null
},
…..
….
],
"total":2
}