Skip to content

Get the signed-in customer's metafields

GET
/tenant/stores/{storeRef}/customers/metafields
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/tenant/stores/example/customers/metafields \
--header 'Authorization: Bearer <token>' \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns the custom field values the store has set on the signed-in shopper’s customer record and that the store lets shoppers read. The result is keyed by namespace.key, each entry with its type and value, and is empty when there are none.

storeRef
required
string

The store’s ref, as returned by GET /stores.

The metafields the shopper may read, keyed by namespace.key.

Media typeapplication/json
object
key
additional properties
object
value
required

The value in the form its type defines. A reference type resolves to the referenced resource’s public data.

nullable
One of:
string
type
required

The metafield’s type, such as single_line_text_field or list.number_integer.

string

Example generated

{
"additionalProperty": {
"value": {},
"type": "example"
}
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}