AnsweredAssumed Answered

Bad request (Status 400) Unrecognized field "dataSourceid" - Create Term

Question asked by md23339 on Nov 22, 2016
Latest reply on Nov 22, 2016 by Peter Love

Hello,

 

I am starting to use the BB Rest API. I have a running console application.  I have been able to READ data just fine but I can't create or update any data.  Below is my example JSON that is being posted and the error data.  I can't figure out how to create any terms.

 

{
   "id":null,
   "externalId":"TestTerm",
   "dataSourceid":"NWCDEV",
   "name":"TestTerm1",
   "description":"Some test Term",
   "availability":{
      "available":"No",
      "duration":{
         "type":"Continuous",
         "start":null,
         "end":null,
         "daysOfUse":0
      }
   }
}

 

Error code received.

Could not read document: Unrecognized field "dataSourceid" (class 1.terms.TermTOPubV1), not marked as ignorable (6 known properties: "dataSourceId", "externalId", "id", "description", "name", "availability"])
 at [Source: @13684229; line: 1, column: 52] (through reference chain: 1.terms.TermTOPubV1["dataSourceid"]); nested exception is : Unrecognized field "dataSourceid" (class 1.terms.TermTOPubV1), not marked as ignorable (6 known properties: "dataSourceId", "externalId", "id", "description", "name", "availability"])
 at [Source: @13684229; line: 1, column: 52] (through reference chain: 1.terms.TermTOPubV1["dataSourceid"])

 

Here is an example of a row when I use the READ.

      {
         "id":"_9_1",
         "externalId":"6df988b7849b46909ebe7e04dc86ba1c",
         "dataSourceId":"_2_1",
         "name":"FA2011",
         "description":"<p>Fall 2011</p>",
         "availability":{
            "available":"No",
            "duration":{
               "type":"DateRange",
               "start":"2011-08-23T05:00:00.000Z",
               "end":"2012-01-01T05:59:59.000Z"
            }
         }
      }

Outcomes