Skip to main content

Supplier API

Introduction

The Avasam API allows third party developers to access and interact with Avasam. With the use of the API, you can connect Avasam to third party tools for order management, accounting and other business functions. The documentation describes the available API calls including authorization to connect to your account in order to do so. Some functions will only be valid for sellers, others are valid for suppliers, some for both.

If you have any queries about the API, please contact [email protected]

Create Order

Request

Field NameData TypeDescription
AvasamIDstringAvasam supplier ID
LocationIDStringOrder location ID
LocationNamestringOrder Location name
OrdersList(AvasamOrder)List of Order

AvasamOrder

Field NameData TypeDescription
IDstringAvasam Order ID
NumberstringAvasam Order Number
SellerRefstringAvasam Seller Order ref.
SellerOrderIDstringAvasam Seller Order ref ID
SellerOtherRefstringAvasam Seller other Order ref.
SupplierRefstringAvasam Supplier Order ref
SupplierOrderIDstringAvasam Supplier Order ref ID
SupplierOtherRefstringAvasam Supplier other Order ref.
IsChildboolIs Order a child Order or not
ParentIDstringIf Order is a child, parent Order ID
IsParentboolIs Order a parent Order or not
StatusOrderStatusOrder Status Enum
0 QUEUE
1 AWAITING_PAYMENT
2 DRAFT
3 CREATED
4 ERROR
5 CANCELLED_REQUEST
6 CANCELLED
7 DISPATCH_QUEUE
8 DISPATCH
9 RETURN_REQUEST
10 RETURN
11 QUEUE_EDIT
12 AWAITING_PAYMENT_EDIT
13 UPDATE_PENDING_SUPPLIER
14 CREATE_PENDING_SUPPLIER
15 DISPATCH_ERROR
16 REPAYMENT
17 MERGE
18 INPROCESS
19 CANCEL_PARTIAL_ORDER
20 AWAITING_CREATE_ORDER_STATUS_SUPPLIER
21 CART
22 CART_CANCEL
23 CART_PAYMENT
24 CART_HOLD
PaymentStatusstringOrder payment status: PaID or UnpaID
ChannelstringOrder channel name
AccountstringOrder channel’s account name
ExternalChannelstringSeller’s external Order channel name
ExternalAccountstringSeller’s external Order channel’s account name
InvIDstringOrder’s invoice ID
InvNumberstringOrder’s invoice number
SellerIDstringSeller ID
AuthKeystringSupplier code
CustomerOrderCustomerCustomer’s Address information
ShippingOrderShippingCustomer’s Shipping information
ItemsList(OrderItem)Order’s items information
UnpiadAmountdoubleOrder’s UnpaID amount
PaIDAmountdoubleOrder’s PaID amount
VATdoubleOrder’s VAT
SubTotaldoubleOrder’s subtotal
TotaldoubleOrder’s total
DiscountdoubleOrder’s discount
DiscountPerdoubleOrder’s discount in %
SurchargedoubleOrder’s invoice’s surcharge
ProcessedboolIs Order dispatched or not
NotesList(OrderNotes)Order’s Notes information
DespatchByDateTimeOrder expected dispatched time
CreatedDateTimeOrder’s created date
ChRecdDateDateTimeChannel’s Order received date
DispatchDateTimeOrder’s dispatched date
LastUpdateDateTimeOrder last update date
CurrencystringOrder’s currency

OrderCustomer

Field NameData TypeDescription
IDstringOrder ID
refIDstringReference ID
NamestringCustomer Name
AddressAddressAddress
BillingAddressAddressAddress
IsEncryptboolIf address is encrypted or not
ObfuscationboolIf address is Obfuscated or not
onDateTimeDate & time of Order
SellerIDstringSeller ID
EncVerstringSet text as default

Address

Field NameData TypeDescription
EmailAddressstringEmail address
Address1stringAddress 1
Address2stringAddress 2
Address3stringAddress 3
TownstringTown
RegionstringRegion
PostCodestringPostCode
CountrystringCountry
FullNamestringFullName
CompanystringCompany
PhoneNumberstringPhoneNumber
CountryIDstringCountryID

