Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

Get Metafield by ID

This endpoint is available on the Admin API (merchant JWT) only. It is not exposed to OAuth-scoped apps. Apps must use GET /api/v1/metafields.json with namespace + key (or ownerType + ownerId) filters instead.
Returns a single metafield by its UUID. Used by the merchant admin and by TeamInfra’s resource detail editors.

Request

curl -X GET "https://api.launchmystore.io/metafields/<id>" \
  -H "Authorization: Bearer <merchant-jwt>"

Auth

Merchant JWT with one of: MERCHANT, STAFF_ADMIN, SUPER_ADMIN, MANAGER. The metafield must belong to the merchant’s store.

Path parameters

id
string
required
The metafield UUID.

Response

{
  "status": 200,
  "state": "success",
  "data": {
    "id": "e607f43e-9251-451e-a45c-38bf28d61154",
    "namespace": "custom",
    "key": "warranty_years",
    "value": 5,
    "raw_value": "5",
    "type": "number_integer",
    "owner_type": "product",
    "owner_id": "94995c07-e8a5-43f2-9d1a-18ccf8199adf",
    "app_id": null,
    "created_at": "2026-05-09T13:32:53.135Z",
    "updated_at": "2026-05-09T13:32:53.135Z"
  }
}

How apps should look up a single metafield

Use the list endpoint with exact filters — the unique constraint (storeId, ownerType, namespace, key, ownerId) guarantees one row max:
curl -G "https://api.launchmystore.io/api/v1/metafields.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --data-urlencode "ownerType=product" \
  --data-urlencode "ownerId=<productId>" \
  --data-urlencode "namespace=custom" \
  --data-urlencode "key=warranty_years"
Returns at most one item under data.metafields[0].

Error codes

CodeDescription
UNAUTHORIZEDInvalid or missing JWT
FORBIDDENWrong store / insufficient role
NOT_FOUNDMetafield does not exist or belongs to another store