API data PATCH error Unrecognized field: 0

I am trying to update a record in Bubble using the data API.

Here is my endpoint using a PATCH request:
https://myappxxx.bubbleapps.io/version-test/api/1.1/obj/batchtracking/1584643813360x601880385598716000

Here is my JSON:
{
'“FGBatch”: “A000026342”,
'“FGPO”: 1023644
}

Here is my error:
{“statusCode”:400,“body”:{“status”:“ERROR”,“message”:“Unrecognized field: 0”}}

I know these fields exist because I can successfully request the record using a GET request. Here is the output of the GET:

{
“response”: {
“ChartYearWeek”: “2020-15”,
“Code”: “BM50”,
“Countof”: 7,
“FCBatch”: “A000026049”,
“FCFinishDate”: “2020-04-08T00:00:00.000Z”,
“FCMatNum”: 3900079,
“FCPO”: 1022141,
“FGBatch”: “A000026342”,
“FGMatNum”: 2000030,
“FGPO”: 1023644,
“FilmCoatbyChartDate”: “2020-04-11T00:00:00.000Z”,
“FilmCoatbySchDate”: “2020-04-11T00:00:00.000Z”,
“FinishDateTime”: “2020-04-06T14:30:00.000Z”,
“Glatt”: “B Glatt DR-603”,
“GranBatch”: “A000025990”,
“GranMatNum”: 3900023,
“GranPO”: 1021527,
“ID”: 2864,
“ScheduleYearWeek”: “2020-15”,
“StartDateTime”: “2020-04-06T06:30:00.000Z”,
“TCBatch”: “A000026086”,
“TCFinishDate”: “2020-04-07T00:00:00.000Z”,
“TCMatNum”: 3900109,
“TCPO”: 1021483,
“Total”: 12,
“WUBatch”: “A000026020”,
“WUFinishDate”: “2020-04-03T00:00:00.000Z”,
“WUMatNum”: 3900049,
“WUPO”: 1021604,
“Created Date”: “2020-03-19T18:50:15.160Z”,
“Modified Date”: “2020-03-19T18:50:15.160Z”,
“_id”: “1584643815160x996994751742370000”,
“_type”: “custom.batch_tracking”
}
}
Any ideas why I am getting this unrecognized field error?

1 Like

Answer

1 Like

Any Solutions?

The header should by ‘text/plain’. That´s not the cause.
Data API - Bubble Docs.

Very strange but that did fix the issue. Changing the header to “Content-Type, application/json” did not return an error and updated the record properly.