Hi all, I have several Looks that I want to update with different filter values via API. In the body of the response, I’ve tried setting
null, and updating
filters with the new filter value. However, the response I’m getting back keeps showing the default filter value, not the desired updated value.
Thanks in advanced!
Inserting a new filter into a look is not going to possible via the
update_look(look_id, body)endpoint. In order to do this, we’ll have to use a couple of different endpoints. If you’re working with the interactive API docs, we’ll first hit the Get Look endpoint by entering the Look ID and “query” in the fields section:
Our response body will look like this:
We’ll copy everything below “id” and plug that into the
create_query(body)endpoint (we’ll have to add “model” at the top and get rid of the read-only fields, which you can find here, as well as “client_id”). This is where you will modify your filters.
Lastly, we’ll enter our original look ID to the
update_look(look_id, body)endpoint, and plug in the id from the
create_queryendpoint into the “query_id” parameter:
Please let me know if you have any questions about this!
@quinn.morrison, just tested it out and it worked perfectly. Thanks for the help!