Sales Order API is used to create sales order.
These are form parameters:
Parameter | Data Type | Required/Optional | Description |
---|---|---|---|
SecureKey | int | Required | It is a Unique key for accessing the API. For secure key email to support team. |
Sales Order Number | String | Required | Sales Order Number |
Warehouse | String | Required | Warehouse code. |
Products | String | Required |
Products list in json format. For eg: [{ "measurmentUnit":"unit of measurement", "quantity":"10", "price":"12", "product_sku":"BELT" }, { "measurmentUnit":"unit of measurement", "quantity":"10", "price":"12", "product_sku":"BOX" }] |
Customer Code | String | Required | Existing customer code if the sales order is of that existing customer. |
Receiver Name | String | Required | Receiver’s name. |
Shipping Address | String | Required | Receiver’s address |
Shipping City | String | Required | Receiver’s city |
Shipping State | String | Required | Receiver’s state |
Shipping Country | String | Required | Receiver’s country code |
Shipping Pincode | String | Required | Receiver’s pincode |
Shipping Phone | String | Required | Receiver’s phone |
Customer Name | String | Required if customerCode is not there | If customer code is valid then customer’s name property is optional otherwise required. |
Customer Address | String | Required if customerCode is not there | If customer code is valid then customer’s address property is optional otherwise required. |
Customer City | String | Required if customerCode is not there | If customer code is valid then customer’s city property is optional otherwise required. |
Customer State | String | Required if customerCode is not there | If customer code is valid then customer’s state property is optional otherwise required. |
Customer Country | String | Required if customerCode is not there | If customer code is valid then customer’s country code property is optional otherwise required. |
Customer Pincode | String | Required if customerCode is not there | If customer code is valid then customer’s pincode property is optional otherwise required. |
Customer Phone | String | Required if customerCode is not there | If customer code is valid then customer’s phone property is optional otherwise required. |
Customer Email | String | Optional | Customer’s email |
Create Invoice | String | Optional | Takes value true or false.If user wants to create sales invoice with sales order simultaneously then give true. If user don’t want to create sales invoice then give ‘false’ or dont give this parameter in API. |
Username | String | Optional | This parameter is mandatory only when create invoice is true. |
eCommerce Site | String | Optional | This is optional parameter. |
Carrier Code | String | Optional | Carrier code |
Carrier Product Code | String | Optional | Carrier product code |
Payment Type | String | Required | It takes values as Prepaid / COD. |
COD Amount | String | Optional | Mandatory if payment type is COD. |
COD Amount Currency | String | Optional | Mandatory if payment type is COD. |
Duty Paid By | String | Optional | It takes values Sender / Receiver. |
withoutstock | String | Optional | Set the the parameter in case you want to create sales order without available stock. |
salesOrderType | Optional | Return or Regular By default it’s regular | |
receiverCode | Optional | By default 00000 | |
withoutstock | String | Optional | Set the the parameter in case you want to create sales order without available stock. |
Products | Required | [{ "measurmentUnit":"Pieces", "quantity":"3", "price":"10", "product_sku":"TEST1","salesInvoiceAmount":"25" }, { "measurmentUnit":"Pieces", "quantity":"1", "price":"100", "product_sku":"ADIDASSHOE1001","salesInvoiceAmount":"95" }] | |
deliveryDate | Optional | Yyyy-mm-dd format | |
deliveryFromTime | Optional | Hh:mm:ss am/pm | |
deliveryToTime | Optional | Hh:mm:ss am/pm |
ON SUCCESS
{
"message": "Sales order successfully created.",
"messageType": "Success",
"salesOrderNumber": "SO0008"
}
ON ERROR
{
"message": "Record already exists by this sales order number",
"messageType" : "Error"
}
Error Messages | Description |
---|---|
Add Warehouse | When warehouse details is missing from the request. |
Product Details Missing | When product json is missing from the request. |
Customer Name Missing | When there is no customer code and customer’s name is also missing. |
Receiver Name Missing | Receiver Name is not given. |
Shipping City Missing | Shipping City is not given. |
Shipping State Missing | Shipping State is not given. |
Shipping Country Missing | Shipping Country is not given. |
Shipping Pincode Missing | Shipping Pincode is not given. |
Shipping Phone Missing | Shipping Phone is not given. |
Customer Address Missing | When there is no customer code and customer address is also not given. |
Customer City Missing | When there is no customer code and customer city is also not given. |
Customer State Missing | When there is no customer code and customer state is also missing. |
Customer Country Missing | WWhen there is no customer code and customer country is also not given. |
Customer Pincode Missing | When there is no customer code and customer pincode is also not given. |
Customer Phone Missing | When there is no customer code and customer phone is also not given. |
Invalid Warehouse Detail | When given warehouse code does not exist. |
Customer Details Missing | When provided customer code is invalid. |
Product Code is not Available | If the product sku code is invalid or blank. |
import java.util.Map;
public class SalesOrderCreation {
public static void main(String[] args) throws IOException {
params.put("receiverName", "John");
}
import json
access_url = "https://api.logixplatform.com/Rachna/webservice/v2/SalesOrder"
params = {'SecureKey' : 'secure_key'}
}])
"products":products
headers = {'Content-Type': 'application/x-www-form-urlencoded', 'AccessKey' : 'logixerp'}