Modifying customer metadata

#1

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

#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
#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

#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
#5

Looks good now, thanks!