auto_write

Add a rule that refuses or limits what may be written to the store.

deny refuses a matching write with the rule's name as the reason. clamp limits one number (bound): where a proposal can still be adjusted it is bounded, and at the last gate a write past the bound is refused. A rule naming a fact that is missing on a write refuses it: an unknown value is never read as "the condition does not hold". An allow rule is 403: it loosens, and only a person in the dashboard writes one. A rule that cannot bind is 400 invalid_rule. At most 100 rules per store.

post/api/v1/policies

Request

  • Base URL: https://app.magistry.io
  • URL: https://app.magistry.io/api/v1/policies
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.magistry.io/api/oauth/authorize, token URL https://app.magistry.io/api/oauth/token, scopes: automation:write)

Request body

store_idstring uuid

The store the rule binds. Defaults to the store the credential was issued for.

namestring required

Shown to the merchant and in every refusal.

domain'ads' | 'pricing' | 'promotions' required
actionstring

One action of the domain, or * for all of them. See policy_list → vocabulary.

effect'deny' | 'clamp' required
enabledboolean
notesstring

Response

Result

okboolean required
resultunknown required

Changes

No recorded changes to this operation across all 3 revisions of this API.