Earmark created, updated, or canceled

Type: object
Domain: corporate
Event: earmark
Version: 1

|
id required

Title: Earmark unique identifier generated by Pismo
Type: string
Min length: 1
Max length: 60
Example:
8490b160-6a41-466e-917f-12c0fd8e998e

action required

Title: Current earmark action
Description:
It only accepts the values:
CREATED: When the earmark has been created.
FORCE_CREATED: When the earmark has been created by force.
UPDATED: When the earmark has been updated.
EXECUTED: When the earmark has been executed.
CANCELED: When the earmark has been canceled.
EXPIRED: When the earmark has been expired.
Type: string
Min length: 1
Max length: 20
Example:
UPDATED

status required

Title: Current earmark status
Description:
It only accepts the values:
CREATED: When the earmark has been created.
FORCE_CREATED: When the earmark has been created by force.
EXPIRED: When the earmark has been expired.
CANCELED: When the earmark has been canceled.
Type: string
Min length: 1
Max length: 20
Example:
CREATED

account_id required

Title: Account identifier
Type: integer
Example:
5501

amount required

Title: Earmark amount
Type: number
Example:
10.1
100.2
30

balance required

Title: Earmark balance. It is initially equal to the earmarked amount and will decrease as the reserved funds are used or decreased in a decrease operation, or will increase if an increase operation is performed
Type: number
Example:
10.1
100.2
30

currency required

Title: Represents a 3-letter alphabetic code, conforming to the ISO 4217 standard, which corresponds to the currency utilized in the earmark
Type: string
Min length: 1
Max length: 3
Example:
USD
GBP
BRL

external_account_id

Title: External Account identifier
Description: A custom account ID string that uniquely identifies the account within your organization.
Type: string or null
Min length: 1
Max length: 60
Example:
UK1-2e6e6817-92b2-4ab8-a23e-a50e2f0e6d90

release_datetime

Title: RFC 3339 date/time for earmark release
Type: string or null
Format: date-time
Example:
2023-05-20T20:29:59.026Z

internal_operation

Title: Internal operation
Description: Contains the transaction data executed internally during the request.

When creating, updating, or canceling an earmark, only internal_operation is included in the event to refer to the operation being performed (create, update, or cancel). When creating, updating, or canceling an earmark, corporate_metadata is generated in the details field of the Transaction created event. Note that for Update earmark and Cancel earmark, it does not contain the complete list of all actions performed on the earmark.
For the update operation, if the operation does not change the earmark amount, the internal_operation field is returned empty.
Type: object or null

type required

Title: Type of the internal operation
Type: string
Min length: 1
Max length: 20
Example:
HOLD_FUNDS
RELEASE_FUNDS
INCREASE
DECREASE

tracking_id required

Title: A unique operation tracking number
Type: string
Min length: 1
Max length: 75
Example:
b12eeb8b-bd3c-4367-b1d6-484c2e4d530a

processing_code required

Title: Processing code used to create the underlying transaction. Each internal operation type uses a default processing code.
Type: string
Min length: 1
Max length: 6
Example:
123456

amount required

Title: Internal operation amount
Type: number
Example:
10.1
100.2
30

created_at required

Title: RFC 3339 date/time for the operation creation
Type: string
Format: date-time
Example:
2023-05-20T20:29:59.026Z

metadata

Title: Key-value fields that contain any related data your organization needs to store at Pismo
Type: object or null
Additional properties: true
Example:

