Account migration completed

Event generated when an account migration finishes and the result is reported. Result can be either SUCCESS or FAIL.

Type: object
Additional properties: false
Domain: migration
Event: account_outgoing
Version: 1

|
code required

Title: Migration message code
Description: The code of message for systems
Type: string
Example:
MIGR-0001

message required

Title: The message schema
Description: Message of account migration result
Type: string
Example:
Account migrated with success

migration

Title: Migration Identifiers Object
Description: Identifier sent on start of migration process
Type: object
Additional properties: false
Example:

{
    "id": "migration-id",
    "version_date": "2021-08-11T11:25:00.000Z",
    "phase_id": "Rollout_Jan2022",
    "status": "MIGRATED"
}
id required

Title: Migration Identifier
Type: string
Example:
migration-id

version_date required

Title: Version Date of Migration Identifier
Type: string
Example:
2021-08-11T11:25:00.000Z

phase_id

Title: Identifies migration phase
Type: string
Example:
Rollout_Jan2022

status

Title: Account migration status
Type: string
Must be one of the following:
TO_MIGRATE
MIGRATING
MIGRATED
NOT_MIGRATE
Example:
MIGRATED

status required

Title: Migration status
Description: If the result of account migration was success or not
Type: string
Must be one of the following:
SUCCESS
FAIL
Example:
SUCCESS
FAIL

entity

Title: Pismo generated account information
Type: object
Additional properties: false
Example:

{
    "account_id": 9999,
    "customer_id": 1234,
    "addresses": [
        {
            "id": 111
        }
    ]
}
account_id required

Title: Account Identifier
Description: Account identifier generated by pismo.
Type: integer
Example:
9999

customer_id required

Title: Customer Identifier
Description: Customer identifier generated by pismo.
Type: integer
Example:
1234

addresses

Description: Addresses Account identifier generated by pismo.
Type: array
Example:

[
    {
        "id": 111
    }
]
id

Description: Address account unique identifier
Type: number
Example:
111

operation

