Modifying nested values in Zapier Storage using API calls

I’m trying to work with Zapier’s storage API and need help with updating nested data structures. I can successfully read and write basic values, but I’m struggling with modifying specific nested properties without replacing the entire object.

Here’s the kind of data structure I’m working with:

{
  "order_123": {"customer_ref": "cust_abc", "delivery_date": "2024-01-15T14:30:00.000Z"},
  "order_456": {"customer_ref": "cust_def", "delivery_date": "2024-01-16T09:15:00.000Z"},
  "order_789": {"customer_ref": "cust_ghi", "delivery_date": "2024-01-17T11:45:00.000Z"}
}

I want to update just the “delivery_date” field for a specific order without touching the rest of the data. I tried using a PATCH request with the “set_child_value” action:

def modify_nested_value(self, main_key, nested_key, new_value):
    headers = self.create_headers()
    
    payload = {
        "action": "set_child_value",
        "data": {
            "key": main_key,
            "value": {nested_key: new_value}
        }
    }
    
    response = requests.patch(self.API_URL, headers=headers, json=payload)
    return response

The API returns a 200 status but nothing actually changes in storage. What am I doing wrong here?

Zapier Storage API doesn’t support nested property updates the way you’re trying to do it. I hit the same wall building a project management integration last year - the docs make it sound like it should work, but it doesn’t.

Here’s what works: GET the entire storage object first, modify the nested property in your code, then PUT the whole thing back. Don’t forget to check if the main key exists before trying to update it, or your workflow will break. And add error handling around the GET request - if the read works but the write fails, you’ll end up with inconsistent data.

zapier’s storage api is kinda limited for nested stuff. I recommend doing a read-modify-write approach. First, fetch the whole data, then check if the key exists before changing the nested field and finally write it back. just be careful of errors if the main key is missing.

Had this exact problem a few months ago with an inventory tracking workflow. Zapier Storage doesn’t support “set_child_value” - that’s why you’re getting a 200 response but nothing changes. Their API only does complete key-value operations, not partial updates on nested objects. You need to grab the whole object first, modify it locally, then write it back. I built a helper function that does a GET request for the current data, uses JSON parsing to update the specific nested field, then sends a PUT with the complete modified object. Not as clean as a real PATCH operation, but it works. Just watch out for race conditions if multiple processes might update the same storage key at once.