Error occurring while using post api Openmrs

1.By using Rest API of openmrs i am getting error.

Request: { “type”: “testorder”, “patient”: “7702215b-84a0-4572-9693-cdf99e6fe6b1”, “concept”: “c404080e-1d70-11e9-aae7-309c237e754b”, “orderer”: “9e28cb36-0df4-4972-b375-4a5ff88e39d9”, “encounter”: “95622c56-761c-4e63-894d-c35034a35def”, “careSetting”: “c365e560-c3ec-11e3-9c1a-0800200c9a66” }

Response: https://pastebin.com/nkJacYGe

2.I am not able to find “orderer” column in my openmrs database,There might be possibility of missing this table in database. Please give me name of columns of Table containing this column "orderer"

PLZ reply fast.

Which url are you posting this to?

I m using this API : localhost:8080/openmrs/ws/rest/v1/order

Post it again and share the new error log at pastebin.com

API : localhost:8080/openmrs/ws/rest/v1/order

Request: { “type”: “testorder”, “patient”: “7702215b-84a0-4572-9693-cdf99e6fe6b1”, “concept”: “c404080e-1d70-11e9-aae7-309c237e754b”, “orderer”: “9e28cb36-0df4-4972-b375-4a5ff88e39d9”, “encounter”: “95622c56-761c-4e63-894d-c35034a35def”, “careSetting”: “c365e560-c3ec-11e3-9c1a-0800200c9a66” }

Response: https://pastebin.com/nkJacYGe

Did you just resend this? The error message does not match with your post data. That is why i specifically said that you post it again and share the exact new error log.

API : localhost:8080/openmrs/ws/rest/v1/order

Request: { “type”: “testorder”, “patient”: “7702215b-84a0-4572-9693-cdf99e6fe6b1”, “concept”: “c404080e-1d70-11e9-aae7-309c237e754b”, “orderer”: “9e28cb36-0df4-4972-b375-4a5ff88e39d9”, “encounter”: “95622c56-761c-4e63-894d-c35034a35def”, “careSetting”: “c365e560-c3ec-11e3-9c1a-0800200c9a66” }

https://pastebin.com/E4fGwcKC

Your error log shows that you are using “orderType” instead of “type”

Creating New Order getting Error

Url Used: localhost:8080/openmrs/ws/rest/v1/order

Request:

  {
    "encounter": "95622c56-761c-4e63-894d-c35034a35def",
    "type": "testorder",
     "action": "NEW",
    "patient": "7702215b-84a0-4572-9693-cdf99e6fe6b1",
      "concept": "c404080e-1d70-11e9-aae7-309c237e754b",      
      "careSetting": "c365e560-c3ec-11e3-9c1a-0800200c9a66"
    }

Response Error Log Console : https://pastebin.com/pgGTL8Bh

Response Error Log postman :https://pastebin.com/WSRqKTUt

Reproduce this in a unit test. Here is an example: https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.10/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_10/OrderController1_10Test.java#L257-L301