Title: Migration Operation
Description: If the account migration is a creation or update
Type: string
Must be one of the following:
CREATION
UPDATE
Example:
UPDATE
CREATION

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://pismo.io/events/migration/account_outgoing-1.json",
    "type": "object",
    "title": "Account migration completed",
    "description": "Event generated when an account migration finishes and the result is reported. Result can be either `SUCCESS` or `FAIL`.",
    "examples": [
        {
            "operation": "UPDATE",
            "status": "SUCCESS",
            "code": "MIGR-0001",
            "message": "Account migrated with success",
            "migration": {
                "id": "migration-id",
                "version_date": "2021-08-11T11:25:00.000Z",
                "phase_id": "Rollout_Jan2022",
                "status": "MIGRATED"
            },
            "entity": {
                "account_id": 9999,
                "customer_id": 1234,
                "addresses": [
                    {
                        "id": 111
                    }
                ]
            }
        }
    ],
    "required": [
        "code",
        "message",
        "migration",
        "status"
    ],
    "properties": {
        "code": {
            "$id": "#/properties/code",
            "type": "string",
            "title": "Migration message code",
            "description": "The code of message for systems",
            "default": "",
            "examples": [
                "MIGR-0001"
            ]
        },
        "message": {
            "$id": "#/properties/message",
            "type": "string",
            "title": "The message schema",
            "description": "Message of account migration result",
            "default": "",
            "examples": [
                "Account migrated with success"
            ]
        },
        "migration": {
            "$id": "#/properties/migration",
            "type": "object",
            "title": "Migration Identifiers Object",
            "description": "Identifier sent on start of migration process",
            "default": {},
            "examples": [
                {
                    "id": "migration-id",
                    "version_date": "2021-08-11T11:25:00.000Z",
                    "phase_id": "Rollout_Jan2022",
                    "status": "MIGRATED"
                }
            ],
            "required": [
                "id",
                "version_date"
            ],
            "properties": {
                "id": {
                    "$id": "#/properties/migration/properties/id",
                    "type": "string",
                    "title": "Migration Identifier",
                    "examples": [
                        "migration-id"
                    ]
                },
                "version_date": {
                    "$id": "#/properties/migration/properties/version_date",
                    "type": "string",
                    "title": "Version Date of Migration Identifier",
                    "examples": [
                        "2021-08-11T11:25:00.000Z"
                    ]
                },
                "phase_id": {
                    "$id": "#/properties/migration/properties/phase_id",
                    "type": "string",
                    "title": "Identifies migration phase",
                    "examples": [
                        "Rollout_Jan2022"
                    ]
                },
                "status": {
                    "$id": "#/properties/migration/properties/status",
                    "type": "string",
                    "title": "Account migration status",
                    "enum": [
                        "TO_MIGRATE",
                        "MIGRATING",
                        "MIGRATED",
                        "NOT_MIGRATE"
                    ],
                    "examples": [
                        "MIGRATED"
                    ]
                }
            },
            "additionalProperties": false
        },
        "status": {
            "$id": "#/properties/status",
            "type": "string",
            "title": "Migration status",
            "description": "If the result of account migration was success or not",
            "enum": [
                "SUCCESS",
                "FAIL"
            ],
            "examples": [
                "SUCCESS",
                "FAIL"
            ]
        },
        "entity": {
            "$id": "#/properties/entity",
            "type": "object",
            "title": "Pismo generated account information",
            "default": {},
            "examples": [
                {
                    "account_id": 9999,
                    "customer_id": 1234,
                    "addresses": [
                        {
                            "id": 111
                        }
                    ]
                }
            ],
            "required": [
                "account_id",
                "customer_id"
            ],
            "properties": {
                "account_id": {
                    "$id": "#/properties/entity/properties/account_id",
                    "type": "integer",
                    "title": "Account Identifier",
                    "description": "Account identifier generated by pismo.",
                    "examples": [
                        9999
                    ]
                },
                "customer_id": {
                    "$id": "#/properties/entity/properties/customer_id",
                    "type": "integer",
                    "title": "Customer Identifier",
                    "description": "Customer identifier generated by pismo.",
                    "examples": [
                        1234
                    ]
                },
                "addresses": {
                    "$id": "#/properties/entity/properties/addresses",
                    "type": "array",
                    "title": "Addresses Account Identifier",
                    "examples": [
                        [
                            {
                                "id": 111
                            }
                        ]
                    ],
                    "additionalItems": true,
                    "items": {
                        "type": "object",
                        "description": "Addresses Account identifier generated by pismo.",
                        "examples": [
                            {
                                "id": 111
                            }
                        ],
                        "properties": {
                            "id": {
                                "$id": "#/properties/entity/properties/addresses/items/anyOf/0/properties/id",
                                "type": "number",
                                "description": "Address account unique identifier",
                                "examples": [
                                    111
                                ]
                            }
                        }
                    }
                }
            },
            "additionalProperties": false
        },
        "operation": {
            "$id": "#/properties/operation",
            "type": "string",
            "title": "Migration Operation",
            "description": "If the account migration is a creation or update",
            "enum": [
                "CREATION",
                "UPDATE"
            ],
            "examples": [
                "UPDATE",
                "CREATION"
            ]
        }
    },
    "additionalProperties": false
}
{
    "operation": "UPDATE",
    "status": "SUCCESS",
    "code": "MIGR-0001",
    "message": "Account migrated with success",
    "migration": {
        "id": "migration-id",
        "version_date": "2021-08-11T11:25:00.000Z",
        "phase_id": "Rollout_Jan2022",
        "status": "MIGRATED"
    },
    "entity": {
        "account_id": 9999,
        "customer_id": 1234,
        "addresses": [
            {
                "id": 111
            }
        ]
    }
}