Skip to content

Metaobjects

Metafields, their definitions, and metaobjects. Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.

Endpoint Method Path
Create a custom field definition POST /metafield-definitions
List custom field definitions GET /metafield-definitions
Update a custom field definition PATCH /metafield-definitions/{id}
Set custom field values PUT /metafields
List a resource’s custom field values GET /metafields
Delete a custom field definition DELETE /metafield-definitions/{id}
Create a custom content type POST /metaobject-definitions
List custom content types GET /metaobject-definitions
Update a custom content type PUT /metaobject-definitions/{id}
Create a custom content entry POST /metaobjects
List custom content entries GET /metaobjects
Get a custom content entry GET /metaobjects/{id}
Update a custom content entry PUT /metaobjects/{id}
Delete a custom content entry DELETE /metaobjects/{id}
Delete a custom content type DELETE /metaobject-definitions/{id}

POST /metafield-definitions · Scope: write_metaobjects

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metafield-definitions" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"owner_type": "product",
"namespace": "custom",
"key": "fabric",
"name": "Fabric",
"type": "single_line_text",
"storefront_access": true
}'
Response 201
{
"description": "",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000031",
"key": "fabric",
"name": "Fabric",
"namespace": "custom",
"owner_type": "product",
"pinned_position": null,
"storefront_access": true,
"type": "single_line_text",
"updated_at": "2026-10-18T09:30:00Z",
"validations": {},
"version": 1
}

GET /metafield-definitions · Scope: read_metaobjects

Parameter In Description
owner_type query For example product.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metafield-definitions?owner_type=product" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"description": "",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000031",
"key": "fabric",
"name": "Fabric",
"namespace": "custom",
"owner_type": "product",
"pinned_position": null,
"storefront_access": true,
"type": "single_line_text",
"updated_at": "2026-10-18T09:30:00Z",
"validations": {},
"version": 1
}
]
}

PATCH /metafield-definitions/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"owner_type": "product",
"namespace": "custom",
"key": "fabric",
"name": "Fabric and care",
"type": "single_line_text",
"storefront_access": true,
"version": 1
}'
Response 200
{
"description": "",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000031",
"key": "fabric",
"name": "Fabric and care",
"namespace": "custom",
"owner_type": "product",
"pinned_position": null,
"storefront_access": true,
"type": "single_line_text",
"updated_at": "2026-10-18T09:30:00Z",
"validations": {},
"version": 2
}

PUT /metafields · Scope: write_metaobjects

A null value deletes the field.

Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metafields" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"owner_type": "product",
"owner_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"metafields": [{"namespace": "custom", "key": "fabric", "value": "\"100% linen\""}]
}'
Response 200
{
"data": [
{
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000032",
"key": "fabric",
"namespace": "custom",
"type": "single_line_text",
"updated_at": "2026-10-18T09:30:00Z",
"value": "\"100% linen\""
}
]
}

GET /metafields · Scope: read_metaobjects

Parameter In Description
owner_type query For example product.
owner_id query An ID, as in the example.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metafields?owner_type=product&owner_id=0193a1b2-c3d4-7e5f-8a6b-000000000005" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000032",
"key": "fabric",
"namespace": "custom",
"type": "single_line_text",
"updated_at": "2026-10-18T09:30:00Z",
"value": "\"100% linen\""
}
]
}

DELETE /metafield-definitions/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metafield-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000031" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 204
{}

POST /metaobject-definitions · Scope: write_metaobjects

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "designer",
"name": "Designer",
"fields": [
{
"key": "name",
"name": "Name",
"type": "single_line_text",
"required": true
},
{"key": "city", "name": "City", "type": "single_line_text"}
],
"display_name_field": "name",
"capabilities": {"publishable": true, "renderable": true, "translatable": true}
}'
Response 201
{
"capabilities": {"publishable": true, "renderable": true, "translatable": true},
"description": "",
"display_name_field": "name",
"entries_count": 0,
"fields": [
{
"key": "name",
"name": "Name",
"required": true,
"type": "single_line_text",
"validations": {}
},
{
"key": "city",
"name": "City",
"required": false,
"type": "single_line_text",
"validations": {}
}
],
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000033",
"name": "Designer",
"storefront_access": false,
"type": "designer",
"version": 1
}

GET /metaobject-definitions · Scope: read_metaobjects

Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"capabilities": {"publishable": true, "renderable": true, "translatable": true},
"description": "",
"display_name_field": "name",
"entries_count": 0,
"fields": [
{
"key": "name",
"name": "Name",
"required": true,
"type": "single_line_text",
"validations": {}
},
{
"key": "city",
"name": "City",
"required": false,
"type": "single_line_text",
"validations": {}
}
],
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000033",
"name": "Designer",
"storefront_access": false,
"type": "designer",
"version": 1
}
]
}

PUT /metaobject-definitions/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "designer",
"name": "Designers",
"fields": [
{
"key": "name",
"name": "Name",
"type": "single_line_text",
"required": true
},
{"key": "city", "name": "City", "type": "single_line_text"}
],
"display_name_field": "name",
"capabilities": {"publishable": true, "renderable": true, "translatable": true},
"version": 1
}'
Response 200
{
"capabilities": {"publishable": true, "renderable": true, "translatable": true},
"description": "",
"display_name_field": "name",
"entries_count": 0,
"fields": [
{
"key": "name",
"name": "Name",
"required": true,
"type": "single_line_text",
"validations": {}
},
{
"key": "city",
"name": "City",
"required": false,
"type": "single_line_text",
"validations": {}
}
],
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000033",
"name": "Designers",
"storefront_access": false,
"type": "designer",
"version": 2
}

POST /metaobjects · Scope: write_metaobjects

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/metaobjects" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "designer",
"handle": "layla-ahmad",
"status": "active",
"fields": {"name": "\"Layla Ahmad\"", "city": "\"Doha\""}
}'
Response 201
{
"display_name": "\"Layla Ahmad\"",
"fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""},
"handle": "layla-ahmad",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000034",
"status": "active",
"type": "designer",
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

GET /metaobjects · Scope: read_metaobjects

Parameter In Description
type query For example designer.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobjects?type=designer" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"display_name": "\"Layla Ahmad\"",
"fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""},
"handle": "layla-ahmad",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000034",
"status": "active",
"type": "designer",
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}
],
"page_info": {"has_next_page": false}
}

GET /metaobjects/{id} · Scope: read_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"display_name": "\"Layla Ahmad\"",
"fields": {"city": "\"Doha\"", "name": "\"Layla Ahmad\""},
"handle": "layla-ahmad",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000034",
"status": "active",
"type": "designer",
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

PUT /metaobjects/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"handle": "layla-ahmad",
"status": "active",
"fields": {"name": "\"Layla Ahmad\"", "city": "\"Lusail\""},
"version": 1
}'
Response 200
{
"display_name": "\"Layla Ahmad\"",
"fields": {"city": "\"Lusail\"", "name": "\"Layla Ahmad\""},
"handle": "layla-ahmad",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000034",
"status": "active",
"type": "designer",
"updated_at": "2026-10-18T09:30:00Z",
"version": 2
}

DELETE /metaobjects/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metaobjects/0193a1b2-c3d4-7e5f-8a6b-000000000034" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 204
{}

DELETE /metaobject-definitions/{id} · Scope: write_metaobjects

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/metaobject-definitions/0193a1b2-c3d4-7e5f-8a6b-000000000033" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 204
{}

Was this page helpful?