Patch Metadata on Multi Select Field Issue

I’ve got a python function that’s reliably working on select fields to patch metadata across multiple clips. According to the docs, select and multi_select fields are formatted the same.

However, my requests fails anytime I try it on a multi select field, and works any time I use it on a select field.

PayLoad: {‘data’: {‘file_ids’: [‘’], ‘values’: [{‘field_definition_id’: ‘, ‘value’: [{‘id’: ‘’}]}]}}

URL: https://api.frame.io/v4/accounts/<account_id>/projects/<project_id>/metadata/values

Error: Bulk update failed (422): {“errors”:[{“title”:“Invalid value”,“source”:{“pointer”:“/data/values/0/value”},“detail”:“Failed to cast value using any of: [string, boolean, integer, number, user_value_array ([{id: , type: <enum: user, account_user_group>}]), select_value_array ([{id: }])]”}]}

Has anyone else run into this one?

@Damon the JSON payload is:

{
    "data": {
        "file_ids": ["19c09255-74a5-4463-bf6d-2d2f03d886ab"],
        "values": [
            {
                "field_definition_id": "149a2c62-4395-414d-991a-038e777b3ed9",
                "value": ["678324c0-14d6-4a85-bca2-a83bc7f72ea8"]
            }
        ]
    }
}

no id variable needed, you just provide the value of the id itself.



Woah, I feel dumb, there was an issue in how I was separating field types, which is why my select patches were working, but not select_multi. Thanks for the sanity check Charlie! I appreciate it.

1 Like

No worries! Happy to help!