# Postman API: Update Collection: what is the correct json schema of response?

**URL:** <https://community.postman.com/t/postman-api-update-collection-what-is-the-correct-json-schema-of-response/2013>\
**Category:** Help Hub\
**Tags:** schema, postman-api, updatecollection-api\
**Created:** [July 3, 2018, 9:41am UTC](https://community.postman.com/t/postman-api-update-collection-what-is-the-correct-json-schema-of-response/2013 "2018-07-03T09:41:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timmy\_Lin](https://avatars.discourse-cdn.com/v4/letter/t/7ab992/32.png) [@Timmy\_Lin](https://community.postman.com/u/Timmy_Lin)\
**Post date:** [July 3, 2018, 9:41am UTC](https://community.postman.com/t/postman-api-update-collection-what-is-the-correct-json-schema-of-response/2013/1 "2018-07-03T09:41:55Z")

</div>

Hi,

I am using Postman API to update my collection which was working fine before I add “response” to my collection schema.

After I add “response” data to my json file, the Update Collection API keep failing:

> ```
> {
> "error": {
> "name": "malformedRequestError",
> "message": "Data does not match any schemas from \"oneOf\" at item.0"
> }
> }
> 
> ```

**However, if I manually import this json on Postman UI, it’s imported properly, and I can see the example response properly as well.**

**And if I remove all the content from “response” array, the Update Collection API works fine again.**  
Therefore, I am doubting that Update Collection API needs different valid json schema of “response”?

Below is the example content of my json file:

> ```
> {
> "collection": {
> "info": {
> "name": "collection_name",
> "description": "2018-07-03",
> "schema": "https://schema.getpostman.com/json/collection/v2.10/collection.json",
> "_postman_id": "id"
> },
> "item": [{
> "name": "request_name",
> "request": {
> "method": "GET",
> "header": [],
> "body": {
> 					
> },
> "url": {
> "raw": "/a/b/c?d=1&e={{E}}&f=f",
> "host": ["{{PREFIX}}"],
> "path": ["a",
> "b",
> "c"],
> "query": [{
> "key": "d",
> "value": "1"
> },
> {
> "key": "e",
> "value": "{{E}}"
> },
> {
> "key": "f",
> "value": "f"
> }]
> },
> "description": ""
> },
> "response": [{
> "name": "Response",
> "originalRequest": {
> "method": "GET",
> "header": [],
> "body": {
> 						
> },
> "url": {
> "raw": "/a/b/c?d=1&e={{E}}&f=f",
> "protocol": "http",
> "host": ["{{PREFIX}}"],
> "port": "8080",
> "path": ["a",
> "b",
> "c"],
> "query": [{
> "key": "d",
> "value": "1"
> },
> {
> "key": "e",
> "value": "{{E}}"
> },
> {
> "key": "f",
> "value": "f"
> }]
> }
> },
> "status": "OK",
> "code": "200",
> "_postman_previewlanguage": "json",
> "header": [],
> "cookie": [],
> "body": "{\"status_code\": \"200\", \"err_code\": \"0\", \"data\": \"1530577226497335\", \"desc\": \"\"}"
> }]
> }]
> }
> }
> 
> ```

Can any one tell me what is the correct json schema of response here? or anything wrong in my response data?

---

<div class="post-metadata">

**Author:** ![Timmy\_Lin](https://avatars.discourse-cdn.com/v4/letter/t/7ab992/32.png) [@Timmy\_Lin](https://community.postman.com/u/Timmy_Lin)\
**Post date:** [July 3, 2018, 10:07am UTC](https://community.postman.com/t/postman-api-update-collection-what-is-the-correct-json-schema-of-response/2013/2 "2018-07-03T10:07:50Z")

</div>

Nevermind, I figure out it’s caused by the typo:

> “code”: “200”,  
> code value should be integer …  
> “code”: 200,

this took me 1 hour to find out … so stupid…
