Bank Statements Common Adapter API

OpenAPI

Скачать исходную спецификацию

Варианты

  • Паблик

Операции API

GET /v1/statement/transactions — Getting a list of total account transactions

{
  "tags": [
    "Transactions"
  ],
  "summary": "Getting a list of total account transactions",
  "operationId": "getTransactions",
  "parameters": [
    {
      "name": "account",
      "description": "Account number",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "example": 40702810000006960000
      }
    },
    {
      "name": "fields",
      "description": "List of required fields",
      "in": "query",
      "required": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "ContractorInn",
            "CreditDocument",
            "Debet",
            "Credit",
            "DocumentNumber",
            "Account",
            "OrganizationName",
            "Purpose",
            "ValuationDate",
            "ContractorName",
            "DocumentDate",
            "OperationDate",
            "OperationType",
            "StatementDate",
            "StatementType",
            "Avisetype",
            "ContractorAccount",
            "ContractorBankName",
            "ContractorBankBic",
            "AccountCurrency",
            "Uip",
            "RubPaymentId",
            "Spc",
            "Personalkpp",
            "Corrkpp",
            "Gvc",
            "PersonalBankCorrAccount",
            "CorrBankCorrAccount"
          ]
        }
      }
    },
    {
      "name": "statementDate",
      "description": "Date in the format yyyy-MM-dd. For example, 2022-02-02",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "$ref": "#/components/parameters/Limit"
    },
    {
      "$ref": "#/components/parameters/Offset"
    },
    {
      "$ref": "#/components/parameters/IdTokenHeader"
    }
  ],
  "responses": {
    "200": {
      "description": "List of transactions was successfully received. If there is no data, we return an empty array",
      "headers": {
        "X-Rate-Limit-Limit": {
          "$ref": "#/components/headers/X-Rate-Limit-Limit"
        },
        "X-Rate-Limit-Remaining": {
          "$ref": "#/components/headers/X-Rate-Limit-Remaining"
        },
        "X-Rate-Limit-Reset": {
          "$ref": "#/components/headers/X-Rate-Limit-Reset"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementTransactionResponse"
            }
          },
          "example": "[\n  {\n      \"contractorInn\": \"1234567890\",\n      \"creditDocument\": false,\n      \"debet\": 2137157.19,\n      \"credit\": 0.0,\n      \"documentNumber\": \"654321\",\n      \"account\": \"12345678901234567890\",\n      \"organizationName\": \"ООО Ромашка\",\n      \"purpose\": \"Продажа/покупка валюты. Банковский номер сделки FX_803827. Курс сделки: 83.0439. Пара валют по сделке: EUR/RUR\",\n      \"valuationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"contractorName\": \"АО \\\"Райффайзенбанк\\\" г. Москва\",\n      \"documentDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationType\": \"17\",\n      \"statementDate\": \"2021-10-21T00:00:00+03:00\",\n      \"statementType\": true,\n      \"avisetype\": \"017\",\n      \"contractorAccount\": \"09876543210987654321\",\n      \"contractorBankName\": \"АО \\\"Райффайзенбанк\\\" г. Москва\",\n      \"contractorBankBic\": \"042908701\",\n      \"accountCurrency\": \"RUR\",\n      \"uip\": \"\",\n      \"rubPaymentId\" :  \"3911fd9b-bfb6-3db3-86ad-88d116271c7e\",\n      \"personalkpp\": \"770001001\",\n      \"corrkpp\": \"770001008\",\n      \"gvc\": \"020\",\n      \"spc\": \"\",\n      \"corrBankCorrAccount\": \"30101810100000000906\",\n      \"personalBankCorrAccount\": \"30101810600000000786\"\n  }\n]\n"
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "429": {
      "$ref": "#/components/responses/RateLimit"
    }
  }
}

GET /v1/statement/transactions/intraday — Getting a list of intraday account transactions

