Skip to main content

When using the REST Service Broker with a Swagger 2.0 definition, the put operation is failing, while the get operation is successful. Testing the put operation in the Swagger Editor, both operations are successful.

 

Error:

13617iDAA08BF452D40F08.png

 

Order Data:

e  {    "orderNumber": "11379001",    "customerNumber": "022547099000",    "customerName": "SomeCustomer",    "customerBillToStreetAddress1": "123 Main Street",    "customerBillToStreetAddress2": "Suite 100",    "customerBillToCity": "Phoenix",    "customerBillToState": "AZ",    "customerBillToZip": "85001",    "customerShipToStreetAddress1": "500 S 1st Street",    "customerShipToStreetAddress2": "Suite 200",    "customerShipToCity": "Fresno",    "customerShipToState": "CA",    "customerShipToZip": "93650"  }]

Jason, it looks like you are not serializing the OrderData first before calling the PutOrderNumber method. You can't just add your own json data, it needs to be serialized by K2 first.

 

Select the "Serialize" method and enter all of the order data info in and execute. Take the output of that and use in the PutOrderNumber method.


Reply