OrderShipping

Field NameData TypeDescription
ShippingNamestringShipping service name
ShippingProvIDerstringShipping service provIDer
ProcessProvIDerstringProcess provIDer
ChannelServicestringChannel shipping service
ShippingIDstringChannel shipping service ID
WeightdoubleShipping weight
TotaldoubleShipping total
VATPerdoubleShipping VAT in %
VATdoubleShipping VAT
TrackingNumberstringShipping tracking number
TrackingURLstringShipping tracking URL
MetaDataDictionary(string, string)
DaysstringShipping days
STypestringSupplier Shipping type
ProcessServicestringShipping process service
ChannelPricedoubleChannel product price
pCodestringProduct code
countrystringShipping country

OrderItem

Field NameData TypeDescription
ItemIDstringAvasam product ID
SKUstringAvasam SKU
sCodestringSupplier SKU
TitlestringProduct title
BarcodestringProduct barcode
RefNumberstringProduct reference number
QtyintProduct qty
UnitPricedoubleProduct unit price
VATPerdoubleProduct VAT %
VATdoubleProduct VAT
DiscountPerdoubleProduct discount in %
DiscountdoubleProduct discount
SubTotaldoubleProduct subtotal
TotaldoubleProduct total
authkeystringProduct supplier code
OSKUstringProduct original channel SKU
OTitlestringProduct original channel title
OPricedoubleProduct original channel price
OVATdoubleProduct original channel VAT
ODiscountPerdoubleProduct original channel discount %
ODiscountdoubleProduct original channel discount
OSubTotaldoubleProduct original channel sub total
OTotaldoubleProduct original channel total
ReturnQuantityintOrder return quantity
ReasonstringReason for returning item
CostIncTaxdoubleProduct cost inc. Tax
WeightdoubleProduct weight
HeightdoubleProduct height
WIDthdoubleProduct wIDth
DepthdoubleProduct depth
MetaDataDictionary(string, string)Metadata
OptionList(OrderOption)Product other option values
VATExclboolVAT excluded or not
VATIncudingdoubleCost (VAT included)
ErrorOrderErrorType Enum0 NONE
1 PRODUCTNOTMAPP
2 PRODUCTMISSING
3 PRODUCTNOTSOURCE
4 PARENTPRODUCT
5 SHIPPINGNOTMAPP
6 SHIPPINGNOTFOUND
7 PROCESSORDERERROR
8 RESTRICTEDPRODUCT
9 OUTOFSTOCK
10 OTHERERROR
11 PAYMENTERROR
12 RESTRICTEDLOCATION
13 EMAIL_REQUIED
14 PHONE_REQUIED
AppProductIDstringSupplier product reference number
sPricedoubleSupplier product price

OrderOption

Field NameData TypeDescription
NamestringAttribute name
ValuestringAttribute value
IsPriVATeboolSet to false

Order Request sample

{This is a simple Order request but you can get other fields from the Order as provIDed in the above tables}

