Skip to content

Save policy

PUT/admin/v1/stores/{store_id}/policies/{kind}
  • settings:write

Create or replace a policy. HTML is sanitized. Send If-Match: "v{version}" ("v0" when creating) to avoid overwriting someone else's changes.

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.

  • kindenumrequired

    Policy kind

    • refund
    • privacy
    • terms
    • shipping
    • contact

Headers

  • If-Matchstring · or null

    ETag from the last read, e.g. "v3"

  • shop-api-versionYYYY-MM

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

Body

  • titlestringrequired
  • body_htmlstringrequired

    Basic formatting only: headings, lists, links, tables. Scripts and styles are removed.

  • translationsobject · or null

    Translations keyed by language tag; replaces the existing set.

Returns

200 Saved policy.

Errors

  • 412precondition_failedThe policy changed since it was read.
  • 422validation_failedValidation failed.