Running into this problem:
{"error":{"type":"MODEL_ID_NOT_FOUND","message":"Record not found"}}
I am doing a PUT request, so I don’t understand why a record needs to be found :confused:
PUT assumes your record already exist, that was the problem. There seems to be no way to insert a or update a record if it already exist (like MySQL insert into ... on duplicate key update
) in one API call.
The above issue got resolved by switching to POST
instead of PUT
and now I am getting the following error:
{"error":{"type":"INVALID_VALUE_FOR_COLUMN","message":"Field \"lastUpdated\" cannot accept the provided value"}}
I am passing a timestamp (large integer) for a single line text
field. Specifying typecast:true
or typecast:false
doesn’t do anything. Here is the json data posted:
{"typecast":false,"fields":{"symbol":"WPC","sector":"finance","lastUpdated":1565899200000,"lastSalePrice":87.955}}
Weirdly enough typecast
doesn’t do anything. As you can see above, I was posting an integer and a float, both to be inserted into a single line text
field, but that caused the error. Switching the field type to number
solved the problem.