Accounts and Balances Common Adapter API
OpenAPI
Варианты
- Паблик
Операции API
GET /v1/accounts/{number} — Get client account by number
{
"tags": [
"Accounts"
],
"summary": "Get client account by number",
"operationId": "getAccount",
"parameters": [
{
"name": "number",
"in": "path",
"required": true,
"schema": {
"type": "string",
"example": "40700000000000000001"
}
},
{
"name": "fields",
"in": "query",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Number",
"Type",
"Status",
"Mode",
"Name",
"InternationalName",
"Cnum",
"OrganizationId",
"OrganizationName",
"Currency",
"CurrencyCode",
"OperationCurrency",
"OperationCurrencyCode",
"Balance",
"BalanceDate",
"Rest",
"RestDate",
"BalanceInNationalCurrency",
"BranchId",
"BranchName",
"BranchBic",
"BranchCorrespondentAccount",
"BranchCity",
"TrustManagement",
"TrustManagementName",
"TrustManagementInternationalName"
]
}
}
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"description": "Account successfully received",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountResponse"
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
},
"x-Auth-Type": {
"Jwt-Auth": "Bearer"
}
}GET /v1/accounts — Get client accounts
{
"tags": [
"Accounts"
],
"summary": "Get client accounts",
"operationId": "getAccounts",
"parameters": [
{
"name": "fields",
"in": "query",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Number",
"Type",
"Status",
"Mode",
"Name",
"InternationalName",
"Cnum",
"OrganizationId",
"OrganizationName",
"Currency",
"CurrencyCode",
"OperationCurrency",
"OperationCurrencyCode",
"Balance",
"BalanceDate",
"Rest",
"RestDate",
"BalanceInNationalCurrency",
"BranchId",
"BranchName",
"BranchBic",
"BranchCorrespondentAccount",
"BranchCity",
"TrustManagement",
"TrustManagementName",
"TrustManagementInternationalName"
]
}
}
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"$ref": "#/components/parameters/IdTokenHeader"
}
],
"responses": {
"200": {
"description": "Accounts list successfully received",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountResponse"
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
}
},
"x-Auth-Type": {
"Jwt-Auth": "Bearer"
}
}Схемы и примеры
{
"schemas": {
"AccountResponse": {
"required": [
"balance",
"balanceInNationalCurrency",
"branchBic",
"branchCity",
"branchCorrespondentAccount",
"branchId",
"branchName",
"cnum",
"currency",
"currencyCode",
"id",
"internationalName",
"mode",
"name",
"number",
"operationCurrency",
"operationCurrencyCode",
"organizationId",
"organizationName",
"rest",
"status",
"trustManagement",
"trustManagementInternationalName",
"trustManagementName",
"type"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"deprecated": true,
"description": "Идентификатор документа"
},
"number": {
"type": "string",
"description": "Номер счета"
},
"type": {
"type": "integer",
"description": "Тип счета: 1-расчетный, 2-транзитный, 4-депозитный, 5-овердрафт",
"format": "int32"
},
"status": {
"type": "integer",
"description": "Статус счета: 1-открытый, 0-закрытый",
"format": "int32"
},
"mode": {
"type": "integer",
"description": "Режим счета: 0–заблокирован, 1–промежуточные выписки, 2–подготовка выписок по счету, 3-прием документов",
"format": "int32"
},
"name": {
"type": "string",
"description": "Название счета"
},
"internationalName": {
"type": "string",
"description": "Международное название счета"
},
"cnum": {
"type": "string",
"description": "Номер клиента"
},
"organizationId": {
"type": "string",
"description": "Идентификатор организации"
},
"organizationName": {
"type": "string",
"description": "Название организации"
},
"currency": {
"type": "string",
"description": "ISO-код валюты счета"
},
"currencyCode": {
"type": "integer",
"description": "Цифровой код валюты счета",
"format": "int32"
},
"operationCurrency": {
"type": "string",
"description": "ISO-код валюты для операций"
},
"operationCurrencyCode": {
"type": "integer",
"description": "Цифровой код валюты для операций",
"format": "int32"
},
"balance": {
"type": "number",
"description": "Текущий баланс с учетом всех карточных холдов, кредитных линий"
},
"balanceDate": {
"type": "string",
"description": "Дата и время, на которые получен баланс",
"format": "date-time"
},
"rest": {
"type": "number",
"description": "Баланс из итоговой выписки, только собственные средства без учета кредитных линий"
},
"restDate": {
"type": "string",
"description": "Дата и время, на которые получен баланс",
"format": "date-time"
},
"balanceInNationalCurrency": {
"type": "number",
"description": "Текущий баланс в национальной валюте"
},
"branchId": {
"type": "string",
"description": "Идентификатор подразделения"
},
"branchName": {
"type": "string",
"description": "Название подразделения"
},
"branchBic": {
"type": "string",
"description": "БИК подразделения"
},
"branchCorrespondentAccount": {
"type": "string",
"description": "Корреспондентский счет подразделения"
},
"branchCity": {
"type": "string",
"description": "Город (населенный пункт) подразделения банка"
},
"trustManagement": {
"type": "boolean",
"description": "Признак доверительного управления"
},
"trustManagementName": {
"type": "string",
"description": "Название счета доверительного управления"
},
"trustManagementInternationalName": {
"type": "string",
"description": "Международное название счета доверительного управления"
}
}
}
},
"responses": {
"Unauthorized": {
"description": "Authorization failed",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
},
"BadRequest": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
},
"NotFound": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
},
"parameters": {
"IdTokenHeader": {
"name": "Id-Token",
"in": "header",
"description": "Идентификационный токен пользователя",
"required": true,
"schema": {
"type": "string",
"format": "byte"
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "Токен доступа",
"bearerFormat": "JWT"
}
}
}