{
"AvasamID": "db21e331-cda6-4e4c-9882-b57fbc6338f8",
"LocationID": "00000000-0000-0000-0000-000000000000",
"LocationName": "Default",
"Orders": [
{
"_ID": "766d4745-54ee-40e4-9e6c-5907d380c1c3",
"Number": "11111-40-696185",
"SellerRef": "#1019",
"SellerOrderID": "5306621591855",
"SellerOtherRef": "5306621591855",
"Channel": "Shopify",
"Account": "test.myshopify.com",
"SellerID": "f111a9c4-5cdb-47f8-8a33-454ec5c84d54",
"Customer":
{
"Name": "Test Ganley",
"Address":
{
"EmailAddress": "",
"Address1": "5 Grendon Drive",
"Address2": "",
"Address3": "",
"Town": "Sutton Coldfield",
"Region": "England",
"PostCode": "B73 6QA",
"Country": "United Kingdom",
"FullName": "Test Ganley",
"Company": "",
"PhoneNumber": "987654321",
"CountryID": ""
},
"BillingAddress":
{
"EmailAddress": "",
"Address1": "5 Grendon Drive",
"Address2": "",
"Address3": "",
"Town": "Sutton Coldfield",
"Region": "England",
"PostCode": "B73 6QA",
"Country": "United Kingdom",
"FullName": "Amy Ganley",
"Company": "",
"PhoneNumber": "",
"CountryID": ""
}
},
"Shipping":
{
"ShippingName": "Expedited Tracked ( 1 to 2 days)",
"ShippingProvIDer": "Royal Mail",
"ShippingID": "Royal Mail Tracked delivery 24",
"Weight": 0.384,
"Total": 6.07,
"VATPer": 20.0,
"VAT": 1.01,
"TrackingNumber": null,
"TrackingURL": null,
"MetaData": null
},
"Option":
{
"Name": null,
"Value": null,
"IsPriVATe": false
},
"Items":
[
{
"ItemID": "c0743ad6-f425-4b98-b32f-7eb5b5b2891e",
"SKU": "N11538",
"Title": "Jessica Rabbit Plus Vibrator Purple",
"Barcode": "5060211963919",
"RefNumber": "46830513979695_6245072240943_13959438041391",
"Qty": 1,
"UnitPrice": 15.6,
"VATPer": 20.0,
"VAT": 3.12,
"DiscountPer": 0.0,
"Discount": 0.0,
"SubTotal": 15.6,
"Total": 18.72,
"authkey": "GB0100999",
"OSKU": "S036662968",
"OTitle": "Jessica Rabbit Plus",
"OPrice": 34.99,
"OVAT": 0.0,
"ODiscountPer": 0.0,
"ODiscount": 0.0,
"OSubTotal": 0.0,
"OTotal": 34.99,
"ReturnQuantity": 0,
"Reason": null,
"CostIncTax": 0.0,
"Weight": 0.384,
"Height": 0.0,
"WIDth": 0.0,
"Depth": 0.0,
"MetaData": null,
"Option": []
}
],
"VAT": 3.12,
"SubTotal": 15.6,
"Total": 24.79,
"Discount": 0.0,
"DiscountPer": 0.0,
"Surcharge": 0.0,
"Error": [],
"Status": 14,
"ExpDatetime": "0001-01-01T00:00:00",
"MetaData": {},
"Histories":
[
{
"Name": "Stock S036662968",
"Action": "1",
"On": "2023-05-19T18:43:39.774Z"
}
],
"Created": "2023-05-19T18:43:38.561Z",
"Dispatch": "2023-05-19T18:43:38.561Z",
"LastUpdate": "2023-05-19T18:43:43.944Z",
"IsCreditNotes": false,
"ReturnStatus": "",
"PaymentStatus": "PaID",
"Currency": "GBP",
"DespatchBy": "2023-05-22T23:59:00Z",
"Notes": [],
"AvasamID": null,
"SupplierRef": "",
"SupplierOrderID": "",
"SupplierOtherRef": ""
}
]
}

Response

Field NameData TypeDescription
HasErrorboolIf on Order created has any type of error
ErrorstringError - Details
SuccessList(Dictionary(string, string))Successful Order details
IssueList(Dictionary(string, string))Issue with Order - details
{
"HasError": false,
"Success":
[
{
"OrderID": "11111-40-696185",
"Number": "11111-40-696185",
"AppNumber": "8782322323131",
"AppID": "8782322323131"
}
],
"Issue": null,
"Error": ""
}

Get processed Order

Request

Field NameData TypeDescription
AvasamIDstringAvasam supplier ID
LocationIDstringStock and Order location ID
LocationNamestringStock and Order Location name
OrdersRefList(string)()List of Order references for dispatch
{
"AvasamID": "db21e331-cda6-4e4c-9882-b57fbc6338f8",
"LocationID": "00000000-0000-0000-0000-000000000000",
"LocationName": "Default",
"OrdersRef":
[
"2011651"
]
}

Response

