Skip to content

Replace a content type's name

PUT/admin/v1/stores/{store_id}/metaobject-definitions/{definition_id}
  • settings:write

Replace a content type's name, fields and settings. A field keeps its type once created.

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 content type's ID, like mobdef_01k8qs5s….

Headers

  • shop-api-versionYYYY-MM

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

Body

  • namestringrequired
  • fieldsarray of objectsrequired

    1–40 fields. A field keeps its type once created.

  • descriptionstring · or null
  • display_fieldstring · or null
  • storefrontboolean

Returns

200 Updated.

Errors

  • 404not_foundNo such content type.
  • 422validation_failedValidation failed (type_locked when a field's type changes).