# Get earmark Get an earmark by its ID. # OpenAPI definition ```json { "openapi": "3.0.0", "info": { "title": "Banking - Transaction banking", "version": "0.9.0", "description": "Transaction banking API", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "Sandbox API server for testing" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Earmarking (external accounts)", "description": "Earmarking endpoints supporting external accounts" } ], "components": { "parameters": { "EarmarkIdPath": { "name": "earmarkId", "in": "path", "description": "Earmark ID generated by [Create earmark](https://developers.pismo.io/pismo-docs/reference/post-corporate-v2-earmarks).", "schema": { "type": "string" }, "required": true, "example": "1234" } }, "schemas": { "AccountID3": { "type": "integer", "format": "int64", "description": "Account ID generated by [Create Corporate Account](https://developers.pismo.io/pismo-docs/reference/post-account).
\n`minimum: 1`\n`maximum: 4294967295`\n", "example": 102701621 }, "BusinessDate": { "type": "string", "format": "date", "description": "Specifying a `business_date` value impacts the account balance history.
\nNotes:\n - The business date is in ISO 8601 format.\n - The business date allows users to designate the balance history cycle in which a payment is posted.\n - You can specify a `business_date` within the current working day or up to one working day before or after.\n", "example": "2023-03-09" }, "EarmarkAmount": { "type": "number", "format": "float", "description": "Earmark amount
\n`minimum: 0.01`\n`maximum: 18446744073709551617`\n", "minimum": 0.01, "maximum": 18446744073709552000, "example": 50 }, "EarmarkBalance": { "type": "number", "description": "Earmark balance. Initially equal to the earmarked amount and decreases as the reserved funds are used up or decreased in a decrease operation. It can also increase if an increase operation is performed.
\n`minimum: 0`\n`maximum: 18446744073709551617`\n", "minimum": 0, "maximum": 18446744073709552000, "example": 123.45 }, "EarmarkDescription": { "type": "string", "description": "Earmark description", "minLength": 1, "maxLength": 40 }, "EarmarkIdReturned": { "type": "string", "description": "Earmark ID. Used as the primary key for query and update operations. It has the same value as the tracking ID, if one is provided. Generated by [Create Earmark](https://developers.pismo.io/pismo-docs/reference/post-corporate-v2-earmarks).", "example": "da85b309-a7f7-4316-b2ad-f069f0838058" }, "EarmarkReleaseDatetime": { "type": "string", "description": "RFC 3339 date/time for earmark release.\nUsed to schedule a cash-out (usually a payment) at the specified release date and time.\nAt `release_datetime`, an automatic process releases the earmarked funds and settles the cash-out.\nIf no `release_datetime` is set, the earmarked amount is held indefinitely until the customer cancels the earmark.\n", "minLength": 20, "maxLength": 30, "example": "2022-02-10T15:00:00Z", "format": "date-time" }, "EarmarkResponse": { "type": "object", "properties": { "earmark_id": { "$ref": "#/components/schemas/EarmarkIdReturned" }, "account_id": { "$ref": "#/components/schemas/AccountID3" }, "external_account_id": { "$ref": "#/components/schemas/ExternalAccountIdForEarmark" }, "description": { "$ref": "#/components/schemas/EarmarkDescription" }, "amount": { "$ref": "#/components/schemas/EarmarkAmount" }, "balance": { "$ref": "#/components/schemas/EarmarkBalance" }, "release_datetime": { "$ref": "#/components/schemas/EarmarkReleaseDatetime" }, "internal_operations": { "$ref": "#/components/schemas/InternalOperations" } } }, "ErrorCode": { "description": "Error code\n`minLength: 1`\n`maxLength: 12`\n", "type": "string", "minLength": 1, "maxLength": 12, "example": "WPMT0017" }, "ErrorMessage": { "description": "Error message\n`minLength: 1`\n`maxLength: 1000`\n", "type": "string", "minLength": 1, "maxLength": 1000, "example": "Invalid JSON payload received: Error unmarshalling request" }, "ErrorResponse": { "type": "object", "properties": { "code": { "$ref": "#/components/schemas/ErrorCode" }, "message": { "$ref": "#/components/schemas/ErrorMessage" } } }, "ExternalAccountIdForEarmark": { "type": "string", "description": "External ID of the account on which the earmark is created.\nShould be the same `external_account_id` that was used to log in.\nShould be the same `external_account_id` used in [Create Corporate Account](https://developers.pismo.io/pismo-docs/reference/post-account).\n", "maxLength": 60, "pattern": "^[a-zA-Z0-9-]+$", "example": "b993ba96-b3e8-4ef7-9cf7-7eee5ddafdab" }, "Force": { "type": "boolean", "description": "Whether a payment validation rule should be executed in a forced state (`true`) or not (`false`).
\nAllowed for `LEDGER` validation rule.\n", "example": false }, "InternalOperation": { "type": "object", "description": "Internal operation performed to hold or release funds", "properties": { "tracking_id": { "$ref": "#/components/schemas/TrackingID" }, "business_date": { "$ref": "#/components/schemas/BusinessDate" }, "type": { "$ref": "#/components/schemas/InternalOperationType" }, "processing_code": { "$ref": "#/components/schemas/ProcessingCode" }, "amount": { "$ref": "#/components/schemas/InternalOperationAmount" }, "validation_rules": { "$ref": "#/components/schemas/ValidationRules" }, "created_at": { "$ref": "#/components/schemas/InternalOperationCreatedAt" }, "metadata": { "$ref": "#/components/schemas/InternalOperationMetadata" } }, "required": [ "tracking_id" ] }, "InternalOperationAmount": { "type": "number", "description": "Internal operation amount
\n`minimum: 0`\n`maximum: 18446744073709551617`\n", "minimum": 0, "maximum": 18446744073709552000, "example": 50 }, "InternalOperationCreatedAt": { "type": "string", "format": "datetime", "description": "Internal operation creation time. Format = yyyy-mm-dd:hr:mm:ss.\n", "example": "2022-02-10T15:00:00Z" }, "InternalOperationMetadata": { "type": "object", "description": "Key-value pairs containing data intended for storage in the Pismo system." }, "InternalOperations": { "type": "array", "description": "List of internal operations performed to hold or release the earmark funds.", "items": { "$ref": "#/components/schemas/InternalOperation" } }, "InternalOperationType": { "type": "string", "description": "Internal operation type.
\n`minLength: 1`\n`maxLength: 13`\n", "enum": [ "HOLD_FUNDS", "RELEASE_FUNDS", "INCREASE", "DECREASE" ], "example": "HOLD_FUNDS" }, "Override": { "type": "boolean", "description": "Whether to override the validation rule in the payment process (`true`) or not (`false`).
\nAllowed for `ACCOUNT_STATUS` validation rule.\n", "example": false }, "ProcessingCode": { "type": "string", "description": "Processing code used to create the underlying transaction. Each internal operation type uses a default processing code.
\n`minLength: 1`\n`maxLength: 6`\n", "minLength": 1, "maxLength": 6, "example": "219248" }, "TrackingID": { "type": "string", "description": "A unique payment tracking number provided by the client. If an existing `tracking_id` already exists in the system, the API returns a `409` error.\n\nThis field is:\n - Unique within the Organization.\n - Immutable — It can't be updated.\n - Not recyclable — You can't reuse a `tracking_id`.\n", "minLength": 1, "maxLength": 43, "example": "0a50c88a-ade8-4bcc-a639-9a0b0f11e244" }, "ValidationRule": { "title": "ValidationRule", "type": "object", "properties": { "override": { "$ref": "#/components/schemas/Override" }, "force": { "$ref": "#/components/schemas/Force" } } }, "ValidationRules": { "title": "ValidationRules", "type": "object", "description": "Rules that determine which validations are executed during the payment process.
\nAvailable validation rules:\n - `LEDGER`\n - `ACCOUNT_STATUS`\n", "additionalProperties": { "$ref": "#/components/schemas/ValidationRule" }, "example": { "ACCOUNT_STATUS": { "override": false }, "LEDGER": { "force": false } } } }, "responses": { "404NotFound": { "description": "The specified resource was not found" }, "500InternalServer": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Generic internal error": { "value": { "code": "ECMN9999", "message": "Internal error" } } } } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "paths": { "/corporate/v1/earmarks/{earmarkId}": { "get": { "summary": "Get earmark", "operationId": "find-corporate-earmark", "description": "Get an earmark by its ID.", "parameters": [ { "$ref": "#/components/parameters/EarmarkIdPath" } ], "tags": [ "Earmarking (external accounts)" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EarmarkResponse" } } } }, "404": { "$ref": "#/components/responses/404NotFound" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```