I am not sure what would be the request format to update a foreign ID cell of hubDB table when I am using update a specific cell API.
Looking forward to a solution!! Please help.
I am not sure what would be the request format to update a foreign ID cell of hubDB table when I am using update a specific cell API.
Looking forward to a solution!! Please help.
Have you messed around with this before?
Hello @shivammishra ,
@dennisedson , the call with the values for the foreign id should look like the following:
{"<INDEX OF COLUMN>": [
{
"id": <ID OF ROW OF THE FOREIGN TABLE>,
"type": "foreignid"
}
]}
So the value of the foreign id is an object (array of arrays) because it is a special type of multiselect as I see it. Inside it is the id of the row of the foreign table you selected in your column.
If you need any further help don’t hesitate to write here.
If my answer was helpful please mark it as a solution.
Thanks for the prompt response.
Now it does not give me error anymore but it does not show the column getting updated in HubDB as well.
Success response on put request is :
{
"value": null
}
I am using this API call : https://legacydocs.hubspot.com/docs/methods/hubdb/v2/update_cell
which is to update a specific column value and not the entire row. Does this format is applicable on this API as well?
Also I am assuming publishing the HubDB table is not required to see the value in HubDB after above API call.
Ow snap! I missed the part where you actually update a single cell, as the cell is already defined in the url the json body should look like this:
{"value" : [
{
"id": <ID OF THE ROW OF FOREIGN TABLE>,
"type": "foreignid"
}
]
}
If my answer was helpful please mark it as a solution.
This works!! Thanks much.
be interested if you came across the same issue as I did when inserting a foreign id via API