Function


The Purchase Order (PO) Edit function is used to add a new PO. An Item must be added to the PO tables as well. Scheduling does not need to be added at this point.


 

URL


{Root URL}/api/PO/Edit/{API KEY}


 

Parameters 



  

Parameter

Description

Required

Comment

1

supName

Supplier name

Y

 

2

PoUnique

Purchase order unique

Y


 

3

ConfName

Confirm name

N

User Input. No validation.

4

poDate

Purchase order date

N

If not entered manually. it will default to today’s date.

5

LFreightIncluded

Freight Included

N

Can be "1" or "0," default is "0."

6

Buyer

Name of the buyer

N

Has to be entered in the following format: LastName, FirstName. Must be a buyer in the system.

7

remitToLink

The link to the remit to address

N

If entered it must be a valid link.

8

confirmToLink

The link to the confirm to address

N


 

9

receiveToLink

The link to the receiving address

N

If entered it must be a valid link

10

deliveryTime

The delivery time for the receiving address

N

Must be in a 24-hour format, e.g., "13:00."

11

Terms

Payment terms for the supplier

N

Can be "NET 10," "NET 15," "NET 30," "NET 30/2% 10," "NET 45," "COD," or "NONE."

12

FOB

Freight on board

N

 

13

shipVia

The method of shipping

N

 

14

shipCharge

Supplier Shipping charges

N

 

15

shippingAmount

Shipping amount

N

The default is "0," and is entered manually.

16

isShippingTaxable

Choose whether or not the shipping is taxable

N

Can be "0" or "1," but the default is "0."

17

shippingTaxPct

The amount of shipping tax

N

The default is "0.00." If a value is entered here, then the isShippingTaxable must be set as "1."

18

billToLink

This links the record to the supplier's billing address

N

If entered it has to be a valid link.

19

PoTax

Purchase order tax

N

If a value is not provided, then the saved value will be "0"

20

PoTotal

Purchase order total

N

If a value is not provided, then the saved value will be "0"

21

PoNum

Purchase order number

N


 

22

PoItemList

Purchase order item list

N


 

23

PoStatus

Purchase order status

N


 

24

AppvName

User ID of the user who approved PO

N


 

25

FinalName

User ID of the user who approved the final approval (if two approvals are required)

N


 

26

PoNote

Purchase order note

N


 

27

PoFooter

Purchase order footer

N



 

Example Strings

   

PO Add String

  

URL


?poNUM=PONUMBER&supName=SUPPLIERNAME&POUNIQUE=POUNIQUE

  

 

JSON

 

{

"PoNUM":"PONUMBER",

"supName":"SUPPLIERNAME",

"POUNIQUE":"POUNIQUE",

}


  

A successful request should result in:

  

{

"$id": "1",

"Code": "200",

"Message": "Purchase Order edited successfully.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}

  

  

Common Errors

    

Incorrect Parameters   

  

If there is an error with an entered parameter, the system should return a message detailing which parameter there is a problem with:

   

{

"$id": "1",

"Code": "403",

"Message": "Purchase Order edit failed.UniqSupNo does not exists in SUPINFO Table.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}


  

JSON Error

 

If there is an error in the JSON string, the system will return the following error message:


{

"$id": "1",

"Code": 403,

"Message": "'Purchase Order' Object is not initialized properly.",

"SessionId": "null",

"IsValidUser": "true",

"ResponseObject": "null"

}