Metafields
Configure which Shopify metafields are included in your product feed.
Get metafields
GET
/v1/metafields Returns the metafield configuration, including whether metafield pulling is enabled and which metafields are configured.
Required scope: read_settings
Request
curl https://app.simpleproductfeeds.com/v1/metafields \
-H "Authorization: Bearer spf_live_sk_your_key_here"
Response
{
"data": {
"object": "metafields",
"pull_metafields": true,
"metafields": [
{
"id": 1,
"namespace": "custom",
"key": "material"
},
{
"id": 2,
"namespace": "custom",
"key": "care_instructions"
}
],
"max_metafields": 10
}
}
Response fields
| Field | Type | Description |
|---|---|---|
object | string | Always "metafields". |
pull_metafields | boolean | Whether metafield fetching is enabled. When false, metafields are not included in product data. |
metafields | array | List of configured metafields, each with id, namespace, and key. |
max_metafields | integer | Maximum number of metafields allowed (currently 10). |
Update metafields
PATCH
/v1/metafields Updates metafield configuration. You can enable/disable metafield pulling and configure which metafields to include.
Required scope: write_settings
Parameters
| Parameter | Type | Description |
|---|---|---|
pull_metafields | boolean | Enable or disable metafield fetching. |
metafields | array | List of metafields to include. Each item needs namespace and key. Maximum 10 items. |
Request
curl -X PATCH https://app.simpleproductfeeds.com/v1/metafields \
-H "Authorization: Bearer spf_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"pull_metafields": true,
"metafields": [
{"namespace": "custom", "key": "material"},
{"namespace": "custom", "key": "care_instructions"},
{"namespace": "custom", "key": "color_family"}
]
}'
Response
Returns the updated metafields object.
Errors
| Status | Code | Description |
|---|---|---|
| 422 | validation_failed | Validation error (e.g., exceeding the 10 metafield limit). |