Connect API v2 update groups or custom field

2019-03-04 06:09发布

I am writing an API where I need to put a user in the group or custom field (text or select box) when they purchase something via my e-commerce website but I can't find solution how to do that.

I have tried to the same request as response

[groups] => Array
    (
        [0] => SquareConnect\Model\CustomerGroupInfo Object
            (
                [id:protected] => ef53bb91-23ad-4313-b8cb-9deb9e7baac7
                [name:protected] => VIP Customer
            )

)

But this code is not updating group.

Other option was to add another field but these fields are not visible on API response...

My last option is to use Reference ID as a text field where I put group name, but I would much rather use something with ID...

Thanks for help.

1条回答
爷、活的狠高调
2楼-- · 2019-03-04 06:40

There is not a way to programatically add customers to groups via the API (though it is possible in Square Dashboard). For your case I'd recommend putting some custom metadata in the notes field of the customer.

查看更多
登录 后发表回答