# List status reasons List account status reasons for the Organization. The Org ID is parsed from the access token. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Accounts", "version": "1.0.0", "description": "API used to manage accounts domain", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "API server for testing" } ], "tags": [ { "name": "Statuses and reasons", "description": "Endpoints to configure accounts, statuses, and reasons." } ], "components": { "parameters": { "MaxItemsQuery": { "name": "maxItems", "in": "query", "description": "Number of items on current page. `200` maximum. Default is `200`.", "required": false, "schema": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 200, "example": 100 } }, "NextCursorQuery": { "name": "nextCursor", "in": "query", "description": "Cursor value used to get the next page. This is the `next_cursor` value returned in the response.", "required": false, "schema": { "type": "string", "example": "MEgCQQCo9..." } }, "PerPageMax100Query": { "name": "perPage", "in": "query", "description": "Items per page.", "required": false, "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 100, "example": 100 } }, "ReasonNameQuery": { "name": "name", "in": "query", "description": "Reason name filter", "required": false, "schema": { "type": "string", "example": "Unblocked" } }, "RequestedPageQuery": { "name": "page", "in": "query", "description": "Requested page", "required": false, "schema": { "type": "integer", "format": "int32", "minimum": 1, "example": 1 } }, "StateQuery": { "name": "state", "in": "query", "description": "Filter by `ACTIVE` or `INACTIVE`. Default is `ACTIVE`.", "required": false, "schema": { "type": "array", "items": { "type": "string", "enum": [ "ACTIVE", "INACTIVE" ] } } } }, "schemas": { "AccountExternalId": { "type": "string", "description": "\nClient-created ID from an external system or application. **REQUIRED** for `VIRTUAL` accounts.\n", "maxLength": 60, "example": "8c8a4dd7-e48f-4c15-85b7-9d12f401057f" }, "AllowedOperations": { "type": "string", "description": "Allowed operations for this status.\n\nPossible values:\n* `ALL_OPERATIONS`—Both credit and debit operations are allowed.\n* `CREDIT_ONLY`—Only credit operations allowed.\n* `DEBIT_ONLY`—Only debit operations allowed.\n* `NO_OPERATIONS`—Neither account credit nor debit operations allowed.\n", "enum": [ "ALL_OPERATIONS", "CREDIT_ONLY", "DEBIT_ONLY", "NO_OPERATIONS" ], "example": "ALL_OPERATIONS" }, "CreateAccountReasonDescription": { "type": "string", "description": "Reason description", "maxLength": 80, "example": "Unblocked account after settling the account." }, "CreateAccountReasonID": { "type": "integer", "format": "int64", "description": "Reason ID", "example": 1234567890 }, "CreateAccountReasonName": { "type": "string", "description": "Reason name", "maxLength": 60, "example": "Unblocked" }, "CurrentPage": { "type": "integer", "format": "int32", "description": "Current page", "example": 1 }, "CurrentPageCount": { "type": "integer", "format": "int32", "description": "Number of items on the current page", "example": 100 }, "CursorResponse": { "type": "object", "properties": { "next_cursor": { "$ref": "#/components/schemas/NextCursor" }, "has_next": { "$ref": "#/components/schemas/HasNext" }, "count": { "$ref": "#/components/schemas/CurrentPageCount" } } }, "ExternalServiceCode": { "type": "string", "description": "Code returned from the external service" }, "HasNext": { "type": "boolean", "description": "Are there more results (retrieved using the `next_cursor` value)?", "example": true }, "MessageDetailsResponse": { "type": "object", "description": "Object response for a user message", "properties": { "payload": { "type": "array", "description": "Details for the request payload errors", "items": { "$ref": "#/components/schemas/MessagePayloadResponse" } }, "parameters": { "type": "array", "description": "Details for the query parameter errors", "items": { "$ref": "#/components/schemas/MessageParameterResponse" } }, "external": { "type": "array", "description": "Details for the external service error", "items": { "$ref": "#/components/schemas/MessageExternalResponse" } } } }, "MessageExternalResponse": { "type": "object", "description": "Object response for detailing external errors for a user message", "properties": { "code": { "$ref": "#/components/schemas/ExternalServiceCode" }, "message": { "type": "string", "description": "Message description from the external service" } } }, "MessageParameterResponse": { "type": "object", "description": "Object response for detailing query parameters errors for a user message", "properties": { "field": { "$ref": "#/components/schemas/ValidationErrorField" }, "message": { "$ref": "#/components/schemas/ValidationErrorMessage" } } }, "MessagePayloadResponse": { "type": "object", "description": "Object response for detailing request payload errors for a user message", "properties": { "field": { "$ref": "#/components/schemas/ValidationErrorField" }, "message": { "$ref": "#/components/schemas/ValidationErrorMessage" } } }, "UserMessageCode": { "type": "string", "description": "Code that identifies the user message", "example": "EACC0000" }, "UserMessage": { "type": "string", "description": "User message", "example": "Timeout while executing the request" }, "MessageResponse": { "type": "object", "description": "Object response for user message", "properties": { "code": { "$ref": "#/components/schemas/UserMessageCode" }, "message": { "$ref": "#/components/schemas/UserMessage" }, "details": { "$ref": "#/components/schemas/MessageDetailsResponse" } } }, "NextCursor": { "type": "string", "description": "Cursor value for the next page", "example": "MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE=" }, "NumberOfPages": { "type": "integer", "format": "int32", "description": "Total pages", "example": 100 }, "PerPage": { "type": "integer", "format": "int64", "description": "Maximum items per page. 100 maximum.", "example": 100 }, "ReasonResponse": { "type": "object", "description": "Object response for account reason", "properties": { "reason_id": { "$ref": "#/components/schemas/CreateAccountReasonID" }, "name": { "$ref": "#/components/schemas/CreateAccountReasonName" }, "description": { "$ref": "#/components/schemas/CreateAccountReasonDescription" }, "allowed_operations": { "$ref": "#/components/schemas/AllowedOperations" }, "state": { "$ref": "#/components/schemas/ReasonState" }, "external_id": { "$ref": "#/components/schemas/AccountExternalId" } } }, "ReasonsResponse": { "type": "object", "description": "Paginated response for account reason", "allOf": [ { "$ref": "#/components/schemas/CursorResponse" } ], "properties": { "current_page": { "$ref": "#/components/schemas/CurrentPage" }, "per_page": { "$ref": "#/components/schemas/PerPage" }, "pages": { "$ref": "#/components/schemas/NumberOfPages" }, "total_items": { "$ref": "#/components/schemas/TotalItems" }, "items": { "type": "array", "description": "List of result items", "items": { "$ref": "#/components/schemas/ReasonResponse" } } } }, "ReasonState": { "type": "string", "description": "Reason state", "enum": [ "ACTIVE", "INACTIVE" ], "example": "ACTIVE" }, "TotalItems": { "type": "integer", "format": "int32", "description": "Total items", "example": 500 }, "ValidationErrorField": { "type": "string", "description": "Non-valid field" }, "ValidationErrorMessage": { "type": "string", "description": "Validation error description" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true }, "paths": { "/accounts/v4/reasons": { "get": { "operationId": "v4-get-account-reason", "summary": "List status reasons", "description": "List account status reasons for the Organization. The Org ID is parsed from the access token.\n", "tags": [ "Statuses and reasons" ], "parameters": [ { "$ref": "#/components/parameters/NextCursorQuery" }, { "$ref": "#/components/parameters/MaxItemsQuery" }, { "$ref": "#/components/parameters/RequestedPageQuery" }, { "$ref": "#/components/parameters/PerPageMax100Query" }, { "$ref": "#/components/parameters/ReasonNameQuery" }, { "$ref": "#/components/parameters/StateQuery" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReasonsResponse" }, "examples": { "Default response": { "value": { "next_cursor": "MEgCQQCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2yU1orfgqr41mM70MBAgMBAAE=", "has_next": true, "count": 100, "current_page": 1, "per_page": 100, "pages": 1, "total_items": 3, "items": [ { "reason_id": 1, "name": "Unblocked", "description": "Unblocked account after settling the account.", "allowed_operations": "ALL_OPERATIONS", "state": "ACTIVE" }, { "reason_id": 2, "name": "Active", "description": "Default active reason for an account.", "allowed_operations": "CREDIT_ONLY", "state": "ACTIVE" }, { "reason_id": 3, "name": "Judicial block", "description": "Blocked account by judicial order.", "allowed_operations": "DEBIT_ONLY", "state": "ACTIVE" } ] } } } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" }, "examples": { "Invalid page parameter": { "value": { "code": "EACC0005", "message": "One or more parameters with invalid format", "detail": { "parameters": [ { "field": "page", "message": "Value must be greater than zero" } ] } } }, "Invalid per page parameter": { "value": { "code": "EACC0005", "message": "One or more parameters with invalid format", "detail": { "parameters": [ { "field": "perPage", "message": "Value is not a number" } ] } } }, "Invalid state parameter": { "value": { "code": "EACC0018", "message": "One or more parameters with invalid format", "detail": { "parameters": [ { "field": "state", "message": "Value should be one of: ACTIVE, INACTIVE" } ] } } }, "Invalid next_cursor parameter": { "value": { "code": "WACC0011", "message": "Invalid cursor value" } }, "Invalid maxItems parameter": { "value": { "code": "EACC0005", "message": "One or more parameters with invalid format", "detail": { "parameters": [ { "field": "maxItems", "message": "Value must be greater than zero" } ] } } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" }, "examples": { "Timeout execution": { "value": { "code": "EACC0000", "message": "Timeout while executing the request" } }, "Generic message": { "value": { "code": "EACC9999", "message": "Something went wrong, please try again later" } } } } } } } } } } } ```