{
    "custom_info": "value"
}
{
    "$schema": "http://json-schema.org/draft-07/schema",
    "type": "object",
    "title": "Earmark created, updated, or canceled",
    "required": [
        "id",
        "account_id",
        "action",
        "status",
        "amount",
        "balance",
        "currency"
    ],
    "properties": {
        "id": {
            "type": "string",
            "title": "Earmark unique identifier generated by Pismo",
            "minLength": 1,
            "maxLength": 60,
            "examples": [
                "8490b160-6a41-466e-917f-12c0fd8e998e"
            ]
        },
        "action": {
            "type": "string",
            "title": "Current earmark action",
            "description": "\n\nIt only accepts the values:\n\n<span style='font-weight:bold'>CREATED:</span> When the earmark has been created.\n\n<span style='font-weight:bold'>FORCE_CREATED:</span> When the earmark has been created by force.\n\n<span style='font-weight:bold'>UPDATED:<span/> When the earmark has been updated.\n\n<span style='font-weight:bold'>EXECUTED:</span> When the earmark has been executed.\n\n<span style='font-weight:bold'>CANCELED:</span> When the earmark has been canceled.\n\n<span style='font-weight:bold'>EXPIRED:</span> When the earmark has been expired.",
            "minLength": 1,
            "maxLength": 20,
            "examples": [
                "UPDATED"
            ]
        },
        "status": {
            "type": "string",
            "title": "Current earmark status",
            "description": "\n\nIt only accepts the values:\n\n<span style='font-weight:bold'>CREATED:</span> When the earmark has been created.\n\n<span style='font-weight:bold'>FORCE_CREATED:</span> When the earmark has been created by force.\n\n<span style='font-weight:bold'>EXPIRED:</span> When the earmark has been expired.\n\n<span style='font-weight:bold'>CANCELED:</span> When the earmark has been canceled.",
            "minLength": 1,
            "maxLength": 20,
            "examples": [
                "CREATED"
            ]
        },
        "account_id": {
            "type": "integer",
            "title": "Account identifier",
            "minimum": 1,
            "maximum": 99999999999,
            "examples": [
                5501
            ]
        },
        "amount": {
            "type": "number",
            "title": "Earmark amount",
            "minimum": 0.01,
            "maximum": 18446744073709551617,
            "examples": [
                10.1,
                100.2,
                30
            ]
        },
        "balance": {
            "type": "number",
            "title": "Earmark balance. It is initially equal to the earmarked amount and will decrease as the reserved funds are used or decreased in a decrease operation, or will increase if an increase operation is performed",
            "minimum": 0,
            "maximum": 18446744073709551617,
            "examples": [
                10.1,
                100.2,
                30
            ]
        },
        "currency": {
            "type": "string",
            "title": "Represents a 3-letter alphabetic code, conforming to the ISO 4217 standard, which corresponds to the currency utilized in the earmark",
            "minLength": 1,
            "maxLength": 3,
            "examples": [
                "USD",
                "GBP",
                "BRL"
            ]
        },
        "external_account_id": {
            "type": [
                "string",
                "null"
            ],
            "title": "External Account identifier",
            "description": "A custom account ID string that uniquely identifies the account within your organization.",
            "minLength": 1,
            "maxLength": 60,
            "examples": [
                "UK1-2e6e6817-92b2-4ab8-a23e-a50e2f0e6d90"
            ]
        },
        "release_datetime": {
            "type": [
                "string",
                "null"
            ],
            "title": "RFC 3339 date/time for earmark release",
            "format": "date-time",
            "examples": [
                "2023-05-20T20:29:59.026Z"
            ]
        },
        "internal_operation": {
            "type": [
                "object",
                "null"
            ],
            "title": "Internal operation",
            "description": "Contains the transaction data executed internally during the request.\n<br> When creating, updating, or canceling an earmark, only `internal_operation` is included in the event to refer to the operation being performed (create, update, or cancel).  When creating, updating, or canceling an earmark, `corporate_metadata` is generated in the `details` field of the [Transaction created](https://developers.pismo.io/events/docs/transaction-creation-1) event. Note that for [Update earmark](https://developers.pismo.io/pismo-docs/reference/patch-corporate-v2-earmarks-earmarkid) and [Cancel earmark](https://developers.pismo.io/pismo-docs/reference/post-corporate-v2-earmarks-earmarkid-cancel), it does not contain the complete list of all actions performed on the earmark.\n For the update operation, if the operation does not change the earmark amount, the `internal_operation` field is returned empty.",
            "required": [
                "type",
                "tracking_id",
                "processing_code",
                "amount",
                "created_at"
            ],
            "properties": {
                "type": {
                    "type": "string",
                    "title": "Type of the internal operation",
                    "minLength": 1,
                    "maxLength": 20,
                    "examples": [
                        "HOLD_FUNDS",
                        "RELEASE_FUNDS",
                        "INCREASE",
                        "DECREASE"
                    ]
                },
                "tracking_id": {
                    "type": "string",
                    "title": "A unique operation tracking number",
                    "minLength": 1,
                    "maxLength": 75,
                    "examples": [
                        "b12eeb8b-bd3c-4367-b1d6-484c2e4d530a"
                    ]
                },
                "processing_code": {
                    "type": "string",
                    "title": "Processing code used to create the underlying transaction. Each internal operation type uses a default processing code.",
                    "minLength": 1,
                    "maxLength": 6,
                    "examples": [
                        "123456"
                    ]
                },
                "amount": {
                    "type": "number",
                    "title": "Internal operation amount",
                    "minimum": 0.01,
                    "maximum": 18446744073709551617,
                    "examples": [
                        10.1,
                        100.2,
                        30
                    ]
                },
                "created_at": {
                    "type": [
                        "string"
                    ],
                    "title": "RFC 3339 date/time for the operation creation",
                    "format": "date-time",
                    "examples": [
                        "2023-05-20T20:29:59.026Z"
                    ]
                },
                "metadata": {
                    "type": [
                        "object",
                        "null"
                    ],
                    "title": "Key-value fields that contain any related data your organization needs to store at Pismo",
                    "examples": [
                        {
                            "custom_info": "value"
                        }
                    ],
                    "additionalProperties": true
                }
            }
        }
    }
}
{
    "id": "8490b160-6a41-466e-917f-12c0fd8e998e",
    "action": "UPDATED",
    "status": "CREATED",
    "account_id": 5501,
    "amount": 10.1,
    "balance": 10.1,
    "currency": "USD",
    "external_account_id": "UK1-2e6e6817-92b2-4ab8-a23e-a50e2f0e6d90",
    "release_datetime": "2023-05-20T20:29:59.026Z",
    "internal_operation": {
        "type": "HOLD_FUNDS",
        "tracking_id": "b12eeb8b-bd3c-4367-b1d6-484c2e4d530a",
        "processing_code": "123456",
        "amount": 10.1,
        "created_at": "2023-05-20T20:29:59.026Z",
        "metadata": {
            "custom_info": "value"
        }
    }
}