{
  "tags": [
    "Transactions"
  ],
  "summary": "Getting a list of intraday account transactions",
  "operationId": "getTransactionsIntraday",
  "parameters": [
    {
      "name": "account",
      "description": "Account number",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "example": 40702810000006960000
      }
    },
    {
      "name": "fields",
      "description": "List of required fields",
      "in": "query",
      "required": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "ContractorInn",
            "CreditDocument",
            "Debet",
            "Credit",
            "DocumentNumber",
            "Account",
            "OrganizationName",
            "Purpose",
            "ValuationDate",
            "ContractorName",
            "DocumentDate",
            "OperationDate",
            "OperationType",
            "StatementDate",
            "StatementType",
            "Avisetype",
            "ContractorAccount",
            "ContractorBankName",
            "ContractorBankBic",
            "AccountCurrency",
            "Uip",
            "IntradayOperationId",
            "RubPaymentId",
            "Spc",
            "Personalkpp",
            "Corrkpp",
            "Gvc",
            "PersonalBankCorrAccount",
            "CorrBankCorrAccount"
          ]
        }
      }
    },
    {
      "name": "statementDate",
      "description": "Date in the format yyyy-MM-dd. For example, 2022-02-02",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "$ref": "#/components/parameters/Limit"
    },
    {
      "$ref": "#/components/parameters/Offset"
    },
    {
      "$ref": "#/components/parameters/IdTokenHeader"
    }
  ],
  "responses": {
    "200": {
      "description": "List of transactions was successfully received. If there is no data, we return an empty array",
      "headers": {
        "X-Rate-Limit-Limit": {
          "$ref": "#/components/headers/X-Rate-Limit-Limit"
        },
        "X-Rate-Limit-Remaining": {
          "$ref": "#/components/headers/X-Rate-Limit-Remaining"
        },
        "X-Rate-Limit-Reset": {
          "$ref": "#/components/headers/X-Rate-Limit-Reset"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatementTransactionIntradayResponse"
            }
          },
          "example": "[\n  {\n      \"contractorInn\": \"1234567890\",\n      \"creditDocument\": true,\n      \"debet\": 0.0,\n      \"credit\": 2137157.19,\n      \"documentNumber\": \"654321\",\n      \"account\": \"12345678901234567890\",\n      \"organizationName\": \"ООО Поставщик\",\n      \"purpose\": \"Оплата заказа №323KB\",\n      \"valuationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"contractorName\": \"АО Покупатель\",\n      \"documentDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationType\": \"01\",\n      \"statementDate\": \"2021-10-21T00:00:00+03:00\",\n      \"statementType\": false,\n      \"avisetype\": \"710\",\n      \"contractorAccount\": \"09876543210987654321\",\n      \"contractorBankName\": \"АО \\\"Райффайзенбанк\\\" г. Москва\",\n      \"contractorBankBic\": \"042908701\",\n      \"accountCurrency\": \"RUR\",\n      \"uip\": \"0\",\n      \"intradayOperationId\": \"6ccbde84-931f-313f-8eab-81a5af47092e\",\n      \"rubPaymentId\" :  \"3911fd9b-bfb6-3db3-86ad-88d116271c7e\",\n      \"personalkpp\": \"770001001\",\n      \"corrkpp\": \"770001008\",\n      \"gvc\": \"020\",\n      \"spc\": \"\",\n      \"corrBankCorrAccount\": \"30101810100000000906\",\n      \"personalBankCorrAccount\": \"30101810600000000786\"\n  },\n  {\n      \"contractorInn\": null,\n      \"creditDocument\": true,\n      \"debet\": 0.0,\n      \"credit\": 2137157.19,\n      \"documentNumber\": null,\n      \"account\": \"12345678901234567890\",\n      \"organizationName\": \"ООО Поставщик\",\n      \"purpose\": \"Оплата заказа №324KB\",\n      \"valuationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"contractorName\": null,\n      \"documentDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationDate\": \"2021-10-21T00:00:00+03:00\",\n      \"operationType\": null,\n      \"statementDate\": \"2021-10-21T00:00:00+03:00\",\n      \"statementType\": false,\n      \"avisetype\": \"710\",\n      \"contractorAccount\": null,\n      \"contractorBankName\": null,\n      \"contractorBankBic\": null,\n      \"accountCurrency\": \"RUR\",\n      \"uip\": null,\n      \"intradayOperationId\": \"3831fd9b-bfb6-3db3-86ad-88d116271c75\",\n      \"rubPaymentId\" :  \"3931fd9b-bfb6-3db3-86ad-88d116271c70\",\n      \"personalkpp\": \"770001001\",\n      \"corrkpp\": \"770001008\",\n      \"gvc\": \"020\",\n      \"spc\": \"1011\",\n      \"corrBankCorrAccount\": \"30101810100000000906\",\n      \"personalBankCorrAccount\": \"30101810600000000786\"\n  }\n]\n"
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "429": {
      "$ref": "#/components/responses/RateLimit"
    }
  }
}

Схемы и примеры

