CreateSellerOrder

Create a new order for one of your customers

Call

https://app.avasam.com/apiseeker/Order/CreateSellerOrder

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
Authkey string Authorization key for the Avasam account true
Reference Number string Avasam order reference number true
Shipping Service Name string Seller’s shipping service name as configured in Avasam true
Notes string Order notes false

 

Item list

Field name Type Description Is Required
SKU string Avasam SKU of product in order true
Stock Integer Number of products specified in order true

 

Delivery Info

Field name Type Description Is Required
Name String Recipient of order true
Address String Postal address for order order (Street and number, flat, etc true
City String Postal town or city for order true
Country String Country to deliver order true
Post Code String Postcode for order delivery true
Phone No String Contact phone number for order true
Email String Email address for order false

 

Request body

The call is structured as follows:

{
    "Authkey":"f24822fdFae74F4c",
    "ReferenceNumber":"ODS1435627",
    "Itemlist":[{
        "SKU":"Accesorry Stand Kitch",
        "Stock":2
    },
    {
        "SKU":"K312CP",
        "Stock":5
    }],
    "ShippingServiceName":"Test Demo",
    "Notes":"Test Notes 0411",
    "DeliveryInfo":{
        "Address":"UK",
        "City":"London",
        "Country":"United Kingdom",
        "Name":"Ollie",
        "PhoneNo":"09876543212",
        "PostCode":"NW10 7JB",
        "Email":"hello@avasam.com"
    }
} 

 

Response

Field name Type Description
Error Code int Error code of order response
0 = no error
1 = error
Message String Error body for order request
id Int Always returns 0

 

Response body

The response from Avasam will come in the following form:

{
"ErrorCode": 0,
"Message": "Order created successfully.",
"id": 0
}