Does updating an item through API change its item ID?
Hey there @cucumba
No, the item ID does not change when updating it through the API!
Hope that helps
Hi @marko, when i was trying to create an item i got an error
Invalid data “d9babbbe-77f1-4b9a-b632-2429fab606bd” supplied to “label” attribute: Data “‘d9babbbe-77f1-4b9a-b632-2429fab606bd’” is not an array supplied to App\Item\Types\Label class."
d9babbbe-77f1-4b9a-b632-2429fab606bd is the selected label ID, similar error when i use label name.
Here’s the body:
{“folder_id”:“8eBkDjTDstn”,“values”:[{“attribute_id”:“6c4eea2e-caf2-47cc-acd3-664b799f0cd7”,“data”:“YYYYY”},{“attribute_id”:“b92cd040-8e1e-420b-be31-67d3b71de447”,“data”:“YYYYY”},{“attribute_id”:“32fe641f-1d74-48c6-b797-0f4926c09ff5”,“data”:“YYYYY”},{“attribute_id”:“1d3a6614-c447-4345-9a5b-5d2c667b1a17”,“data”:“d9babbbe-77f1-4b9a-b632-2429fab606bd”},{“attribute_id”:“f928f856-c5c3-4da9-993d-e3eef01d2910”,“data”:“4”},{“attribute_id”:“8fdf9587-1c5a-4629-b80d-521e9d0c9ab8”,“data”:“2”},{“attribute_id”:“24612e2f-59dc-45ae-a424-204f4ab9c30d”,“data”:“YYYYYY”},{“attribute_id”:“79221f5d-c7de-4995-b39a-3805f12e3930”,“data”:“12/07/2021”}]}
Where did i do wrong?
Ok, apparently for Label type attributes, you’d have to wrap the value of the “data” with an array like this
[“d9babbbe-77f1-4b9a-b632-2429fab606bd”]