Swoogo · Schema
discountCreateRequest
Event ManagementEvent RegistrationEventSessionsSpeakersAttendeesSoftware-as-a-Service
Properties
| Name | Type | Description |
|---|---|---|
| event_id | integer | ID of the event to which this discount is associated. |
| parent_id | integer | Creates this code as an alternate (child) of the given primary code. The parent must be an existing, non-deleted, top-level code in the same event; otherwise the request is rejected with `422`. An alt |
| code | string | Unique code for the discount within the event. May not contain `<`, `>`, `\`, or `"`. |
| type | string | The type of discount being applied. - `percentage` — `percentage_discount` is required. - `absolute` — `absolute_discount` is required. - `specific` — line-item-specific fees are supplied via `custom_ |
| percentage_discount | number | Percentage value of the discount. Required when `type` is `percentage`. |
| absolute_discount | number | Absolute monetary value of the discount. Required when `type` is `absolute`. |
| apply_to_all | boolean | If `true`, the discount applies to every line item; if `false`, only to those listed in `applicable_line_items`. |
| capacity | integer | Maximum number of times this discount can be used. Omit (or `0`) for unlimited. |
| min_group_size | integer | Minimum group size required to use this discount. |
| registrants_per_use | integer | Maximum number of times the code can be used per group of N registrants. e.g. set to `2` to allow 1 use in a group of 2, 2 uses in a group of 4, etc. |
| all_registrants_in_group | boolean | Whether all registrants in a group must use the same discount. |
| applicable_line_items | array | Line items the discount applies to when `apply_to_all` is `false`. Standard values are `reg_type`, `package`, and `session`. Custom-question line items use the form `c_ |
| custom_fees_update | object | For `specific` discounts: maps each line-item type to a map of line-item IDs and the replacement fee (as a string). On save, these entries are merged into the persisted `custom_fees` object. Returned |
| autopopulate_attributes | array | Registrant fields to be automatically populated when this discount is applied. Each entry has an `attribute` (registrant attribute name or `c_ |
| notes | string | Free-form notes or comments about the discount. |
| sold_out_message | string | Custom message shown when the discount is sold out. Defaults to a generic message when not set. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/swoogo/json-schema/swoogo-discount-create-request-schema.json",
"title": "discountCreateRequest",
"x-generated": "2026-11-24",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/swoogo-openapi.yml#/components/schemas/discountCreateRequest",
"type": "object",
"required": [
"event_id",
"code",
"type"
],
"properties": {
"event_id": {
"type": "integer",
"description": "ID of the event to which this discount is associated."
},
"parent_id": {
"type": "integer",
"description": "Creates this code as an alternate (child) of the given primary code. The parent must be an existing,\nnon-deleted, top-level code in the same event; otherwise the request is rejected with `422`.\nAn alternate inherits everything from its parent: `capacity`, `min_group_size`, `registrants_per_use`,\n`percentage_discount`, `absolute_discount`, `apply_to_all`, `applicable_line_items`, `custom_fees`,\n`notes`, `sold_out_message`, `all_registrants_in_group`, `autopopulate_attributes` and visibility. Any of these sent alongside `parent_id` are ignored,\nand checkout always applies the parent's `type` and amount (the alternate's own `type` is informational only).\nEach alternate still tracks its own usage count against the inherited `capacity`.\nSo the only fields worth sending with `parent_id` are `event_id`, `code` and `type`.\n"
},
"code": {
"type": "string",
"maxLength": 255,
"description": "Unique code for the discount within the event. May not contain `<`, `>`, `\\`, or `\"`."
},
"type": {
"type": "string",
"enum": [
"percentage",
"absolute",
"specific"
],
"description": "The type of discount being applied.\n- `percentage` — `percentage_discount` is required.\n- `absolute` — `absolute_discount` is required.\n- `specific` — line-item-specific fees are supplied via `custom_fees_update`.\n"
},
"percentage_discount": {
"type": "number",
"format": "float",
"minimum": 0,
"maximum": 100,
"description": "Percentage value of the discount. Required when `type` is `percentage`."
},
"absolute_discount": {
"type": "number",
"format": "float",
"description": "Absolute monetary value of the discount. Required when `type` is `absolute`."
},
"apply_to_all": {
"type": "boolean",
"description": "If `true`, the discount applies to every line item; if `false`, only to those listed in `applicable_line_items`."
},
"capacity": {
"type": "integer",
"description": "Maximum number of times this discount can be used. Omit (or `0`) for unlimited."
},
"min_group_size": {
"type": "integer",
"minimum": 2,
"description": "Minimum group size required to use this discount."
},
"registrants_per_use": {
"type": "integer",
"minimum": 2,
"description": "Maximum number of times the code can be used per group of N registrants. e.g. set to `2` to allow 1 use in a group of 2, 2 uses in a group of 4, etc."
},
"all_registrants_in_group": {
"type": "boolean",
"description": "Whether all registrants in a group must use the same discount."
},
"applicable_line_items": {
"type": "array",
"description": "Line items the discount applies to when `apply_to_all` is `false`. Standard values are\n`reg_type`, `package`, and `session`. Custom-question line items use the form `c_<questionId>`\n(e.g. `c_438`).\n",
"items": {
"type": "string"
}
},
"custom_fees_update": {
"type": "object",
"description": "For `specific` discounts: maps each line-item type to a map of line-item IDs and the\nreplacement fee (as a string). On save, these entries are merged into the persisted\n`custom_fees` object. Returned only via the `custom_fees` field on read responses.\n",
"additionalProperties": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"autopopulate_attributes": {
"type": "array",
"description": "Registrant fields to be automatically populated when this discount is applied. Each entry\nhas an `attribute` (registrant attribute name or `c_<questionId>` for custom questions)\nand a `value`.\n",
"items": {
"type": "object",
"properties": {
"attribute": {
"type": "string"
},
"value": {
"description": "The value to set on the registrant (any scalar; `null` clears the field)."
}
}
}
},
"notes": {
"type": "string",
"description": "Free-form notes or comments about the discount."
},
"sold_out_message": {
"type": "string",
"maxLength": 255,
"description": "Custom message shown when the discount is sold out. Defaults to a generic message when not set."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/swoogo-discount-create-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.