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 Name | Data Type | Description |
---|---|---|
AvasamID | string | Avasam supplier ID |
LocationID | String | Order location ID |
LocationName | string | Order Location name |
Orders | List(AvasamOrder) | List of Order |
AvasamOrder
Field Name | Data Type | Description |
---|---|---|
ID | string | Avasam Order ID |
Number | string | Avasam Order Number |
SellerRef | string | Avasam Seller Order ref. |
SellerOrderID | string | Avasam Seller Order ref ID |
SellerOtherRef | string | Avasam Seller other Order ref. |
SupplierRef | string | Avasam Supplier Order ref |
SupplierOrderID | string | Avasam Supplier Order ref ID |
SupplierOtherRef | string | Avasam Supplier other Order ref. |
IsChild | bool | Is Order a child Order or not |
ParentID | string | If Order is a child, parent Order ID |
IsParent | bool | Is Order a parent Order or not |
Status | OrderStatus | Order 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 | ||
PaymentStatus | string | Order payment status: PaID or UnpaID |
Channel | string | Order channel name |
Account | string | Order channel’s account name |
ExternalChannel | string | Seller’s external Order channel name |
ExternalAccount | string | Seller’s external Order channel’s account name |
InvID | string | Order’s invoice ID |
InvNumber | string | Order’s invoice number |
SellerID | string | Seller ID |
AuthKey | string | Supplier code |
Customer | OrderCustomer | Customer’s Address information |
Shipping | OrderShipping | Customer’s Shipping information |
Items | List(OrderItem) | Order’s items information |
UnpiadAmount | double | Order’s UnpaID amount |
PaIDAmount | double | Order’s PaID amount |
VAT | double | Order’s VAT |
SubTotal | double | Order’s subtotal |
Total | double | Order’s total |
Discount | double | Order’s discount |
DiscountPer | double | Order’s discount in % |
Surcharge | double | Order’s invoice’s surcharge |
Processed | bool | Is Order dispatched or not |
Notes | List(OrderNotes) | Order’s Notes information |
DespatchBy | DateTime | Order expected dispatched time |
Created | DateTime | Order’s created date |
ChRecdDate | DateTime | Channel’s Order received date |
Dispatch | DateTime | Order’s dispatched date |
LastUpdate | DateTime | Order last update date |
Currency | string | Order’s currency |
OrderCustomer
Field Name | Data Type | Description |
---|---|---|
ID | string | Order ID |
refID | string | Reference ID |
Name | string | Customer Name |
Address | Address | Address |
BillingAddress | Address | Address |
IsEncrypt | bool | If address is encrypted or not |
Obfuscation | bool | If address is Obfuscated or not |
on | DateTime | Date & time of Order |
SellerID | string | Seller ID |
EncVer | string | Set text as default |
Address
Field Name | Data Type | Description |
---|---|---|
EmailAddress | string | Email address |
Address1 | string | Address 1 |
Address2 | string | Address 2 |
Address3 | string | Address 3 |
Town | string | Town |
Region | string | Region |
PostCode | string | PostCode |
Country | string | Country |
FullName | string | FullName |
Company | string | Company |
PhoneNumber | string | PhoneNumber |
CountryID | string | CountryID |
OrderShipping
Field Name | Data Type | Description |
---|---|---|
ShippingName | string | Shipping service name |
ShippingProvIDer | string | Shipping service provIDer |
ProcessProvIDer | string | Process provIDer |
ChannelService | string | Channel shipping service |
ShippingID | string | Channel shipping service ID |
Weight | double | Shipping weight |
Total | double | Shipping total |
VATPer | double | Shipping VAT in % |
VAT | double | Shipping VAT |
TrackingNumber | string | Shipping tracking number |
TrackingURL | string | Shipping tracking URL |
MetaData | Dictionary(string, string) | |
Days | string | Shipping days |
SType | string | Supplier Shipping type |
ProcessService | string | Shipping process service |
ChannelPrice | double | Channel product price |
pCode | string | Product code |
country | string | Shipping country |
OrderItem
Field Name | Data Type | Description |
---|---|---|
ItemID | string | Avasam product ID |
SKU | string | Avasam SKU |
sCode | string | Supplier SKU |
Title | string | Product title |
Barcode | string | Product barcode |
RefNumber | string | Product reference number |
Qty | int | Product qty |
UnitPrice | double | Product unit price |
VATPer | double | Product VAT % |
VAT | double | Product VAT |
DiscountPer | double | Product discount in % |
Discount | double | Product discount |
SubTotal | double | Product subtotal |
Total | double | Product total |
authkey | string | Product supplier code |
OSKU | string | Product original channel SKU |
OTitle | string | Product original channel title |
OPrice | double | Product original channel price |
OVAT | double | Product original channel VAT |
ODiscountPer | double | Product original channel discount % |
ODiscount | double | Product original channel discount |
OSubTotal | double | Product original channel sub total |
OTotal | double | Product original channel total |
ReturnQuantity | int | Order return quantity |
Reason | string | Reason for returning item |
CostIncTax | double | Product cost inc. Tax |
Weight | double | Product weight |
Height | double | Product height |
WIDth | double | Product wIDth |
Depth | double | Product depth |
MetaData | Dictionary(string, string) | Metadata |
Option | List(OrderOption) | Product other option values |
VATExcl | bool | VAT excluded or not |
VATIncuding | double | Cost (VAT included) |
Error | OrderErrorType Enum | 0 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 | ||
AppProductID | string | Supplier product reference number |
sPrice | double | Supplier product price |
OrderOption
Field Name | Data Type | Description |
---|---|---|
Name | string | Attribute name |
Value | string | Attribute value |
IsPriVATe | bool | Set 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 Name | Data Type | Description |
---|---|---|
HasError | bool | If on Order created has any type of error |
Error | string | Error - Details |
Success | List(Dictionary(string, string)) | Successful Order details |
Issue | List(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 Name | Data Type | Description |
---|---|---|
AvasamID | string | Avasam supplier ID |
LocationID | string | Stock and Order location ID |
LocationName | string | Stock and Order Location name |
OrdersRef | List(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 Name | Data Type | Description |
---|---|---|
HasError | bool | If any error occurs in Order dispatch response |
Orders | List(ProcessOrderDetail) | List of all dispatched Order details from supplier |
Error | string | Error in detail if any error occurred |
ProcessOrderDetail
Field Name | Data Type | Description |
---|---|---|
OrderRef | string | Supplier Order number |
IsProcess | bool | Is Order processed by supplier or not |
TrackingNumber | string | Tracking number detail |
ServiceName | string | Order service name |
ProcessOn | DateTime | Order process on date |
Vendor | string | Vendor name |
ID | string | Supplier 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 Name | Data Type | Description |
---|---|---|
Authkey | string | Supplier code |
AvasamID | string | Supplier Avasam ID |
LocationID | string | Product location ID |
SessionToken | string | Product session ID(authorisation token) |
TransactionID | string | Import 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 Name | Data Type | Description |
---|---|---|
data | List(Products) | List of products from channel |
Products
Field Name | Data Type | Description |
---|---|---|
ProductID | string | SKU |
AppRef | String(GUID) | GuID for SKU |
ProductCode | string | Not required(leave blank) |
UserID | string | Avasam user ID |
Category | string | Avasam category ID |
Title | string | Product title |
Condition | string | Product condition ex. New |
Brand | string | Product brand |
MPN | string | Product MPN |
BarCode | string | Product barcode |
StockQuantity | int | Product Qty |
PriceExclVAT | double | Product price exc. VAT |
RRPExclVAT | double | Product RRP exc. VAT |
VAT%Rate | double | Product VAT in % |
Model | string | Product Model |
Colour | string | Product Color |
Size | string | Product size |
ProductWeight | decimal | Product Weight |
ProductHeight | decimal | Product Height |
ProductWIDth | decimal | Product Width |
ProductDepth | decimal | Product Depth |
ProductType | string | Product 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 |
ParentProductID | string | If SKU is a child than set this field as the Parent SKU, otherwise leave blank |
VariantType | string | Variant 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 |
ProductPDFURL | string | Product PDF URL |
ProductVIDeoURL | string | Product video URL |
ShortDescription | string | Product short description |
LongDescription | string | Product long description |
Warning | string | Error note |
ImageURL1 | string | Image URL 1 |
ImageURL2 | string | Image URL 2 |
ImageURL3 | string | Image URL 3 |
ImageURL4 | string | Image URL 4 |
ImageURL5 | string | Image URL 5 |
ImageURL6 | string | Image URL 6 |
ImageURL7 | string | Image URL 7 |
ImageURL8 | string | Image URL 8 |
AttributeName1 | string | Product attribute name 1 |
AttributeValue1 | string | Product attribute value 1 |
AttributeName2 | string | Product attribute name 2 |
AttributeValue2 | string | Product attribute value 2 |
AttributeName3 | string | Product attribute name 3 |
AttributeValue3 | string | Product attribute value 3 |
AttributeName4 | string | Product attribute name 4 |
AttributeValue4 | string | Product attribute value 4 |
AttributeName5 | string | Product attribute name 5 |
AttributeValue5 | string | Product attribute value 5 |
AttributeName6 | string | Product attribute name 6 |
AttributeValue6 | string | Product attribute value 6 |
AttributeName7 | string | Product attribute name 7 |
AttributeValue7 | string | Product attribute value 7 |
AttributeName8 | string | Product attribute name 8 |
AttributeValue8 | string | Product attribute value 8 |
AttributeName9 | string | Product attribute name 9 |
AttributeValue9 | string | Product 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 Name | Data Type | Description |
---|---|---|
Authkey | string | Supplier code |
AvasamID | string | Supplier’s Avasam ID |
LocationID | string | Supplier product location ID |
SessionToken | string | Session 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 Name | Data Type | Description |
---|---|---|
Authkry | string | Supplier code |
IsUpdateRRP | bool | Set as false |
Items | List(PriceUpdateItems) | List of price update items |
PriceUpdateItems**
Field Name | Data Type | Description |
---|---|---|
SKU | string | Avasam SKU |
Price | double | Product price ex. VAT |
RRP | double | Product 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 Name | Data Type | Description |
---|---|---|
Authkey | string | Supplier code |
AvasamID | string | Supplier Avasam ID |
LocationID | string | Product location ID |
{
"PageNumber": 1,
"LocationID": "00000000-0000-0000-0000-000000000000",
"AuthorizationToken": "db21e331-cda6-4e4c-9882-b57fbc6338f8"
}
Response
Field Name | Data Type | Description |
---|---|---|
HasMorePages | bool | Set as false |
Products | List(StockProduct) | List of products |
StockProduct
Field Name | Data Type | Description |
---|---|---|
ID | string | Product SKU |
SKU | string | Product SKU |
Qty | int | Product stock level |
{
"Error": null,
"IsError": false,
"HasMorePages": false,
"Products":
[
{
"_ID": "N8481",
"SKU": "N8481",
"Qty": 0
},
{
"_ID": "N12160",
"SKU": "N12160",
"Qty": 47
}
]
}