# List accounts by document number Search for accounts by `document_number`. You can also optionally specify `program_ID` or `account_status`. # 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": "Accounts", "description": "Endpoints to manage accounts" } ], "components": { "parameters": { "PageNumberQuery": { "in": "query", "name": "page", "description": "Page number.", "required": false, "schema": { "type": "integer", "format": "int32", "default": 1 } }, "PerPageMax100Query": { "name": "perPage", "in": "query", "description": "Items per page.", "required": false, "schema": { "type": "integer", "format": "int32", "default": 10, "minimum": 1, "maximum": 100, "example": 100 } } }, "schemas": { "AccountID": { "type": "integer", "format": "int64", "description": "Account ID", "example": 1001 }, "AccountStatus3": { "type": "string", "pattern": "^[A-Z_-]+$", "description": "Account status. The pre-defined account statuses are `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", "maxLength": 200, "example": "NORMAL" }, "AccountsV3Request": { "required": [ "document_number" ], "properties": { "document_number": { "$ref": "#/components/schemas/DocumentNumber" }, "program_id": { "$ref": "#/components/schemas/ProgramID" }, "account_status": { "$ref": "#/components/schemas/AccountStatus3" } } }, "AccountsV3Response": { "properties": { "account_id": { "$ref": "#/components/schemas/AccountID" }, "customer_id": { "$ref": "#/components/schemas/CustomerID" }, "account_status": { "$ref": "#/components/schemas/AccountStatus3" }, "acquisition_id": { "$ref": "#/components/schemas/AcquisitionIdOfApplicationForm" }, "program_id": { "$ref": "#/components/schemas/ProgramID" } } }, "AcquisitionIdOfApplicationForm": { "type": "integer", "format": "int64", "description": "ID of the application form that originated the account", "example": 1234, "minimum": 1 }, "CustomerID": { "type": "integer", "format": "int64", "description": "Customer ID", "example": 100211299 }, "DocumentNumber": { "type": "string", "maxLength": 15, "description": "Document number, such as a government tax ID.", "example": "31457828046" }, "ProgramID": { "type": "integer", "format": "int64", "description": "Program ID", "example": 12345 }, "SimpleError": { "title": "SimpleError", "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "Error message" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true }, "paths": { "/accounts/v3/accounts/search": { "post": { "operationId": "post-accounts-v3-accounts-search", "summary": "List accounts by document number", "description": "Search for accounts by `document_number`. You can also optionally specify `program_ID` or `account_status`.", "tags": [ "Accounts" ], "parameters": [ { "$ref": "#/components/parameters/PageNumberQuery" }, { "$ref": "#/components/parameters/PerPageMax100Query" } ], "requestBody": { "description": "Account sensible search fields", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountsV3Request" } } } }, "responses": { "200": { "description": "Account returned", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AccountsV3Response" } } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "examples": { "Account not found": { "value": { "message": "Account not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Not possible to search the account" } } } } } } } } } } } ```