# List earmarks (Pismo account ID) List all created earmarks, including ones that are canceled or have already been executed. # 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 (Pismo account ID)", "description": "Earmarking endpoints" } ], "components": { "parameters": { "CursorQuery": { "name": "cursor", "in": "query", "description": "Cursor to the next page of results. If no value is specified, it fetches the first page.", "schema": { "type": "string" }, "example": "1234" }, "EarmarkBalanceGtQuery": { "name": "balanceGt", "in": "query", "description": "Filters earmarks whose balance exceeds the specified amount.", "schema": { "type": "number", "format": "float" }, "required": false, "example": 10.01 }, "EarmarkBalanceGeQuery": { "name": "balanceGe", "in": "query", "description": "Filters earmarks with a balance greater than or equal to the specified amount.", "schema": { "type": "number", "format": "float" }, "required": false, "example": 22.5 }, "EarmarkBalanceLtQuery": { "name": "balanceLt", "in": "query", "description": "Filters earmarks with a balance less than the specified amount.", "schema": { "type": "number", "format": "float" }, "required": false, "example": 15.21 }, "EarmarkBalanceLeQuery": { "name": "balanceLe", "in": "query", "description": "Filters earmarks with a balance less than or equal to the specified amount.", "schema": { "type": "number", "format": "float" }, "required": false, "example": 11.33 }, "LimitQuery4": { "name": "limit", "in": "query", "description": "Maximum number of items per page. Defaults to `10`", "schema": { "type": "integer", "format": "int32", "default": 10 }, "example": 20 } }, "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" }, "Cursor": { "type": "string", "description": "Cursor pointing to the next page of results", "example": "eyJJRCI6IjBjOGVhMTA4LWNhZTYtNDA2Mi1iMmQzLTFhMTZkNmJiNGIyOCIsIk9yZ0lEIjoiMDllYThhMDQtNWY5My0xMWVkLTliNmEtMDI0MmFjMTIwMDAyIn0=" }, "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" }, "ListEarmarksResponse": { "title": "ListEarmarksResponse", "type": "object", "properties": { "earmarks": { "type": "array", "description": "List of earmarks", "items": { "$ref": "#/components/schemas/EarmarkResponse" } }, "pagination": { "$ref": "#/components/schemas/Pagination" } } }, "MaxItemsPerPage": { "type": "integer", "format": "int32", "description": "Maximum number of items per page", "example": 10 }, "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 }, "Pagination": { "type": "object", "description": "Data related to list pagination using a cursor.", "properties": { "limit": { "$ref": "#/components/schemas/MaxItemsPerPage" }, "cursor": { "$ref": "#/components/schemas/Cursor" } } }, "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": { "401Unauthorized": { "description": "Access token is missing or invalid" }, "403Forbidden": { "description": "The request has been lost" }, "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": { "/cash-management/v1/earmarks": { "get": { "summary": "List earmarks (Pismo account ID)", "description": "List all created earmarks, including ones that are canceled or have already been executed.", "operationId": "get-cash-management-earmarks", "tags": [ "Earmarking (Pismo account ID)" ], "parameters": [ { "$ref": "#/components/parameters/CursorQuery" }, { "$ref": "#/components/parameters/LimitQuery4" }, { "$ref": "#/components/parameters/EarmarkBalanceGtQuery" }, { "$ref": "#/components/parameters/EarmarkBalanceGeQuery" }, { "$ref": "#/components/parameters/EarmarkBalanceLtQuery" }, { "$ref": "#/components/parameters/EarmarkBalanceLeQuery" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEarmarksResponse" }, "examples": { "Example earmarks list": { "value": { "earmarks": [ { "earmark_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "release_datetime": "2023-03-08T13:06:04.669Z", "amount": 12.34, "balance": 10.2, "account_id": 111111111, "description": "string 1", "internal_operations": [ { "type": "HOLD_FUNDS", "tracking_id": "084cf80f-8e0c-4be5-8083-c3225075323e", "business_date": "2023-03-08", "processing_code": "000000", "amount": 12.34, "created_at": "2023-03-08T11:01:02.669Z", "metadata": { "my-id": 2932 } } ] }, { "earmark_id": "629858d0-21b3-4eb7-be7b-af0850d7a1da", "release_datetime": "2023-03-08T13:06:04.669Z", "amount": 15.78, "balance": 20.34, "account_id": 111111111, "description": "string 2", "internal_operations": [ { "type": "HOLD_FUNDS", "tracking_id": "084cf80f-8e0c-4be5-8083-c3225075323e", "business_date": "2023-03-09", "processing_code": "000000", "amount": 15.78, "created_at": "2023-03-09T11:01:02.669Z", "metadata": { "my-id": 2933 } } ] } ], "pagination": { "limit": 10, "cursor": "eyJJRCI6IjBjOGVhMTA4LWNhZTYtNDA2Mi1iMmQzLTFhMTZkNmJiNGIyOCIsIk9yZ0lEIjoiMDllYThhMDQtNWY5My0xMWVkLTliNmEtMDI0MmFjMTIwMDAyIn0=" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "Invalid query parameter": { "value": { "code": "WCMN0005", "message": "Invalid query parameter" } } } } } }, "401": { "$ref": "#/components/responses/401Unauthorized" }, "403": { "$ref": "#/components/responses/403Forbidden" }, "500": { "$ref": "#/components/responses/500InternalServer" } } } } } } ```