# List statuses List account statuses registered 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": { "AccountStatusNameQuery2": { "name": "name", "in": "query", "description": "Account status name filter. Pre-defined account statuses include `DEBIT_ONLY`, `NORMAL`, `BLOCKED` and `CANCELLED`. You can create your own account statuses with the [Create status](https://developers.pismo.io/pismo-docs/reference/v4-post-account-status) endpoint. \n", "required": false, "schema": { "type": "string", "pattern": "^[A-Z_]+$", "example": "NORMAL" } }, "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 } }, "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": { "AccountStatusDescription": { "type": "string", "description": "Account status description", "maxLength": 500, "example": "Full operational account" }, "AccountStatusID": { "type": "integer", "format": "int64", "description": "Account status ID", "example": 1234567890 }, "AccountStatusName2": { "type": "string", "description": "Account status name. Pre-defined account statuses include `DEBIT_ONLY`, `NORMAL`, `BLOCKED` and `CANCELLED`. You can create your own account statuses with the [Create status](https://developers.pismo.io/pismo-docs/reference/v4-post-account-status) endpoint. \n", "pattern": "^[A-Z_]+$", "maxLength": 200, "example": "NORMAL" }, "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" }, "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" }, "IsFinalStatus": { "type": "boolean", "description": "Is this a final status? An account with a final status cannot have its status updated. Defaults to `false`.\n\n**Note:** Even if a status is final, it can still be [rolled back](https://developers.pismo.io/pismo-docs/reference/patch-v2-accounts-accountid-status-rollback).\n", "example": false }, "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 }, "StatusesResponse": { "type": "object", "description": "Paginated response for account status", "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/StatusResponse" } } } }, "StatusResponse": { "type": "object", "description": "Object response for account status", "properties": { "status_id": { "$ref": "#/components/schemas/AccountStatusID" }, "name": { "$ref": "#/components/schemas/AccountStatusName2" }, "description": { "$ref": "#/components/schemas/AccountStatusDescription" }, "state": { "$ref": "#/components/schemas/StatusState" }, "is_final": { "$ref": "#/components/schemas/IsFinalStatus" }, "allowed_operations": { "$ref": "#/components/schemas/AllowedOperations" } } }, "StatusState": { "type": "string", "description": "Status 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/statuses": { "get": { "operationId": "v4-get-account-status", "summary": "List statuses", "description": "List account statuses registered 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/AccountStatusNameQuery2" }, { "$ref": "#/components/parameters/StateQuery" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusesResponse" }, "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": [ { "status_id": 1, "name": "CANCELLED", "description": "Cancelled account with no operations available.", "state": "ACTIVE", "is_final": true, "allowed_operations": "NO_OPERATIONS" }, { "status_id": 2, "name": "NORMAL", "description": "Active account with full operations available.", "state": "ACTIVE", "is_final": false, "allowed_operations": "ALL_OPERATIONS" }, { "status_id": 3, "name": "BLOCKED", "description": "Blocked account that can only receive credit operations.", "state": "ACTIVE", "is_final": false, "allowed_operations": "CREDIT_ONLY" } ] } } } } } }, "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" } } } } } } } } } } } ```