Agreement Service API

OpenAPI

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

Варианты

  • Паблик

Операции API

GET /ui/v1/agreements/{id} — Получение конкретного соглашения по идентификатору

This method is deprecated. Use the [new `/trade-finance/v1/agreements/{id}`](https://developer.raif.ru/docs/api/trade-finance/agreements/get-agreement-by-id) instead.

{
  "tags": [
    "agreement-controller"
  ],
  "summary": "Получение конкретного соглашения по идентификатору",
  "description": "This method is deprecated. Use the [new `/trade-finance/v1/agreements/{id}`](https://developer.raif.ru/docs/api/trade-finance/agreements/get-agreement-by-id) instead.\n",
  "operationId": "getAgreementsOfIdUsingGET",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "Идентификационный токен пользователя",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "cnums",
      "in": "query",
      "description": "Список организаций пользователя",
      "required": true,
      "style": "form",
      "explode": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "example": [
        "test",
        "test1"
      ]
    },
    {
      "name": "id",
      "in": "path",
      "description": "Id соглашения",
      "required": true,
      "schema": {
        "type": "integer",
        "example": "для теста - 1111 или 2222"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AgreementDto"
          }
        }
      }
    },
    "401": {
      "description": "Не авторизован",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Недопустимый запрос",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ForbiddenErrorResponse"
          }
        }
      }
    }
  }
}

GET /ui/v1/agreements — Получение списка соглашений

This method is deprecated. Use the [new ` /trade-finance/v1/agreements`](https://developer.raif.ru/docs/api/trade-finance/agreements/get-agreements) instead.

{
  "tags": [
    "agreement-controller"
  ],
  "summary": "Получение списка соглашений",
  "description": "This method is deprecated. Use the [new ` /trade-finance/v1/agreements`](https://developer.raif.ru/docs/api/trade-finance/agreements/get-agreements) instead.\n",
  "operationId": "getAgreementsUsingGET",
  "parameters": [
    {
      "name": "Id-Token",
      "in": "header",
      "description": "Идентификационный токен пользователя",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "cnums",
      "in": "query",
      "description": "Список организаций пользователя",
      "required": true,
      "style": "form",
      "explode": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "example": [
        "test",
        "test1"
      ]
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UiGetAgreementsResponse"
          }
        }
      }
    },
    "401": {
      "description": "Не авторизован",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayErrorResponse"
          }
        }
      }
    },
    "403": {
      "description": "Недопустимый запрос",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ForbiddenErrorResponse"
          }
        }
      }
    }
  }
}

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

