I figured out that I needed to format the “meta_data” fields like this to make it work:
{
"id": 4722,
"product_id": 1008,
"line_items": [{
"id": 651,
"name": "Product name",
"quantity": 20,
"meta_data": [{
"key": "custom_meta_key",
"value": "new_custom_meta_value"
}]
}]
}
This works (also creates the meta field if it does not already exist).
However, it only works with one field. Since the “key/value” identifiers in the array are not unique.
Does anyone know how to add multiple meta_data fields using a webhook like this?
Regards,
Andreas