Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

MIT Navodila

:

addpurchaseorder

​​​​​​​​​​

​​​POST api/PurchaseOrder/AddPurchaseOrder


Authorization




​​Request information


Body parameters


​​Name ​Description ​Type ​Additional info
​document_id ​Import document Num. ​string
​customer_id
​string
expected_date​ datetime​
currency string​
text ​string​​
​article_id string​
​location_id ​string
​quantity decimal​
​price decimal​
 

​Request formats

{

    "orders": [

       {

          "order":{

             "document_id":"20132",

             "customer_id":"000001",

             "expected_date":"2020-03-03",

             "currency":"EUR",

             "text":"Free text",

             "line_items":[

                {

                   "article_id":"123223",

                   "location_id":"MAT",

                   "quantity":5.00,

                   "price":14.88

                },

                {

                   "article_id":"00001",

                   "location_id":"MAT",

                   "quantity":1.00,

                   "price":99.88

                }

             ]

          }

    }]}​



​Response information


​Response formats

​​Name ​Description ​Type ​Additional information
​Error {"status":1,"description":"Incorret JSON structure."}
​Error {​"status":1,"description":"document_id - the Document with this number already exists."}
​Error {"status":1,"description":"Customer ID does not exist"}
​Error ​{"status":1,"description":"Article ID does not exist"}
​Error ​{"status":1,"description":"SQL ERROR insert into NA_NA_GL"}
​Error ​{"status":1,"description":"SQL ERROR insert into NA_NA_PP"}​
​Error ​{"status":1,"description":"Unit code does not exist"}
​Error ​{"status":1,"descritption":"Location ID does not exist or is not meant for materials"}
 

​​​Confirmation response

​​Name Description​ Type​ Additional information​
​Success {"status":0,"description":"OK"}
 ​

​​​