I’ve been migrating existing data over for a while now and everything has been going smoothly, but now I am attempting to update existing content via the API I seem to have hit a roadblock.
I am using the http approach and following the documentation here:-
But I am having trouble with the request. I have tried various schemas, this is where I am currently…
{
"data": {
"relationships": {
"id": "1366008", (**The ID of the model**)
"type": "item_type"
},
"type": "item",
"attributes": {
"cities": [
{
"Id": "70401053" (**The id of the item I wish to have associated with the item I am updating**)
}
]
},
"id": "87828345" (**The id of the item I wish to update**)
}
}
But I am receiving an error response …
{
"data": [
{
"id": "a0cd05",
"type": "api_error",
"attributes": {
"code": "INVALID_FORMAT",
"details": {
"messages": [
"#/data: failed schema #/definitions/item/links/3/schema/properties/data: \"id\" is not a permitted key.",
"#/data/relationships: failed schema #/definitions/item/links/3/schema/properties/data/properties/relationships: \"id\", \"type\" are not permitted keys.",
"#/data/relationships: failed schema #/definitions/item/links/3/schema/properties/data/properties/relationships: \"item_type\" wasn't supplied."
]
}
}
}
]
}
Of these errors, the one puzzling me the most is “Id is not a permitted key”, and yet it appears as a field in the example given on the documentation?
Any help in letting me know what the schema should look like in order to get a successful response would be appreciated.
It might be useful if I could have the full URLs to the schema definitions mentioned in the error?