Attach a program to a product

Type: object
Domain: savings-account-product
Event: program_attach
Version: 1

|
program_id required

Title: Program Identifier
Description: Program identifier in the pismo platform.
Type: integer
Example:
123456

maturity_date_days required

Title: Maturity days
Description: Number of days when maturity date is reached.
Type: integer
Example:
1111

savings_account required

Title: Savings Account product
Description: Savings Account product information
Type: object

product_id required

Title: Product Identifier
Description: Pismo product identifier in UUID v4 format
Type: string
Example:
2c336e9d-d04f-4fd0-8f6e-25808f48d70c

name required

Title: Product Name
Description: Name given to the product by the customer
Type: string
Example:
My product

interest_plan_id required

Title: Interest Plan Identifier
Description: Pismo interest plan identifier in UUID v4 format
Type: string
Example:
b935acaf-886c-4817-8f7c-c2cc3ce4d509

processing_codes required

Title: Processing Codes
Description: Processing codes used for accounting
Type: object

interest_processing_code required

Title: Interest Processing Code
Description: Processing code for interest processing
Type: string
Example:
202526

withholding_tax_processing_code

Title: Withholding Tax Processing Code
Description: Processing code for withholding tax processing
Type: string
Example:
202530

status required

Title: Status
Description: Savings Account product status.
Type: string
Example:
ACTIVE

created_at required

Title: Creation Datetime
Description: Savings Account product creation date time. Represented as a RFC3339 timestamp
Type: string
Example:
2024-01-23T13:26:25Z

metadata

Title: Custom fields
Description: This field is used to propagate information not directly related to the transactional flow. It's in the key-value pair format and is not handled by Pismo
Type: object or null
Example:

{
    "custom_info": "value"
}
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "Attach a program to a product",
    "required": [
        "program_id",
        "maturity_date_days",
        "savings_account"
    ],
    "properties": {
        "program_id": {
            "type": "integer",
            "title": "Program Identifier",
            "description": "Program identifier in the pismo platform.",
            "examples": [
                123456
            ]
        },
        "maturity_date_days": {
            "type": "integer",
            "title": "Maturity days",
            "description": "Number of days when maturity date is reached.",
            "examples": [
                1111
            ]
        },
        "savings_account": {
            "$ref": "#/definitions/savings_account"
        },
        "metadata": {
            "type": [
                "object",
                "null"
            ],
            "title": "Custom fields",
            "description": "This field is used to propagate information not directly related to the transactional flow. It's in the key-value pair format and is not handled by Pismo",
            "examples": [
                {
                    "custom_info": "value"
                }
            ]
        }
    },
    "definitions": {
        "processing_codes": {
            "type": "object",
            "title": "Processing Codes",
            "description": "Processing codes used for accounting",
            "required": [
                "interest_processing_code"
            ],
            "properties": {
                "interest_processing_code": {
                    "type": "string",
                    "title": "Interest Processing Code",
                    "description": "Processing code for interest processing",
                    "examples": [
                        "202526"
                    ]
                },
                "withholding_tax_processing_code": {
                    "type": "string",
                    "title": "Withholding Tax Processing Code",
                    "description": "Processing code for withholding tax processing",
                    "examples": [
                        "202530"
                    ]
                }
            }
        },
        "savings_account": {
            "type": "object",
            "title": "Savings Account product",
            "description": "Savings Account product information",
            "required": [
                "product_id",
                "name",
                "interest_plan_id",
                "processing_codes",
                "status",
                "created_at"
            ],
            "properties": {
                "product_id": {
                    "type": "string",
                    "title": "Product Identifier",
                    "description": "Pismo product identifier in UUID v4 format",
                    "examples": [
                        "2c336e9d-d04f-4fd0-8f6e-25808f48d70c"
                    ]
                },
                "name": {
                    "type": "string",
                    "title": "Product Name",
                    "description": "Name given to the product by the customer",
                    "examples": [
                        "My product"
                    ]
                },
                "interest_plan_id": {
                    "type": "string",
                    "title": "Interest Plan Identifier",
                    "description": "Pismo interest plan identifier in UUID v4 format",
                    "examples": [
                        "b935acaf-886c-4817-8f7c-c2cc3ce4d509"
                    ]
                },
                "processing_codes": {
                    "$ref": "#/definitions/processing_codes"
                },
                "status": {
                    "type": "string",
                    "title": "Status",
                    "description": "Savings Account product status.",
                    "examples": [
                        "ACTIVE"
                    ]
                },
                "created_at": {
                    "type": "string",
                    "title": "Creation Datetime",
                    "description": "Savings Account product creation date time. Represented as a RFC3339 timestamp",
                    "examples": [
                        "2024-01-23T13:26:25Z"
                    ]
                }
            }
        }
    }
}
{
    "program_id": 123456,
    "maturity_date_days": 1111,
    "savings_account": {
        "product_id": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c",
        "name": "My product",
        "interest_plan_id": "b935acaf-886c-4817-8f7c-c2cc3ce4d509",
        "processing_codes": {
            "interest_processing_code": "202526",
            "withholding_tax_processing_code": "202530"
        },
        "status": "ACTIVE",
        "created_at": "2024-01-23T13:26:25Z"
    },
    "metadata": {
        "custom_info": "value"
    }
}