{
  "headers": {
    "X-Rate-Limit-Limit": {
      "description": "Request limit per second",
      "schema": {
        "type": "integer"
      }
    },
    "X-Rate-Limit-Remaining": {
      "description": "The remaining number of requests (count).",
      "schema": {
        "type": "integer"
      }
    },
    "X-Rate-Limit-Reset": {
      "description": "The time in milliseconds before the remain rate count is reset.",
      "schema": {
        "type": "integer"
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Access token",
      "bearerFormat": "JWT"
    }
  },
  "schemas": {
    "GatewayErrorResponse": {
      "type": "object",
      "required": [
        "http_status_code",
        "message"
      ],
      "properties": {
        "http_status_code": {
          "description": "HTTP status",
          "type": "integer"
        },
        "message": {
          "description": "Error",
          "type": "string"
        }
      }
    },
    "ServiceErrorResponse": {
      "type": "object",
      "required": [
        "status",
        "error"
      ],
      "properties": {
        "status": {
          "description": "HTTP status",
          "type": "integer"
        },
        "error": {
          "description": "Error",
          "type": "string"
        },
        "message": {
          "description": "Error details",
          "type": "string"
        }
      }
    },
    "StatementTransactionResponse": {
      "required": [
        "account",
        "accountCurrency",
        "avisetype",
        "contractorAccount",
        "contractorBankName",
        "contractorName",
        "credit",
        "creditDocument",
        "debet",
        "documentNumber",
        "documentDate",
        "operationDate",
        "operationType",
        "organizationName",
        "purpose",
        "statementDate",
        "statementType",
        "uip",
        "valuationDate"
      ],
      "type": "object",
      "properties": {
        "contractorInn": {
          "type": "string",
          "description": "Counterparty - TIN"
        },
        "creditDocument": {
          "type": "boolean",
          "description": "Debit/Credit"
        },
        "debet": {
          "type": "number",
          "description": "Debit",
          "multipleOf": 0.01
        },
        "credit": {
          "type": "number",
          "description": "Credit",
          "multipleOf": 0.01
        },
        "documentNumber": {
          "type": "string",
          "description": "Transaction number"
        },
        "account": {
          "type": "string",
          "description": "Account number"
        },
        "organizationName": {
          "type": "string",
          "description": "Client - Name"
        },
        "purpose": {
          "type": "string",
          "description": "Purpose"
        },
        "valuationDate": {
          "type": "string",
          "description": "Value date"
        },
        "contractorName": {
          "type": "string",
          "description": "Counterparty - Name"
        },
        "documentDate": {
          "type": "string",
          "description": "Document creation date"
        },
        "operationDate": {
          "type": "string",
          "description": "Transaction date"
        },
        "operationType": {
          "type": "string",
          "description": "Transaction type"
        },
        "statementDate": {
          "type": "string",
          "description": "Statement date"
        },
        "statementType": {
          "type": "boolean",
          "description": "Final"
        },
        "avisetype": {
          "type": "string",
          "description": "Advice code"
        },
        "contractorAccount": {
          "type": "string",
          "description": "Counterparty - Account"
        },
        "contractorBankName": {
          "type": "string",
          "description": "Counterparty - Name of the bank"
        },
        "contractorBankBic": {
          "type": "string",
          "description": "Counterparty - BIC (relevant only for Russian banks)"
        },
        "accountCurrency": {
          "type": "string",
          "description": "Currency of account"
        },
        "uip": {
          "type": "string",
          "description": "UPI"
        },
        "rubPaymentId": {
          "type": "string",
          "description": "Ruble payment ID"
        },
        "personalkpp": {
          "type": "string",
          "description": "Organization KPP"
        },
        "corrkpp": {
          "type": "string",
          "description": "Сounterparty KPP"
        },
        "gvc": {
          "type": "string",
          "description": "Code of the type of transaction used in SWIFT"
        },
        "spc": {
          "type": "string",
          "description": "Code transmitted when using Speed Up Collect product to identify payments"
        },
        "corrBankCorrAccount": {
          "type": "string",
          "description": "Сounterparty bank correspondent account"
        },
        "personalBankCorrAccount": {
          "type": "string",
          "description": "Сustomer bank correspondent account"
        }
      }
    },
    "StatementTransactionIntradayResponse": {
      "required": [
        "account",
        "accountCurrency",
        "avisetype",
        "credit",
        "creditDocument",
        "debet",
        "operationDate",
        "organizationName",
        "purpose",
        "statementDate",
        "statementType",
        "valuationDate"
      ],
      "type": "object",
      "properties": {
        "contractorInn": {
          "type": "string",
          "description": "Counterparty - TIN"
        },
        "creditDocument": {
          "type": "boolean",
          "description": "Debit/Credit"
        },
        "debet": {
          "type": "number",
          "description": "Debit",
          "multipleOf": 0.01
        },
        "credit": {
          "type": "number",
          "description": "Credit",
          "multipleOf": 0.01
        },
        "documentNumber": {
          "type": "string",
          "description": "Transaction number"
        },
        "account": {
          "type": "string",
          "description": "Client - Account number"
        },
        "organizationName": {
          "type": "string",
          "description": "Client - Name"
        },
        "purpose": {
          "type": "string",
          "description": "Purpose"
        },
        "valuationDate": {
          "type": "string",
          "description": "Value date"
        },
        "contractorName": {
          "type": "string",
          "description": "Counterparty - Name"
        },
        "documentDate": {
          "type": "string",
          "description": "Document creation date"
        },
        "operationDate": {
          "type": "string",
          "description": "Transaction date"
        },
        "operationType": {
          "type": "string",
          "description": "Transaction type"
        },
        "statementDate": {
          "type": "string",
          "description": "Statement date"
        },
        "statementType": {
          "type": "boolean",
          "description": "Final"
        },
        "avisetype": {
          "type": "string",
          "description": "Advice code"
        },
        "contractorAccount": {
          "type": "string",
          "description": "Counterparty - Account"
        },
        "contractorBankName": {
          "type": "string",
          "description": "Counterparty - Name of the bank"
        },
        "contractorBankBic": {
          "type": "string",
          "description": "Counterparty - BIC (relevant only for Russian banks)"
        },
        "accountCurrency": {
          "type": "string",
          "description": "Currency of account"
        },
        "uip": {
          "type": "string",
          "description": "UPI"
        },
        "intradayOperationId": {
          "type": "string",
          "description": "Intraday operation ID"
        },
        "rubPaymentId": {
          "type": "string",
          "description": "Ruble payment ID"
        },
        "personalkpp": {
          "type": "string",
          "description": "Organization KPP"
        },
        "corrkpp": {
          "type": "string",
          "description": "Сounterparty KPP"
        },
        "gvc": {
          "type": "string",
          "description": "Code of the type of transaction used in SWIFT"
        },
        "spc": {
          "type": "string",
          "description": "Code transmitted when using Speed Up Collect product to identify payment"
        },
        "corrBankCorrAccount": {
          "type": "string",
          "description": "Сounterparty bank correspondent account"
        },
        "personalBankCorrAccount": {
          "type": "string",
          "description": "Сustomer bank correspondent account"
        }
      }
    }
  },
  "responses": {
    "Unauthorized": {
      "description": "Unauthorized",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayErrorResponse"
          },
          "example": {
            "http_status_code": 401,
            "message": "Unauthorized"
          }
        }
      }
    },
    "RateLimit": {
      "description": "Exceeded the maximum number of request",
      "headers": {
        "X-Rate-Limit-Limit": {
          "description": "Request limit per second",
          "schema": {
            "type": "integer"
          }
        },
        "X-Rate-Limit-Remaining": {
          "description": "The remaining number of requests (count).",
          "schema": {
            "type": "integer"
          }
        },
        "X-Rate-Limit-Reset": {
          "description": "The time in milliseconds before the remain rate count is reset.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayErrorResponse"
          },
          "example": {
            "http_status_code": 429,
            "message": "Rate limit exceeded ! You reach the limit of 10 requests per 1 seconds"
          }
        }
      }
    },
    "BadRequest": {
      "description": "Bad request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceErrorResponse"
          },
          "example": {
            "status": 400,
            "error": "Bad Request",
            "message": "Type mismatch."
          }
        }
      }
    }
  },
  "parameters": {
    "IdTokenHeader": {
      "name": "Id-Token",
      "description": "User ID token",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "example": "SUQgVE9LRU4gRk9SIFRFU1RJTkc="
      }
    },
    "Limit": {
      "name": "limit",
      "description": "Maximum size of the received list of transactions",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "format": "int32",
        "example": 20
      }
    },
    "Offset": {
      "name": "offset",
      "description": "Size offset from the beginning of the list of transactions. If the parameter is out of selection range, an empty array is returned",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "format": "int32",
        "example": 0
      }
    }
  }
}