Ghost · Schema
OfferInput
Input fields for creating or updating an offer.
PublishingNewslettersMembershipsContentOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| name | string | Internal name |
| code | string | URL-safe code |
| display_title | string | Public-facing title |
| display_description | string | Public-facing description |
| type | string | Discount type |
| cadence | string | Billing cadence |
| amount | integer | Discount amount |
| duration | string | Discount duration |
| duration_in_months | integer | Months for repeating duration |
| currency | string | Currency code for fixed discounts |
| status | string | Offer status |
| tier | object | Tier to apply the offer to |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/OfferInput",
"title": "OfferInput",
"type": "object",
"description": "Input fields for creating or updating an offer.",
"required": [
"name",
"code",
"display_title",
"type",
"cadence",
"amount",
"duration",
"tier"
],
"properties": {
"name": {
"type": "string",
"description": "Internal name"
},
"code": {
"type": "string",
"description": "URL-safe code"
},
"display_title": {
"type": "string",
"description": "Public-facing title"
},
"display_description": {
"type": "string",
"description": "Public-facing description",
"nullable": true
},
"type": {
"type": "string",
"enum": [
"percent",
"fixed",
"trial"
],
"description": "Discount type"
},
"cadence": {
"type": "string",
"enum": [
"month",
"year"
],
"description": "Billing cadence"
},
"amount": {
"type": "integer",
"description": "Discount amount",
"minimum": 0
},
"duration": {
"type": "string",
"enum": [
"once",
"repeating",
"forever",
"trial"
],
"description": "Discount duration"
},
"duration_in_months": {
"type": "integer",
"description": "Months for repeating duration",
"nullable": true,
"minimum": 1
},
"currency": {
"type": "string",
"description": "Currency code for fixed discounts",
"nullable": true,
"pattern": "^[A-Z]{3}$"
},
"status": {
"type": "string",
"enum": [
"active",
"archived"
],
"description": "Offer status"
},
"tier": {
"type": "object",
"description": "Tier to apply the offer to",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Tier identifier"
}
}
}
}
}