get
https://{subdomain}.myshoplaza.com/openapi/2025-06/metafields///count
Retrieve the count of metafields for a specific resource
The Get Metafields API allows developers to retrieve the total number of metafields associated with a specific resource.
This API is especially useful for:
- Checking how many custom fields are attached to a product, customer, or other resource.
- Determining if a resource has any metafield data before performing operations.
- Implementing pagination or batch processing of metafield data.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
owner_resource | string | yes | The type of resource the metafields are attached to. Available values: shop, product, product_image, product_variant, order, page, customer, collection, blog, article | product |
owner_id | string | yes | The unique ID of the resource to count metafields for | prod_12345 |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | success | HTTP status code |
message | string | Response message | |
data | object | {...} | Response data container |
data.total_count | int32 | 32 | total_count |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