Field NameData TypeDescription
HasErrorboolIf any error occurs in Order dispatch response
OrdersList(ProcessOrderDetail)List of all dispatched Order details from supplier
ErrorstringError in detail if any error occurred

ProcessOrderDetail

Field NameData TypeDescription
OrderRefstringSupplier Order number
IsProcessboolIs Order processed by supplier or not
TrackingNumberstringTracking number detail
ServiceNamestringOrder service name
ProcessOnDateTimeOrder process on date
VendorstringVendor name
IDstringSupplier Order number
{
"HasError": false,
"Orders":
[
{
"OrderRef": "2011651",
"IsProcess": true,
"TrackingNumber": "FR012750412GB",
"ServiceName": "Royal Mail",
"ProcessOn": "2023-05-22T10:26:29+00:00",
"Vendor": "royal-mail",
"ID": "2011651"
}
],
"Error": null
}

Get Products

Request

Field NameData TypeDescription
AuthkeystringSupplier code
AvasamIDstringSupplier Avasam ID
LocationIDstringProduct location ID
SessionTokenstringProduct session ID(authorisation token)
TransactionIDstringImport ID
{
"AvasamID": "db21e331-cda6-4e4c-9882-b57fbc6338f8",
"LocationID": "00000000-0000-0000-0000-000000000000",
"SessionToken": "b122451a-a3fc-4c50-b1bd-1705c2275b42",
"Authkey": "GB0100999",
"TransactionID": "ced360b7-e0ef-47ab-8ca3-2cb2c68c2c9d"
}

Response

Field NameData TypeDescription
dataList(Products)List of products from channel

Products

Field NameData TypeDescription
ProductIDstringSKU
AppRefString(GUID)GuID for SKU
ProductCodestringNot required(leave blank)
UserIDstringAvasam user ID
CategorystringAvasam category ID
TitlestringProduct title
ConditionstringProduct condition ex. New
BrandstringProduct brand
MPNstringProduct MPN
BarCodestringProduct barcode
StockQuantityintProduct Qty
PriceExclVATdoubleProduct price exc. VAT
RRPExclVATdoubleProduct RRP exc. VAT
VAT%RatedoubleProduct VAT in %
ModelstringProduct Model
ColourstringProduct Color
SizestringProduct size
ProductWeightdecimalProduct Weight
ProductHeightdecimalProduct Height
ProductWIDthdecimalProduct Width
ProductDepthdecimalProduct Depth
ProductTypestringProduct Type ex. If product is a parent SKU then Main should be the text, If product is single SKU then text should be blank, If product Is a child SKU then set the text as Variant
ParentProductIDstringIf SKU is a child than set this field as the Parent SKU, otherwise leave blank
VariantTypestringVariant type, eg If product Is a variation than it should be a variant type, like color & size or color & model etc. based on the Avasam supplier variation mapping
ProductPDFURLstringProduct PDF URL
ProductVIDeoURLstringProduct video URL
ShortDescriptionstringProduct short description
LongDescriptionstringProduct long description
WarningstringError note
ImageURL1stringImage URL 1
ImageURL2stringImage URL 2
ImageURL3stringImage URL 3
ImageURL4stringImage URL 4
ImageURL5stringImage URL 5
ImageURL6stringImage URL 6
ImageURL7stringImage URL 7
ImageURL8stringImage URL 8
AttributeName1stringProduct attribute name 1
AttributeValue1stringProduct attribute value 1
AttributeName2stringProduct attribute name 2
AttributeValue2stringProduct attribute value 2
AttributeName3stringProduct attribute name 3
AttributeValue3stringProduct attribute value 3
AttributeName4stringProduct attribute name 4
AttributeValue4stringProduct attribute value 4
AttributeName5stringProduct attribute name 5
AttributeValue5stringProduct attribute value 5
AttributeName6stringProduct attribute name 6
AttributeValue6stringProduct attribute value 6
AttributeName7stringProduct attribute name 7
AttributeValue7stringProduct attribute value 7
AttributeName8stringProduct attribute name 8
AttributeValue8stringProduct attribute value 8
AttributeName9stringProduct attribute name 9
AttributeValue9stringProduct attribute value 9
[
{
"ProductID": "N12170",
" AppRef ": "2036b357-84df-468a-8260-83cf29a46bd0",
"ProductCode": "",
"UserID": " db21e331-cda6-4e4c-9882-b57fbc6338f8",
"Category": "22",
"Title": "LELO Ella Silicone",
"Condition":"New",
"Brand":"Apple",
"MPN":"54543534",
"BarCode": "7350022270930",
"StockQuantity": 0,
"PriceExclVAT": 22.45,
"RRPExclVAT": 29.45,
"VAT%Rate": 20.0,
"Model": "",
"Colour": "Red",
"Size": "",
"ProductWeight": 0.37,
"ProductHeight": 0.39,
"ProductWIDth": 0.0,
"ProductDepth": 0.0,
"ProductType": "Variant",
"MinimumLevel": 1,
"ParentProductID": “UK123”,
"VariantType": "Colour",
"ProductPDFURL": "Variant",
"ProductVIDeoURL": 1,
"ShortDescription": "This is short description",
"LongDescription": "This is long description",
"Warning": "",
"ImageURL1": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png",
"ImageURL2": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png",
"ImageURL3": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png",
"ImageURL4": "",
"ImageURL5": "",
"ImageURL6": "",
"ImageURL7": "",
"ImageURL8": "",
"AttributeName1": "PackageType",
"AttributeValue1": "Bundle",
"AttributeName2": "Unitoff",
"AttributeValue2": "1",
"AttributeName3": "",
"AttributeValue3": "",
"AttributeName4": "",
"AttributeValue4": "",
"AttributeName5": "",
"AttributeValue5": "",
"AttributeName6": "",
"AttributeValue6": "",
"AttributeName7": "",
"AttributeValue7": "",
"AttributeName8": "",
"AttributeValue8": ""
}
]

