Skip to content

Add standard field

POST/admin/v1/stores/{store_id}/standard-fields
  • settings:write
  • Idempotency-Key supported

Add a standard field (and the content type it points at), with storefront access. Adding one the store has changes nothing.

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.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

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

Body

  • owner_typeenumrequired

    What a metafield belongs to.

    • product
    • variant
    • collection
    • customer
    • order
    • store
  • keystringrequired

Returns

201 The store's definition of it.

Errors

  • 403forbiddenMissing settings:write.
  • 404not_foundNo such standard field.
  • 409The owner type has 200 definitions (limit_reached).