Skip to main content
PUT
/
api
/
platform
/
v1
/
shoppers
/
{shopper_ref}
/
metafields
Bulk upsert metafields for a shopper
curl --request PUT \
  --url https://api.bspk.com/api/platform/v1/shoppers/{shopper_ref}/metafields \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metafields": [
    {
      "namespace": "custom",
      "key": "loyalty_tier",
      "value": "gold",
      "value_type": "single_line_text_field",
      "is_list": false
    }
  ]
}
'
[
  {
    "id": 123,
    "namespace": "<string>",
    "key": "<string>",
    "value": "<string>",
    "value_type": "<string>",
    "is_list": true,
    "created_at": "<string>",
    "updated_at": "<string>",
    "json_value": null
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

shopper_ref
string
required

Shopper external ID

Body

application/json
metafields
object[]
required

Response

Successful upsert, returns all metafields

id
integer
required
namespace
string
required
key
string
required
value
string
required
value_type
string
required
is_list
boolean
required
created_at
string
required
updated_at
string
required
json_value
unknown