Function

  

The Sale Order (SO) Add API is used to add a new SO.


  

URL

   

{Root URL}/API/SO/Add/{API Key}

   

    

Parameters



ParameterDescriptionRequiredComment
1SoNoSales order numberYMust be unique. When adding a new sales order it can be left blank. 
2custNoCustomer numberYTen digits, filled to the left with "0."
3blinkAddBilling linkN
4slinkAddShipping address linkN
5orderDateOrder dateYDefaults to the current date. Can be changed using the following date format: MM-DD-YYYY.
6POAckPurchase order acknowledgmentNCan be "1" or "0."
7PoNoPurchase order numberNEnter the purchase order number related to the sales order.
8SONoteSales order noteNUser input
9FOBFOBNCan be "ORIGIN-CUSTOMER P/U," "ORIGIN-SHIP," or "DESTINATION."
10
ShipViaShip viaNDefaults with to customer. Can be "COMPANY TRUCK," CUST PICK UP," "UPS-GRND TRACK," "UPS-BLUE," "UPS-RED," "FEDX-P1," or "FEDX-STD."
11shipChargeShipping chargeNCan be "NO CHARGE," "PREPAY/BILL CUS," "SET RATE:UPS-BR," "SET RATE:UPS-BL," "SET RATE:UPS-RD," or "FEDX-1"
12SoFoot Sales order footnoteNUser entry and attaches a footnote to the sales order.
13DELIV_TIMEDelivery timeN
14BuyerBuyer nameNMust be a pre-existing customer.
15ATTENTIONAttention personNMust be a contact for the customer.
16SOAMTDSCTSales order discountN
17SOAPPROVALSales order approvalNCan be "0" or "1." If "1," you must enter SOAPPRVINIT.
18SOAPPRVINITSales order approval initialNMust be an approved user's initials.
19SOAPPRVDTSales order approval dateNThe system automatically uses the current date.
20ACKPO_DOCAcknowledge PO docNAdds a PO acknowledge doc
21TERMSTermsNDefaults from customer information, and can be changed by the user.
22BILLACCOUNTBill accountNThe system defaults the customer information and can be changed by the user.

   

    

Example Strings

  

Add New SO (No items)

  

URL

  

?SoNo=SONO?custNo=CUSTNO

  

  

JSON

  

{

"SoNo":"SONO",

"custNo":"CUSTNO"

}

 

  

A successful add should return the following: 

  

{

"$id":"1",

"Code":"200",

"Message":"Sales Order added successfully.",

"SessionId":"null",

"IsValidUser":"true",

"ResponseObject":"null"

}

 

 

Add New SO with line items 


JSON

  

{

    "custNo": "0000000003",

    "SODETAILList": [

        {

        "ord_qty": "10",

        "uniq_key":"_01F15T1HK"

    },

    {

        "ord_qty": "10",

        "uniq_key":"_01F15T1HK"

    }

    ]

}


  

A successful add should return the following: 


{

    "$id": "1",

    "Code": "200",

    "Message": "Sales Order added successfully.",

    "SessionId": "null",

    "IsValidUser": "true",

    "ResponseObject": {

        "$id": "2",

        "Sono": "0000001133"

    }

}


  

Common Errors

 

URL Error

  

If there is a problem with the URL, the system will return an HTTP error:


{

"$id": "1",

"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/SOAdd/123456789'.",

"MessageDetail": "No type was found that matches the controller named 'SOAdd'."

}

    

   

API Key Error

  

{

"$id": "1",

"Code": "403",

"Message": "Invalid API Key.",

"SessionId": "null",

"IsValidUser": "false",

"ResponseObject": "null"

}

   

  

Parameter Error

   

If there is an error with a parameter, the system will return an error message detailing the error:

  

{

"$id": "1",

"Code": "403",

"Message": "Sales Order add failed.Customer does not exists.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}