{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/immix/json-schema/immix-submit-asset-policy-body-schema.json",
  "title": "SubmitAssetPolicyBody",
  "description": "SubmitAssetPolicy with route-sourced fields (assetPolicyId) not required in the body — the route injects them; a body restatement must agree, and edge-stamped fields (userId) removed — the edge sets them and refuses a body value.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immix-asset-policies-api-openapi.yml#/components/schemas/SubmitAssetPolicyBody",
  "type": "object",
  "properties": {
    "assetPolicyId": {
      "type": "integer",
      "description": "0 = create."
    },
    "expectedVersion": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    },
    "assetId": {
      "type": "integer"
    },
    "maxTicketAmount": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or \"0\" = unset (the 0 sentinel)"
    },
    "approvalThresholdAmount": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or \"0\" = unset (the 0 sentinel)"
    },
    "reconciliationToleranceAmount": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "maxLength": 64,
      "description": "money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or \"0\" = unset (the 0 sentinel)"
    },
    "openingGraceNs": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+$",
      "description": "int64 as a decimal JSON string"
    }
  },
  "required": [
    "assetId"
  ]
}