Patch Collection Item Webhook Error

I’m trying to create a Webhook to PATCH a collection item and tag it with multi-reference fields.

I’m using Webflows Patch Collection tool to test this as it’s not working in Zapier.

When I pass in 2 items individually the PATCH works great:
64a6bb15a257876f2a611c46
64a6bb177172a75c4b1fc6b9

But when I try passing in multiple items with quotes around them like this I get an error:
“64a6bb15a257876f2a611c46”,“64a6bb177172a75c4b1fc6b9”

Any ideas?

This is the CURL response form the Webflow Patch Collection tool:

{
  "fields": {
    "slug": "mem_cljr4ok012woi0shqfnc0fh8d",
    "name": "[EMAIL]",
    "_archived": false,
    "_draft": false,
    "skill-tags": "\"64a6bb15a257876f2a611c46\",\"64a6bb177172a75c4b1fc6b9\""
  }
}

And this is the error I get:

{
  "msg": "Validation Failure",
  "code": 400,
  "name": "ValidationError",
  "path": "/collections/64624924d0bad2ab82df04ac/items/64a6ba177172a75c4b1e9a7c",
  "err": "ValidationError: Validation Failure",
  "problems": [
    "Field '---': Invalid argument provided: Not an id: null"
  ],
  "problem_data": [
    {
      "name": "BadArgumentError",
      "statusCode": 400,
      "publicErrorCode": "",
      "externalReference": "",
      "isAppError": true,
      "skipAlert": true,
      "extensions": {
        "code": "BadArgument"
      }
    }
  ]

Here is my site Read-Only: Webflow - HustleWing v1

Welcome @brian16 :wave:

You don’t have your data structured correctly. But not too worry, here’s how to fix that.

This starts getting a bit advanced, but in the programming world when you send more than one item, you are sending what is known as an “array” of items.

…and array’s data has a very specific structure:

["one", "two", "three"]

So in your case, replace this:

“64a6bb15a257876f2a611c46”, “64a6bb177172a75c4b1fc6b9”

With this:

[“64a6bb15a257876f2a611c46”, “64a6bb177172a75c4b1fc6b9”]

That should work for you.

Further, if you’re sending this with curl you don’t need those extra quotes, or the escaping of the quotes. So something like this instead:

{
  "fields": {
    "slug": "mem_cljr4ok012woi0shqfnc0fh8d",
    "name": "[EMAIL]",
    "_archived": false,
    "_draft": false,
    "skill-tags": ["64a6bb15a257876f2a611c46", "64a6bb177172a75c4b1fc6b9"]
  }
}