{
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Токен доступа",
      "bearerFormat": "JWT"
    }
  },
  "schemas": {
    "AdditionalAgreementDto": {
      "title": "AdditionalAgreementDto",
      "type": "object",
      "properties": {
        "editionNumber": {
          "type": "string",
          "description": "Номер доп соглашения"
        },
        "editionDate": {
          "type": "string",
          "description": "Дата доп соглашения",
          "format": "date"
        }
      }
    },
    "AgreementCollateral": {
      "title": "AgreementCollateral",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Обеспечение"
        },
        "currency": {
          "type": "string",
          "description": "Валюта"
        },
        "individualConditions": {
          "type": "boolean",
          "description": "Индивидуальные условия"
        },
        "isCpCover": {
          "type": "boolean",
          "description": "СР покрытие"
        },
        "comment": {
          "type": "string",
          "description": "комментарий"
        },
        "coverType": {
          "type": "string",
          "description": "Тип покрытия"
        },
        "inGuaranteeCurrency": {
          "type": "boolean",
          "description": "Гарантия валюты"
        },
        "coverCurrency": {
          "type": "string",
          "description": "Валюта покрытия"
        },
        "coverAmount": {
          "type": "number",
          "description": "Размер покрытия <процент>"
        },
        "coverEndDate": {
          "type": "integer",
          "description": "Дата окончания действия покрытия",
          "format": "int32"
        },
        "bankAccrual": {
          "type": "string",
          "description": "Ставка"
        },
        "rateType": {
          "type": "string",
          "description": "Плавающая ставка"
        },
        "rateAmount": {
          "type": "string",
          "description": "Фиксированная ставка"
        },
        "rateSpread": {
          "type": "string",
          "description": "Распространенная ставка"
        },
        "paymentFrequency": {
          "type": "string",
          "description": "Периодичность выплаты процентов"
        },
        "accountType": {
          "type": "string",
          "description": "Тип счета"
        },
        "account": {
          "type": "string",
          "description": "Счет списания"
        },
        "allCoveragePlacement": {
          "type": "boolean",
          "description": "Чекбокс"
        }
      }
    },
    "AgreementDto": {
      "title": "AgreementDto",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Идентификатор версии соглашения",
          "format": "int64"
        },
        "businessKey": {
          "type": "string",
          "description": "Идентификатор соглашения"
        },
        "number": {
          "type": "string",
          "description": "Номер соглашения"
        },
        "facilityType": {
          "type": "string",
          "description": "Код типа фасилити"
        },
        "facilityTypeName": {
          "type": "string",
          "description": "Лейбл кода фасилити для TFO"
        },
        "status": {
          "type": "string",
          "description": "Статус соглашения"
        },
        "statusName": {
          "type": "string",
          "description": "Наименование статуса"
        },
        "endDate": {
          "type": "string",
          "description": "Дата окончания действия соглашения",
          "format": "date"
        },
        "guaranteesCount": {
          "type": "integer",
          "description": "Количество гарантий, выпущенных под это соглашение",
          "format": "int32"
        },
        "amount": {
          "type": "number",
          "description": "Сумма соглашения"
        },
        "currency": {
          "type": "string",
          "description": "Валюта соглашения"
        },
        "deadLineDate": {
          "type": "string",
          "description": "Период доступности лимита",
          "format": "date"
        },
        "thirdParty": {
          "type": "boolean",
          "description": "Выпуск за третьих лиц"
        },
        "agreementDate": {
          "type": "string",
          "description": "Дата соглашения",
          "format": "date"
        },
        "multiCurrency": {
          "type": "boolean",
          "description": "Мультивалютное"
        },
        "guaranteeSums": {
          "type": "array",
          "description": "Сумма гарантий по соглашению",
          "items": {
            "$ref": "#/components/schemas/GuaranteeSum"
          }
        },
        "additionalAgreements": {
          "type": "array",
          "description": "Дополнительные соглашения",
          "items": {
            "$ref": "#/components/schemas/AdditionalAgreementDto"
          }
        },
        "collateral": {
          "$ref": "#/components/schemas/AgreementCollateral"
        },
        "guaranteeCommission": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommission"
        }
      },
      "example": "{\n              \"id\": 1111,\n              \"businessKey\": \"e0000007-a0a0-9999-aa00-61b0aaaa0003\",\n              \"number\": \"FOR_TFO_409387_1\",\n              \"facilityType\": \"629\",\n              \"facilityTypeName\": \"Гарантийное\",\n              \"status\": \"ACTIVE\",\n              \"statusName\": \"Действует\",\n              \"endDate\": \"2022-05-10\",\n              \"guaranteesCount\": 0,\n              \"amount\": 30000000000,\n              \"currency\": \"RUR\",\n              \"deadLineDate\": \"2022-05-09\",\n              \"thirdParty\": true,\n              \"agreementDate\": \"2018-05-08\",\n              \"multiCurrency\": true,\n              \"guaranteeSums\": null,\n              \"additionalAgreements\": null,\n              \"collateral\": {\n                \"type\": \"securedWithoutCover\",\n                \"currency\": null,\n                \"individualConditions\": null,\n                \"isCpCover\": null,\n                \"comment\": null,\n                \"coverType\": null,\n                \"inGuaranteeCurrency\": null,\n                \"coverCurrency\": null,\n                \"coverAmount\": null,\n                \"coverEndDate\": null,\n                \"bankAccrual\": null,\n                \"rateType\": null,\n                \"rateAmount\": null,\n                \"rateSpread\": null,\n                \"paymentFrequency\": null,\n                \"accountType\": null,\n                \"account\": null,\n                \"allCoveragePlacement\": null\n              }\n            }\n"
    },
    "AgreementGuaranteeCommission": {
      "title": "AgreementGuaranteeCommission",
      "type": "object",
      "properties": {
        "accrual": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommissionAccrual"
        },
        "comment": {
          "type": "string"
        },
        "fixedRate": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommissionFixedRate"
        },
        "individualConditions": {
          "type": "boolean"
        },
        "isCPGuaranteePayment": {
          "type": "boolean"
        },
        "lateFeesRate": {
          "type": "number"
        },
        "minAmount": {
          "$ref": "#/components/schemas/AgreementGuaranteeMinimumCommissionAmount"
        },
        "rate": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommissionRate"
        },
        "ratesRange": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommissionRatesRange"
        },
        "tariff": {
          "type": "string"
        },
        "writeOff": {
          "$ref": "#/components/schemas/AgreementGuaranteeCommissionWriteOff"
        }
      }
    },
    "AgreementGuaranteeCommissionAccrual": {
      "title": "AgreementGuaranteeCommissionAccrual",
      "type": "object",
      "properties": {
        "boundDay": {
          "type": "integer",
          "format": "int32"
        },
        "collectionProcedure": {
          "type": "string"
        },
        "firstPeriodEndType": {
          "type": "string"
        },
        "frequency": {
          "type": "string"
        },
        "increasedRate": {
          "type": "number"
        },
        "period": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "writeOffTransfer": {
          "type": "string"
        }
      }
    },
    "AgreementGuaranteeCommissionFixedRate": {
      "title": "AgreementGuaranteeCommissionFixedRate",
      "type": "object",
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "inAgreementCurrency": {
          "type": "boolean"
        }
      }
    },
    "AgreementGuaranteeCommissionRate": {
      "title": "AgreementGuaranteeCommissionRate",
      "type": "object",
      "properties": {
        "guaranteeTermRates": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/AgreementGuaranteeCommissionTermRate"
          }
        },
        "guaranteeTypeRates": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/AgreementGuaranteeCommissionTypeRate"
          }
        },
        "rateAmount": {
          "type": "number"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "AgreementGuaranteeCommissionRatesRange": {
      "title": "AgreementGuaranteeCommissionRatesRange",
      "type": "object",
      "properties": {
        "rateFrom": {
          "type": "number"
        },
        "rateTo": {
          "type": "number"
        }
      }
    },
    "AgreementGuaranteeCommissionTermRate": {
      "title": "AgreementGuaranteeCommissionTermRate",
      "type": "object",
      "properties": {
        "from": {
          "type": "integer",
          "format": "int32"
        },
        "rateAmount": {
          "type": "number"
        },
        "to": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "AgreementGuaranteeCommissionTypeMinAmount": {
      "title": "AgreementGuaranteeCommissionTypeMinAmount",
      "type": "object",
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "guaranteeType": {
          "type": "string"
        }
      }
    },
    "AgreementGuaranteeCommissionTypeRate": {
      "title": "AgreementGuaranteeCommissionTypeRate",
      "type": "object",
      "properties": {
        "guaranteeType": {
          "type": "string"
        },
        "rateAmount": {
          "type": "number"
        }
      }
    },
    "AgreementGuaranteeCommissionWriteOff": {
      "title": "AgreementGuaranteeCommissionWriteOff",
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "accountType": {
          "type": "string"
        },
        "isPartialRefundPossible": {
          "type": "boolean"
        },
        "partialRefund": {
          "type": "string"
        },
        "period": {
          "type": "integer",
          "format": "int32"
        },
        "periodMaturity": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "AgreementGuaranteeMinimumCommissionAmount": {
      "title": "AgreementGuaranteeMinimumCommissionAmount",
      "type": "object",
      "properties": {
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "guaranteeTypeMinAmounts": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/AgreementGuaranteeCommissionTypeMinAmount"
          }
        },
        "type": {
          "type": "string"
        }
      }
    },
    "GuaranteeSum": {
      "title": "GuaranteeSum",
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "description": "Количество гарантий",
          "format": "int32"
        },
        "sumCurrency": {
          "type": "string",
          "description": "Валюта суммы"
        },
        "sum": {
          "type": "number",
          "description": "Сумма по гарантиям"
        }
      }
    },
    "UiGetAgreementsResponse": {
      "title": "UiGetAgreementsResponse",
      "type": "object",
      "properties": {
        "agreements": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/AgreementDto"
          }
        }
      }
    },
    "GatewayErrorResponse": {
      "type": "object",
      "properties": {
        "message": {
          "description": "Описание ошибки",
          "type": "string"
        },
        "http_status_code": {
          "description": "HTTP статус",
          "type": "integer"
        }
      },
      "example": "{\n    \"message\": \"Unauthorized\",\n    \"http_status_code\": 401\n}\n"
    },
    "ForbiddenErrorResponse": {
      "title": "ForbiddenErrorResponse",
      "type": "object",
      "properties": {
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/ForbiddenErrorResponseDTO"
          }
        }
      },
      "example": "{\n    \"errors\": [\n        {\n            \"code\": \"AuthorizationError\",\n            \"detail\": \"[ExceptionEntry(code=AuthorizationError, detail=access denied, meta=null)]\",\n            \"meta\": null,\n            \"id\": \"e0000007-a0a0-9999-aa00-61b0aaaa0003\"\n        }\n    ]\n}\n"
    },
    "ForbiddenErrorResponseDTO": {
      "properties": {
        "code": {
          "description": "Описание кода ошибки",
          "type": "string"
        },
        "detail": {
          "description": "Детальное описание ошибки",
          "type": "string"
        },
        "meta": {
          "description": "Доп информация",
          "type": "object"
        },
        "id": {
          "description": "Идентификатор соглашения",
          "type": "string"
        }
      }
    }
  }
}