Function
The Sale Order (SO) Add API is used to add a new SO.
URL
{Root URL}/API/SO/Add/{API Key} |
Parameters
Parameter | Description | Required | Comment | |
1 | SoNo | Sales order number | Y | Must be unique. When adding a new sales order it can be left blank. |
2 | custNo | Customer number | Y | Ten digits, filled to the left with "0." |
3 | blinkAdd | Billing link | N | |
4 | slinkAdd | Shipping address link | N | |
5 | orderDate | Order date | Y | Defaults to the current date. Can be changed using the following date format: MM-DD-YYYY. |
6 | POAck | Purchase order acknowledgment | N | Can be "1" or "0." |
7 | PoNo | Purchase order number | N | Enter the purchase order number related to the sales order. |
8 | SONote | Sales order note | N | User input |
9 | FOB | FOB | N | Can be "ORIGIN-CUSTOMER P/U," "ORIGIN-SHIP," or "DESTINATION." |
10 | ShipVia | Ship via | N | Defaults with to customer. Can be "COMPANY TRUCK," CUST PICK UP," "UPS-GRND TRACK," "UPS-BLUE," "UPS-RED," "FEDX-P1," or "FEDX-STD." |
11 | shipCharge | Shipping charge | N | Can be "NO CHARGE," "PREPAY/BILL CUS," "SET RATE:UPS-BR," "SET RATE:UPS-BL," "SET RATE:UPS-RD," or "FEDX-1" |
12 | SoFoot | Sales order footnote | N | User entry and attaches a footnote to the sales order. |
13 | DELIV_TIME | Delivery time | N | |
14 | Buyer | Buyer name | N | Must be a pre-existing customer. |
15 | ATTENTION | Attention person | N | Must be a contact for the customer. |
16 | SOAMTDSCT | Sales order discount | N | |
17 | SOAPPROVAL | Sales order approval | N | Can be "0" or "1." If "1," you must enter SOAPPRVINIT. |
18 | SOAPPRVINIT | Sales order approval initial | N | Must be an approved user's initials. |
19 | SOAPPRVDT | Sales order approval date | N | The system automatically uses the current date. |
20 | ACKPO_DOC | Acknowledge PO doc | N | Adds a PO acknowledge doc |
21 | TERMS | Terms | N | Defaults from customer information, and can be changed by the user. |
22 | BILLACCOUNT | Bill account | N | The 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" } |