Get Price

Request

Field NameData TypeDescription
AuthkeystringSupplier code
AvasamIDstringSupplier’s Avasam ID
LocationIDstringSupplier product location ID
SessionTokenstringSession token(Authorisation token)
{
"AvasamID": "db21e331-cda6-4e4c-9882-b57fbc6338f8",
"LocationID": "00000000-0000-0000-0000-000000000000",
"SessionToken": "b122451a-a3fc-4c50-b1bd-1705c2275b42",
"Authkey": "GB0100999"
}

Response

Field NameData TypeDescription
AuthkrystringSupplier code
IsUpdateRRPboolSet as false
ItemsList(PriceUpdateItems)List of price update items

PriceUpdateItems**

Field NameData TypeDescription
SKUstringAvasam SKU
PricedoubleProduct price ex. VAT
RRPdoubleProduct RRP , set as 0 if you don’t have an RRP
{
"AuthKey": "GB0100999",
"Items":
[
{
"Price": 30.55,
"SKU": "N8481",
"RRP": 40.55
},
{
"Price": 35.99
"SKU": "N12160",
"RRP": 47.66
}
],
"IsUpdateRRP": false
}

Get Stock

Request

Field NameData TypeDescription
AuthkeystringSupplier code
AvasamIDstringSupplier Avasam ID
LocationIDstringProduct location ID
{
"PageNumber": 1,
"LocationID": "00000000-0000-0000-0000-000000000000",
"AuthorizationToken": "db21e331-cda6-4e4c-9882-b57fbc6338f8"
}

Response

Field NameData TypeDescription
HasMorePagesboolSet as false
ProductsList(StockProduct)List of products

StockProduct

Field NameData TypeDescription
IDstringProduct SKU
SKUstringProduct SKU
QtyintProduct stock level
{
"Error": null,
"IsError": false,
"HasMorePages": false,
"Products":
[
{
"_ID": "N8481",
"SKU": "N8481",
"Qty": 0
},
{
"_ID": "N12160",
"SKU": "N12160",
"Qty": 47
}
]
}