{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-invoice-auto-reminder-config-setup-schema.json",
  "title": "invoice_auto_reminder_config_setup",
  "description": "Request body for initializing invoice auto reminder configuration. The request may include up to two reminder configurations (BEFORE_DUE and AFTER_DUE), which will be applied to all invoices created by the merchant. If only one reminder type is provided, the missing reminder type will be created using the default configuration in INACTIVE state. If the request body is empty, both reminder types will be created using the default configuration in INACTIVE state. Reminder configurations created using the provided payload are set to ACTIVE state.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-auto-reminder-configuration-api-openapi.yml#/components/schemas/invoice_auto_reminder_config_setup",
  "type": "object",
  "properties": {
    "configurations": {
      "description": "An array of invoice auto reminder configurations. The array can contain a maximum of two configurations, one for BEFORE_DUE reminder type and one for AFTER_DUE reminder type.",
      "type": "array",
      "minItems": 1,
      "maxItems": 2,
      "items": {
        "$ref": "#/$defs/invoice_reminder_configuration"
      }
    }
  },
  "$defs": {
    "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})$"
    },
    "invoice_reminder_configuration": {
      "title": "invoice_reminder_configuration",
      "description": "Invoice reminder configuration object to specify the frequency, reminder type and other params related to invoice auto reminder configuration.",
      "type": "object",
      "required": [
        "interval",
        "repetition",
        "type"
      ],
      "properties": {
        "id": {
          "description": "Represents the auto reminder configuration id.",
          "type": "string",
          "minLength": 20,
          "maxLength": 20,
          "pattern": "^RC-[A-Z0-9]+$",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/reminder_type"
        },
        "status": {
          "$ref": "#/$defs/reminder_status"
        },
        "interval": {
          "$ref": "#/$defs/reminder_interval"
        },
        "repetition": {
          "description": "The repetition at which the auto reminder has to be set. Note: For `BEFORE_DUE` reminder type, repetition is always one.",
          "type": "integer",
          "minimum": 1,
          "maximum": 7
        },
        "notification": {
          "$ref": "#/$defs/reminder_notification"
        },
        "metadata": {
          "$ref": "#/$defs/reminder_metadata"
        },
        "links": {
          "description": "An array of request-related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).",
          "type": "array",
          "minItems": 1,
          "maxItems": 4,
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/link_description"
          }
        }
      }
    },
    "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."
            }
          ]
        }
      }
    },
    "reminder_interval": {
      "title": "Invoice auto reminder interval",
      "description": "Defines the time interval used to determine when a reminder is sent relative to the invoice due date. The interval consists of a unit (for example, DAY) and a numeric value that specifies how many units before or after the due date the reminder is triggered.",
      "type": "object",
      "required": [
        "unit",
        "value"
      ],
      "properties": {
        "unit": {
          "$ref": "#/$defs/reminder_interval_unit"
        },
        "value": {
          "description": "The number of time units before or after the invoice due date when the reminder is sent. Minimum value is 1 and maximum value is 7.",
          "type": "integer",
          "minimum": 1,
          "maximum": 7
        }
      }
    },
    "reminder_interval_unit": {
      "description": "Defines the recurrence unit of time for sending automatic reminders.",
      "type": "string",
      "enum": [
        "DAY"
      ],
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "DAY"
          ],
          "description": "Reminders are sent daily."
        }
      ]
    },
    "reminder_metadata": {
      "title": "Invoice auto reminder configuration metadata.",
      "description": "Invoice auto reminder configuration metadata.",
      "type": "object",
      "properties": {
        "created_time": {
          "allOf": [
            {
              "$ref": "#/$defs/date_time"
            },
            {
              "description": "Represents the date and time at which this auto reminder configuration was created.",
              "readOnly": true
            }
          ]
        },
        "updated_time": {
          "allOf": [
            {
              "$ref": "#/$defs/date_time"
            },
            {
              "description": "Represents the date and time at which this auto reminder configuration was last updated.",
              "readOnly": true
            }
          ]
        }
      }
    },
    "reminder_notification": {
      "title": "Notification",
      "description": "The email notification to send to the invoicer or payer on auto reminder configuration.",
      "type": "object",
      "properties": {
        "send_to_invoicer": {
          "description": "Indicates whether to send a copy of the email to the merchant.",
          "type": "boolean",
          "default": false
        }
      }
    },
    "reminder_status": {
      "description": "The status of the auto reminder configuration.",
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "readOnly": true,
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ACTIVE"
          ],
          "description": "Specifies the configuration is active."
        },
        {
          "type": "string",
          "enum": [
            "INACTIVE"
          ],
          "description": "Specifies the configuration is inactive."
        }
      ]
    },
    "reminder_type": {
      "description": "The type of the auto reminder configuration.",
      "type": "string",
      "enum": [
        "BEFORE_DUE",
        "AFTER_DUE"
      ],
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "BEFORE_DUE"
          ],
          "description": "Represents the auto reminder configuration for invoices prior to their due date."
        },
        {
          "type": "string",
          "enum": [
            "AFTER_DUE"
          ],
          "description": "Represents the auto reminder configuration for invoices after their due date."
        }
      ]
    }
  }
}