Skip to content

Update definition

PATCH/admin/v1/stores/{store_id}/metafield-definitions/{definition_id}

    Change a definition's name, description, rules or storefront access.

    Path parameters

    • store_idstringrequired

      The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

    • definition_idstringrequired

      The definition's ID, like mfdef_01k8qs5s….

    Headers

    • shop-api-versionYYYY-MM

      The version to answer in. Without it, your app’s pinned version, else the newest.

    Body

    • namestring · or null
    • descriptionstring · or null
    • validationsobject · or null

      Replaces every rule.

    • storefrontboolean · or null
    • shopper_editableboolean · or null

      Whether the signed-in shopper sets it. Hiding the field from storefronts stops it too.

    Returns

    200 Updated.

    Errors

    • 404not_foundNo such definition.
    • 422validation_failedValidation failed.