{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-coupon-create-schema.json",
  "title": "CouponCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-coupons-api-openapi.yml#/components/schemas/CouponCreate",
  "type": "object",
  "properties": {
    "program_id": {
      "type": "string",
      "pattern": "^(sample_)?prg_",
      "description": "Prefixed id (`prg_…`)"
    },
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "partner_id": {
      "type": "string",
      "pattern": "^(sample_)?part_",
      "description": "Prefixed id (`part_…`)"
    },
    "group_id": {
      "type": "string",
      "pattern": "^(sample_)?grp_",
      "description": "Prefixed id (`grp_…`)"
    },
    "external_id": {
      "type": "string"
    }
  },
  "required": [
    "program_id",
    "code"
  ]
}