Conditional Rule
The conditional rule associated with an invoice that defines automated actions or adjustments that apply to an invoice based on specific conditions, such as early payment discounts, or auto cancellation.
Properties
| Name | Type | Description |
|---|---|---|
| conditional_rule_id | object | |
| conditional_rule_type | object | |
| conditional_rule_value | string | Represents the value of the conditional rule it can be a percentage or absolute value. In case of absolute value, which might be:
|
| conditional_rule_value_type | object | |
| discount_id | string | The unique identifier for the stored discount that is created when an early payment discount rule is applied to an invoice. |
| discount_name | string | Represents the name of the stored discount. |
| rule_expiry_terms | object | |
| create_time | object | |
| update_time | object | |
| links | array | HATEOAS link of the created resource. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/paypal/json-schema/paypal-conditional-rule-schema.json",
"title": "Conditional Rule",
"description": "The conditional rule associated with an invoice that defines automated actions or adjustments that apply to an invoice based on specific conditions, such as early payment discounts, or auto cancellation.",
"x-generated": "2026-11-04",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/paypal-conditional-rules-api-openapi.yml#/components/schemas/conditional_rule",
"type": "object",
"allOf": [
{
"$ref": "#/$defs/rules"
},
{
"type": "object",
"properties": {
"links": {
"description": "HATEOAS link of the created resource.",
"type": "array",
"minItems": 1,
"maxItems": 8,
"readOnly": true,
"items": {
"$ref": "#/$defs/link_description"
}
}
}
}
],
"$defs": {
"conditional_rule_conditions": {
"title": "conditional_rule_conditions",
"description": "Defines the time-based condition that triggers the application of this conditional rule. This is expressed as a period relative to either the invoice issue date (for early payment discounts) or the invoice due date (for auto-cancellation). If the value is 'SPECIFIC_DATE', the 'condition_rule_end_date' field must be provided to specify the exact date.",
"type": "string",
"enum": [
"THREE_DAYS_AFTER_ISSUE_DATE",
"SEVEN_DAYS_AFTER_ISSUE_DATE",
"FIFTEEN_DAYS_AFTER_ISSUE_DATE",
"THIRTY_DAYS_AFTER_ISSUE_DATE",
"ONE_DAY_AFTER_DUE_DATE",
"SEVEN_DAYS_AFTER_DUE_DATE",
"FIFTEEN_DAYS_AFTER_DUE_DATE",
"THIRTY_DAYS_AFTER_DUE_DATE",
"SPECIFIC_DATE"
],
"oneOf": [
{
"type": "string",
"enum": [
"THREE_DAYS_AFTER_ISSUE_DATE"
],
"description": "The rule expires 3 days after the invoice issue date. Applicable for early payment discount rules."
},
{
"type": "string",
"enum": [
"SEVEN_DAYS_AFTER_ISSUE_DATE"
],
"description": "The rule expires 7 days after the invoice issue date. Applicable for early payment discount rules."
},
{
"type": "string",
"enum": [
"FIFTEEN_DAYS_AFTER_ISSUE_DATE"
],
"description": "The rule expires 15 days after the invoice issue date. Applicable for early payment discount rules."
},
{
"type": "string",
"enum": [
"THIRTY_DAYS_AFTER_ISSUE_DATE"
],
"description": "The rule expires 30 days after the invoice issue date. Applicable for early payment discount rules."
},
{
"type": "string",
"enum": [
"ONE_DAY_AFTER_DUE_DATE"
],
"description": "The rule takes effect 1 day after the invoice due date. Applicable for auto-cancellation rules."
},
{
"type": "string",
"enum": [
"SEVEN_DAYS_AFTER_DUE_DATE"
],
"description": "The rule takes effect 7 days after the invoice due date. Applicable for auto-cancellation rules."
},
{
"type": "string",
"enum": [
"FIFTEEN_DAYS_AFTER_DUE_DATE"
],
"description": "The rule takes effect 15 days after the invoice due date. Applicable for auto-cancellation rules."
},
{
"type": "string",
"enum": [
"THIRTY_DAYS_AFTER_DUE_DATE"
],
"description": "The rule takes effect 30 days after the invoice due date. Applicable for auto-cancellation rules."
},
{
"type": "string",
"enum": [
"SPECIFIC_DATE"
],
"description": "The rule expires or takes effect on a specific date provided in the `condition_rule_end_date` field. Applicable for all conditional rule types."
}
]
},
"conditional_rule_time_based_uuid": {
"description": "A unique identifier for the conditional rule, This ID is generated as a time-based UUID (version 1) to ensure uniqueness and traceability of the rule creation time.",
"type": "string",
"minLength": 39,
"maxLength": 39,
"pattern": "^CR-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$"
},
"conditional_rule_type": {
"title": "conditional_rule_type",
"description": "This enum defines what type of rule is associated with the invoice or recurring invoice.",
"type": "string",
"enum": [
"EARLY_PAYMENT_DISCOUNT",
"AUTO_CANCEL"
],
"oneOf": [
{
"type": "string",
"enum": [
"EARLY_PAYMENT_DISCOUNT"
],
"description": "A discount applied if the invoice is paid before a specified date or within a certain period after the issue date."
},
{
"type": "string",
"enum": [
"AUTO_CANCEL"
],
"description": "A rule to automatically cancel the invoice if it is not paid by a specified date or a certain period after the due date."
}
]
},
"conditional_rule_value_type": {
"title": "conditional_rule_value_type",
"description": "Type of the stored discount. Used to determine whether its percentage or absolute currency value.",
"type": "string",
"enum": [
"PERCENT",
"AMOUNT"
],
"oneOf": [
{
"type": "string",
"enum": [
"PERCENT"
],
"description": "Percentage of discount used in invoice item or in an invoice."
},
{
"type": "string",
"enum": [
"AMOUNT"
],
"description": "An absolute value of discount used in invoice item or in an invoice based on the currency in invoice."
}
]
},
"date_no_time": {
"description": "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.",
"type": "string",
"minLength": 10,
"maxLength": 10,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"
},
"date_time": {
"description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.<blockquote><strong>Note:</strong> The regular expression provides guidance but does not reject all invalid dates.</blockquote>",
"type": "string",
"minLength": 20,
"maxLength": 64,
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$"
},
"link_description": {
"title": "Link Description",
"description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information.",
"type": "object",
"required": [
"href",
"rel"
],
"properties": {
"href": {
"description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call.",
"type": "string",
"minLength": 0,
"maxLength": 20000,
"pattern": "^.*$"
},
"rel": {
"description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).",
"type": "string",
"minLength": 0,
"maxLength": 100,
"pattern": "^.*$"
},
"method": {
"description": "The HTTP method required to make the related call.",
"type": "string",
"enum": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT"
],
"oneOf": [
{
"type": "string",
"enum": [
"CONNECT"
],
"description": "The HTTP CONNECT method."
},
{
"type": "string",
"enum": [
"DELETE"
],
"description": "The HTTP DELETE method."
},
{
"type": "string",
"enum": [
"GET"
],
"description": "The HTTP GET method."
},
{
"type": "string",
"enum": [
"HEAD"
],
"description": "The HTTP HEAD method."
},
{
"type": "string",
"enum": [
"OPTIONS"
],
"description": "The HTTP OPTIONS method."
},
{
"type": "string",
"enum": [
"PATCH"
],
"description": "The HTTP PATCH method."
},
{
"type": "string",
"enum": [
"POST"
],
"description": "The HTTP POST method."
},
{
"type": "string",
"enum": [
"PUT"
],
"description": "The HTTP PUT method."
}
]
}
}
},
"rule_expiry_terms": {
"title": "conditional_rules",
"description": "The expiry terms that define when a conditional rule on an invoice expires, including the expiry condition and the end date.",
"type": "object",
"required": [
"rule_expiry_condition"
],
"properties": {
"rule_expiry_condition": {
"$ref": "#/$defs/conditional_rule_conditions"
},
"condition_rule_end_date": {
"allOf": [
{
"$ref": "#/$defs/date_no_time"
},
{
"description": "The calculated end date for the conditional rule based on the rule_expiry_condition. This date indicates when the rule will expire or take effect. Specified in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Only UTC is supported in response. For example, `2025-03-12T00:00:00Z`."
}
]
}
}
},
"rules": {
"title": "rules",
"description": "The conditional rule fields that define automated actions or adjustments applied by the merchant to an invoice, such as early payment discounts or auto cancellation.",
"type": "object",
"required": [
"conditional_rule_type",
"rule_expiry_terms"
],
"properties": {
"conditional_rule_id": {
"allOf": [
{
"$ref": "#/$defs/conditional_rule_time_based_uuid"
},
{
"description": "The unique identifier for the conditional rule.",
"readOnly": true
}
]
},
"conditional_rule_type": {
"allOf": [
{
"$ref": "#/$defs/conditional_rule_type"
},
{
"description": "The type of conditional rule applied to the invoice."
}
]
},
"conditional_rule_value": {
"description": "Represents the value of the conditional rule it can be a percentage or absolute value. In case of absolute value, which might be:<ul><li>An integer for currencies like `JPY` that are not typically fractional.</li><li>A decimal fraction for currencies like `TND` that are subdivided into thousandths.</li></ul>For the required number of decimal places for a currency code, see [Currency Codes](/docs/integration/direct/rest/currency-codes/).",
"type": "string",
"minLength": 1,
"maxLength": 32,
"pattern": "^(([0-9]+)|(([0-9]+)?[.][0-9]+))$"
},
"conditional_rule_value_type": {
"allOf": [
{
"$ref": "#/$defs/conditional_rule_value_type"
},
{
"description": "The value type that indicates how the conditional rule value is applied. Use `PERCENT` for a percentage-based discount or `AMOUNT` for an absolute currency value."
}
]
},
"discount_id": {
"title": "Stored Discount ID",
"description": "The unique identifier for the stored discount that is created when an early payment discount rule is applied to an invoice.",
"type": "string",
"minLength": 1,
"maxLength": 22,
"pattern": "^DISC-[A-Z0-9]+$"
},
"discount_name": {
"description": "Represents the name of the stored discount.",
"type": "string",
"minLength": 1,
"maxLength": 40,
"pattern": "^[a-zA-Z0-9\\s]+$"
},
"rule_expiry_terms": {
"$ref": "#/$defs/rule_expiry_terms"
},
"create_time": {
"allOf": [
{
"$ref": "#/$defs/date_time"
},
{
"description": "Indicates time of rule creation.",
"readOnly": true
}
]
},
"update_time": {
"allOf": [
{
"$ref": "#/$defs/date_time"
},
{
"description": "Indicates time of rule update.",
"readOnly": true
}
]
},
"links": {
"description": "HATEOAS links.",
"type": "array",
"minItems": 1,
"maxItems": 10,
"readOnly": true,
"items": {
"allOf": [
{
"$ref": "#/$defs/link_description"
}
]
}
}
}
}
}
}
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
curl "https://apis.io/api/v1/json-schemas/paypal-conditional-rule"
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.