Greetings,
We’re trying to add/modify metadata for a customer object using the Customer REST API as follows:
curl 'https://mdash.net/customer?access_token=bogusCustomerKey' -d '{"meta": "stable"}'
The command is accepted, but the new ‘meta’ key is not shown when reading back the customer object.
Can anyone advise what we might be doing wrong here?
Thanks!
-AD
lsm
February 18, 2021, 3:33pm
2
Did you try to specify JSON encoding?
curl -H 'Content-Type: application/json' \
-d '{"meta": {"foo":1, "bar":2}}' \
https://mdash.net/customer?access_token=KEY
Autodog
February 23, 2021, 4:39pm
3
I tried using JSON encoding as noted above, but still no luck. The API call is accepted, but it just returns the customer object with no changes.
Thoughts?
-AD
lsm
February 24, 2021, 11:03am
4
Right, the doc was wrong, fixed. The metadata object is called cconfig
, not meta
.
Just change the meta
to cconfig
in the suggested command, and it should work.
curl -H 'Content-Type: application/json' \
-d '{"cconfig": {"foo":1, "bar":2}}' \
https://mdash.net/customer?access_token=KEY