Postman API update collection endpoint throws malformed request error

I’ve started working in the Postman web API and have run into an issue updating collections. I keep getting a malformedRequestError when trying to send back up the collection JSON.

What I’m wanting to be able to do is pull down the collection data via the API and save it as a JSON document, change one bit of data, then upload the collection back to my Postman account using the collections endpoints. Note: I’m not making any changes to the structure of the collection JSON returned by the get single collection endpoint, only the data within

I’m using the Postman Echo collection as an example. I have attached a link to a charles log showing what is happening. Here’s the message I receive: “Data does not match any schemas from “oneOf” at item.1” Am I not able to PUT back the same collection JSON schema on the update collection endpoint as I received from the GET single collection endpoint?

Charles log:
Charles Log

Thanks for your help!
Ryan

The problem is with the Postman API.

I’m also facing the issues with the PUT of collections.

From my experience this happens cause Postman API changes the collection after uploading in a way that it may not be valid according to the schema anymore.

Small example: use a description with an empty string. After upload the description now has a value of null. As this is no valid description according to the schema you get a malformed json error.

There are also some fields added by Postman itself, which are not described in the schema and also causes the schema validation to fail.