Instantpay scheduler status changed

Internal-only endpoint. This event is triggered by scheduled actions in instantpay services. For example, scheduled PIX.

Type: object
Domain: instantpay-scheduler
Event: scheduler_status_change
Version: 1

|
scheduler_id required

Title: Scheduler ID
Description: Scheduler identifier.
Type: string
Example:
BBA99AF1-0843-451E-A8C9-2EF5D20C5276

scheduler_domain required

Title: Domain
Description: Scheduler domain identifier.
Type: string
Example:
pix

status required

Title: Status
Description: Status of scheduler
Type: string
Must be one of the following:
ACTIVED
INACTIVED
CANCELLED
Example:
ACTIVED

start_date required

Title: Start date
Description: Date of start the scheduler
Type: string
Format: date
Example:
2024-12-12

end_date required

Title: End date
Description: Date of end the scheduler
Type: string
Format: date
Example:
2024-12-12

type required

Title: Type
Description: Type of scheduler
Type: string
Must be one of the following:
RECURRING
ONCE
Example:
RECURRING

day_type required

Title: Day type
Description: Day type of scheduler
Type: string
Must be one of the following:
CALENDAR
BUSINESS
Example:
CALENDAR

interval required

Title: Interval
Description: Interval type of scheduler
Type: string
Must be one of the following:
MONTH
WEEK
DAY
Example:
MONTH

continue_even_failed required

Title: Continue even failed
Description: If this is set to true, the next run will be scheduled even if the current run fails.
Type: boolean
Example:
true

execution_hour required

Title: Execution hour
Description: Time at which the schedule will be executed. UTC
Type: string
Example:
00:00:00

retry_hour required

Title: Execution retry hour
Description: Time at which execution will be retried in case of initial execution failure. UTC
Type: string
Example:
22:00:00

status_history

Type: array

created_at required

Title: Created at
Description: Date of criate execution
Type: string
Format: date-time
Example:
2024-12-12T11:00:00.000Z

status required

Title: Status
Description: Status of execution
Type: string
Must be one of the following:
PENDING
EXECUTING
SUCCESS
FAIL
CANCELLED
Example:
SUCCESS

cid required

Title: CID
Description: Pismo CID of execution
Type: string
Example:
BBA99AF1-0843-451E-A8C9-2EF5D20C5276

error

Title: Error
Description: If the event was caused by a scheduling processing failure, you will receive more details here.
Type: object

message required

Title: Message
Description: Error message
Type: string

code required

Title: Code
Description: Error code
Type: string

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "type": "object",
    "title": "Instantpay scheduler status changed",
    "description": "Internal-only endpoint. This event is triggered by scheduled actions in instantpay services. For example, scheduled PIX.",
    "examples": [
        {
            "domain": "instantpay-scheduler",
            "event_type": "scheduler_status_change",
            "schema_version": 1,
            "org_id": "4ea21a59-7f4f-4087-aab6-a9a96733084a",
            "cid": "cid",
            "timestamp": "2023-10-25T18:29:19Z",
            "data": {
                "scheduler_id": "51a7e875-35a5-4c81-aa77-51bdf3090835",
                "scheduler_domain": "pix",
                "status": "ACTIVED",
                "start_date": "2024-10-13",
                "end_date": "2024-12-12",
                "type": "RECURRING",
                "day_type": "CALENDAR",
                "interval": "MONTH",
                "continue_even_failed": true,
                "execution_hour": "00:00:00",
                "retry_hour": "22:00:00",
                "error": {
                    "message": "",
                    "code": ""
                }
            }
        }
    ],
    "properties": {
        "scheduler_id": {
            "type": "string",
            "title": "Scheduler ID",
            "description": "Scheduler identifier.",
            "examples": [
                "BBA99AF1-0843-451E-A8C9-2EF5D20C5276"
            ]
        },
        "scheduler_domain": {
            "type": "string",
            "title": "Domain",
            "description": "Scheduler domain identifier.",
            "examples": [
                "pix"
            ]
        },
        "status": {
            "type": "string",
            "title": "Status",
            "description": "Status of scheduler",
            "enum": [
                "ACTIVED",
                "INACTIVED",
                "CANCELLED"
            ],
            "examples": [
                "ACTIVED"
            ]
        },
        "start_date": {
            "type": "string",
            "format": "date",
            "title": "Start date",
            "description": "Date of start the scheduler",
            "examples": [
                "2024-12-12"
            ]
        },
        "end_date": {
            "type": "string",
            "format": "date",
            "title": "End date",
            "description": "Date of end the scheduler",
            "examples": [
                "2024-12-12"
            ]
        },
        "type": {
            "type": "string",
            "title": "Type",
            "description": "Type of scheduler",
            "enum": [
                "RECURRING",
                "ONCE"
            ],
            "examples": [
                "RECURRING"
            ]
        },
        "day_type": {
            "type": "string",
            "title": "Day type",
            "description": "Day type of scheduler",
            "enum": [
                "CALENDAR",
                "BUSINESS"
            ],
            "examples": [
                "CALENDAR"
            ]
        },
        "interval": {
            "type": "string",
            "title": "Interval",
            "description": "Interval type of scheduler",
            "enum": [
                "MONTH",
                "WEEK",
                "DAY"
            ],
            "examples": [
                "MONTH"
            ]
        },
        "continue_even_failed": {
            "type": "boolean",
            "title": "Continue even failed",
            "description": "If this is set to true, the next run will be scheduled even if the current run fails.",
            "examples": [
                true
            ]
        },
        "execution_hour": {
            "type": "string",
            "title": "Execution hour",
            "description": "Time at which the schedule will be executed. UTC",
            "examples": [
                "00:00:00"
            ]
        },
        "retry_hour": {
            "type": "string",
            "title": "Execution retry hour",
            "description": "Time at which execution will be retried in case of initial execution failure. UTC",
            "examples": [
                "22:00:00"
            ]
        },
        "status_history": {
            "title": "Status history",
            "type": "array",
            "description": "List with the history of execution status",
            "items": [
                {
                    "type": "object",
                    "properties": {
                        "created_at": {
                            "type": "string",
                            "title": "Created at",
                            "description": "Date of criate execution",
                            "format": "date-time",
                            "examples": [
                                "2024-12-12T11:00:00.000Z"
                            ]
                        },
                        "status": {
                            "type": "string",
                            "title": "Status",
                            "description": "Status of execution",
                            "enum": [
                                "PENDING",
                                "EXECUTING",
                                "SUCCESS",
                                "FAIL",
                                "CANCELLED"
                            ],
                            "examples": [
                                "SUCCESS"
                            ]
                        },
                        "cid": {
                            "type": "string",
                            "title": "CID",
                            "description": "Pismo CID of execution",
                            "examples": [
                                "BBA99AF1-0843-451E-A8C9-2EF5D20C5276"
                            ]
                        }
                    },
                    "required": [
                        "created_at",
                        "status",
                        "cid"
                    ]
                }
            ]
        },
        "error": {
            "title": "Error",
            "type": "object",
            "description": "If the event was caused by a scheduling processing failure, you will receive more details here.",
            "properties": {
                "message": {
                    "type": "string",
                    "title": "Message",
                    "description": "Error message"
                },
                "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "Error code"
                }
            },
            "required": [
                "message",
                "code"
            ]
        }
    },
    "required": [
        "scheduler_id",
        "scheduler_domain",
        "status",
        "start_date",
        "end_date",
        "type",
        "day_type",
        "interval",
        "continue_even_failed",
        "execution_hour",
        "retry_hour"
    ]
}