Bank Guarantee Service API

OpenAPI

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

Варианты

  • Паблик

Операции API

POST /guarantees — Получение списка гарантий

This method is deprecated. Use the [new `/trade-finance/v1/guarantees`](https://developer.raif.ru/docs/api/trade-finance/guarantees/get-all-by-filter-and-c-num) instead.

{
  "tags": [
    "guarantee-controller"
  ],
  "summary": "Получение списка гарантий",
  "description": "This method is deprecated. Use the [new `/trade-finance/v1/guarantees`](https://developer.raif.ru/docs/api/trade-finance/guarantees/get-all-by-filter-and-c-num) instead.\n",
  "operationId": "getAllByFilterAndOrgIdUsingPOST",
  "parameters": [
    {
      "$ref": "#/components/parameters/IdTokenHeader"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/GuaranteeFilterRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Список гарантий успешно получен",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GuaranteeDTO"
            }
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  }
}

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

{
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "scheme": "bearer",
      "description": "Токен доступа",
      "bearerFormat": "JWT"
    }
  },
  "responses": {
    "BadRequest": {
      "description": "Некорректный запрос",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceErrorResponse"
          },
          "example": {
            "status": 400,
            "error": "Bad Request",
            "message": "Type mismatch."
          }
        }
      }
    },
    "Unauthorized": {
      "description": "Авторизация не пройдена",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/GatewayErrorResponse"
          },
          "example": {
            "http_status_code": 401,
            "message": "Unauthorized"
          }
        }
      }
    },
    "Forbidden": {
      "description": "Доступ запрещен",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceErrorResponse"
          },
          "example": {
            "status": 403,
            "error": "Forbidden",
            "message": "The requested resource is forbidden"
          }
        }
      }
    },
    "NotFound": {
      "description": "Запрашиваемый ресурс не найден",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ServiceErrorResponse"
          },
          "example": {
            "status": 404,
            "error": "Not Found",
            "message": "The requested resource is not found"
          }
        }
      }
    }
  },
  "schemas": {
    "GatewayErrorResponse": {
      "type": "object",
      "required": [
        "http_status_code",
        "message"
      ],
      "properties": {
        "http_status_code": {
          "description": "HTTP статус",
          "type": "integer"
        },
        "message": {
          "description": "Ошибка",
          "type": "string"
        }
      }
    },
    "ServiceErrorResponse": {
      "type": "object",
      "required": [
        "status",
        "error"
      ],
      "properties": {
        "status": {
          "description": "HTTP статус",
          "type": "integer"
        },
        "error": {
          "description": "Ошибка",
          "type": "string"
        },
        "message": {
          "description": "Детали ошибки",
          "type": "string"
        }
      }
    },
    "IntervalDateFilterDTO": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "format": "date-time",
          "description": "Начало интервала",
          "example": "2021-12-07T00:00:00+0300"
        },
        "to": {
          "type": "string",
          "format": "date-time",
          "description": "Конец интервала",
          "example": "2021-12-07T00:00:00+0300"
        }
      },
      "title": "IntervalDateFilterDTO"
    },
    "IntervalDecimalFilterDTO": {
      "type": "object",
      "properties": {
        "from": {
          "type": "number",
          "description": "Начало интервала",
          "example": 0
        },
        "to": {
          "type": "number",
          "description": "Конец интервала",
          "example": 1000
        }
      },
      "title": "IntervalDecimalFilterDTO"
    },
    "GuaranteeFilterDTO": {
      "type": "object",
      "description": "Управление фильтрацией",
      "required": [
        "principalCnum"
      ],
      "properties": {
        "agreementDate": {
          "allOf": [
            {
              "description": "Дата соглашения, интервал"
            },
            {
              "$ref": "#/components/schemas/IntervalDateFilterDTO"
            }
          ]
        },
        "agreementNumber": {
          "type": "array",
          "description": "Номер соглашения",
          "items": {
            "type": "string"
          },
          "example": [
            "555",
            "777"
          ]
        },
        "amount": {
          "allOf": [
            {
              "description": "Сумма гарантии, интервал"
            },
            {
              "$ref": "#/components/schemas/IntervalDecimalFilterDTO"
            }
          ]
        },
        "applicantInn": {
          "type": "array",
          "description": "ИНН апликанта",
          "items": {
            "type": "string",
            "example": 7770000077
          }
        },
        "applicantShortName": {
          "type": "array",
          "description": "Краткое наименование апликанта",
          "items": {
            "type": "string",
            "example": "ООО Моя компания"
          }
        },
        "avisoBankCode": {
          "type": "array",
          "description": "Код авизующего банка",
          "items": {
            "type": "string",
            "example": "АО АвизоБанк"
          }
        },
        "beneficiaryInn": {
          "type": "array",
          "description": "ИНН бенефициара",
          "items": {
            "type": "string",
            "example": 7770000055
          }
        },
        "beneficiaryShortName": {
          "type": "array",
          "description": "Краткое наименование бенефициара",
          "items": {
            "type": "string",
            "example": "Бенефициар"
          }
        },
        "bidNoticeNum": {
          "type": "array",
          "description": "Номер извещения",
          "items": {
            "type": "string",
            "example": 112233
          }
        },
        "currency": {
          "type": "array",
          "description": "Код валюты",
          "items": {
            "type": "string",
            "example": "RUB"
          }
        },
        "endDate": {
          "allOf": [
            {
              "description": "Дата окончания действия гарантии, интервал"
            },
            {
              "$ref": "#/components/schemas/IntervalDateFilterDTO"
            }
          ]
        },
        "guaranteeType": {
          "type": "array",
          "description": "Код типа гарантии, справочники guaranteeTypeDGP",
          "items": {
            "type": "string",
            "example": "bid_guarantee"
          }
        },
        "issueDate": {
          "allOf": [
            {
              "description": "Дата выдачи гарантии, интервал"
            },
            {
              "$ref": "#/components/schemas/IntervalDateFilterDTO"
            }
          ]
        },
        "issueMethod": {
          "type": "array",
          "description": "Способ выдачи",
          "items": {
            "type": "string",
            "example": "SWIFT"
          }
        },
        "number": {
          "type": "array",
          "description": "Номер гарантии",
          "items": {
            "type": "string",
            "example": "1"
          }
        },
        "principalCnum": {
          "type": "array",
          "description": "CNUM принципала",
          "example": [
            "CNUM1",
            "CNUM2",
            "CNUM3"
          ],
          "items": {
            "type": "string"
          }
        },
        "startDate": {
          "allOf": [
            {
              "description": "Дата начала действия гарантии, интервал"
            },
            {
              "$ref": "#/components/schemas/IntervalDateFilterDTO"
            }
          ]
        },
        "status": {
          "type": "array",
          "description": "Статус гарантии",
          "items": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "FINISHED",
              "ERROR",
              "WAIT_BENEFICIARY_CONSENT",
              "ARCHIVE"
            ]
          }
        }
      },
      "title": "GuaranteeFilterDTO"
    },
    "GuaranteeFilterRequest": {
      "type": "object",
      "description": "Запрос получения списка гарантий",
      "required": [
        "filter",
        "pageable"
      ],
      "properties": {
        "filter": {
          "$ref": "#/components/schemas/GuaranteeFilterDTO"
        },
        "pageable": {
          "$ref": "#/components/schemas/PageableDTO"
        }
      },
      "title": "GuaranteeFilterRequest"
    },
    "AgreementDto": {
      "title": "AgreementDto",
      "description": "Соглашение",
      "type": "object",
      "properties": {
        "agreementDate": {
          "type": "string",
          "description": "Дата соглашения",
          "format": "date",
          "example": "2021-05-11"
        },
        "agreementNumber": {
          "type": "string",
          "description": "Номер соглашения",
          "example": 12345
        }
      }
    },
    "OrganizationDTO": {
      "title": "OrganizationDTO",
      "description": "Огранизация",
      "type": "object",
      "properties": {
        "cnum": {
          "type": "string",
          "description": "Номер клиента"
        },
        "currentAddress": {
          "type": "string",
          "description": "Адрес местонахождения"
        },
        "customsUnitCode": {
          "type": "string",
          "description": "Код таможенного органа"
        },
        "fullNameEng": {
          "type": "string",
          "description": "Полное наименование латинскими буквами"
        },
        "fullNameRus": {
          "type": "string",
          "description": "Полное наименование на русском языке"
        },
        "inn": {
          "type": "string",
          "description": "ИНН"
        },
        "kio": {
          "type": "string",
          "description": "КИО"
        },
        "kpp": {
          "type": "string",
          "description": "КПП"
        },
        "kppLargestTaxPayer": {
          "type": "string",
          "description": "КПП крупнейшего налогоплательщика"
        },
        "ogrn": {
          "type": "string",
          "description": "ОГРН"
        },
        "oktmo": {
          "type": "string",
          "description": "ОКТМО"
        },
        "postalAddress": {
          "type": "string",
          "description": "Почтовый адрес"
        },
        "shortName": {
          "type": "string",
          "description": "Сокращенное наименование на русском языке"
        },
        "taxRegistrationDate": {
          "type": "string",
          "description": "Дата постановки на учет",
          "format": "date",
          "example": "2021-05-11"
        },
        "taxUnitCode": {
          "type": "string",
          "description": "Код налогового органа"
        },
        "tin": {
          "type": "string",
          "description": "TIN"
        }
      }
    },
    "PageableDTO": {
      "type": "object",
      "description": "Управление пагинацией",
      "required": [
        "page",
        "size"
      ],
      "properties": {
        "page": {
          "description": "Номер страницы",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 2147483647,
          "exclusiveMinimum": false,
          "exclusiveMaximum": false
        },
        "size": {
          "description": "Кол-во элементов на странице",
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "maximum": 2147483647,
          "exclusiveMinimum": false,
          "exclusiveMaximum": false
        },
        "sort": {
          "$ref": "#/components/schemas/SortDto"
        }
      },
      "title": "PageableDTO"
    },
    "SortDto": {
      "type": "object",
      "description": "Сортировка элементов на странице",
      "required": [
        "field",
        "direction",
        "order"
      ],
      "properties": {
        "field": {
          "type": "string",
          "enum": [
            "status",
            "number",
            "amount",
            "currency",
            "issueDate",
            "agreementNumber",
            "agreementDate",
            "guaranteeType",
            "principalCnum",
            "startDate",
            "endDate",
            "avisoBankCode",
            "issueMethod",
            "applicantInn",
            "applicantShortName",
            "beneficiaryInn",
            "beneficiaryShortName",
            "bidNoticeNum"
          ]
        },
        "direction": {
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ]
        },
        "order": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        }
      }
    },
    "CommissionDto": {
      "title": "CommissionDto",
      "type": "object",
      "properties": {
        "account": {
          "type": "string"
        },
        "accountType": {
          "type": "string",
          "enum": [
            "current",
            "none",
            "third_party",
            "transit"
          ]
        },
        "commissions": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/FeeShortDto"
          }
        },
        "minimumAmount": {
          "type": "number",
          "format": "bigdecimal"
        },
        "minimumAmountCurrency": {
          "type": "string"
        },
        "paymentTermMaturity": {
          "type": "integer",
          "format": "int32"
        },
        "penaltyRate": {
          "type": "number",
          "format": "bigdecimal"
        },
        "rate": {
          "type": "number",
          "format": "bigdecimal"
        },
        "total": {
          "type": "number",
          "format": "bigdecimal"
        }
      }
    },
    "GuaranteeDTO": {
      "type": "object",
      "description": "Гарантия",
      "properties": {
        "agreement": {
          "$ref": "#/components/schemas/AgreementDto"
        },
        "amount": {
          "type": "number",
          "description": "Сумма гарантии",
          "example": 220220.02
        },
        "applicant": {
          "allOf": [
            {
              "description": "Апликант"
            },
            {
              "$ref": "#/components/schemas/OrganizationDTO"
            }
          ]
        },
        "applicationNumber": {
          "type": "string",
          "description": "Номер заявления в TFO"
        },
        "avisoBankCode": {
          "type": "string",
          "description": "SWIFT-code авизующего банка"
        },
        "beneficiary": {
          "allOf": [
            {
              "description": "Бенефициар"
            },
            {
              "$ref": "#/components/schemas/OrganizationDTO"
            }
          ]
        },
        "comment": {
          "type": "string",
          "description": "Комментарий к заявлению"
        },
        "currency": {
          "type": "string",
          "description": "Валюта гарантии"
        },
        "endDate": {
          "type": "string",
          "format": "date",
          "description": "Дата истечения",
          "example": "2021-05-11"
        },
        "fees": {
          "description": "График комиссии",
          "$ref": "#/components/schemas/CommissionDto"
        },
        "guaranteeSubject": {
          "type": "object",
          "description": "Поля обязательства (cостав зависит от объекта гарантии)",
          "example": "{\n    \"lotNum\": \"1111-УДСП\",\n    \"tenderName\": \"Выполнение работ по проведению анализа городов перспективного развития.\",\n    \"bidNoticeNum\": \"12345678901234567890\"\n}\n"
        },
        "guaranteeType": {
          "type": "string",
          "description": "Тип гарантии"
        },
        "guaranteeTypeName": {
          "type": "string",
          "description": "Название типа гарантии"
        },
        "isCounter": {
          "type": "boolean",
          "description": "Является контргарантией"
        },
        "issueDate": {
          "type": "string",
          "format": "date",
          "description": "Дата выдачи гарантии",
          "example": "2021-05-11"
        },
        "issueMethod": {
          "type": "string",
          "description": "Способ выдачи"
        },
        "number": {
          "type": "string",
          "description": "Номер гарантии"
        },
        "placeOfDisputeResolution": {
          "type": "string",
          "description": "Место разрешения споров"
        },
        "principal": {
          "allOf": [
            {
              "description": "Принципал"
            },
            {
              "$ref": "#/components/schemas/OrganizationDTO"
            }
          ]
        },
        "startDate": {
          "type": "string",
          "format": "date",
          "description": "Дата вступления в силу",
          "example": "2021-05-11"
        },
        "startDateType": {
          "type": "string",
          "description": "Событие вступления в силу"
        },
        "status": {
          "type": "string",
          "description": "Статус документа (системное имя)"
        },
        "statusName": {
          "type": "string",
          "description": "Статус документа (для отображения в интерфейсе)"
        },
        "thirdParty": {
          "type": "boolean"
        },
        "useRussianLaw": {
          "type": "boolean",
          "description": "Признак применения российского права в отношении выпускаемой гарантии"
        },
        "useUrdg758": {
          "type": "boolean",
          "description": "Признак применения норм URDG 758 в отношении выпускаемой гарантии"
        }
      },
      "title": "GuaranteeDTO"
    },
    "FeeScheduleDto": {
      "title": "FeeScheduleDto",
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "format": "bigdecimal"
        },
        "beginDate": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string"
        },
        "endDate": {
          "type": "string",
          "format": "date"
        },
        "plannedPaymentDate": {
          "type": "string",
          "format": "date"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "FeeShortDto": {
      "title": "FeeShortDto",
      "type": "object",
      "properties": {
        "commissionName": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "feeList": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/FeeScheduleDto"
          }
        },
        "status": {
          "type": "string"
        },
        "totalAmount": {
          "type": "number",
          "format": "bigdecimal"
        }
      }
    }
  },
  "parameters": {
    "IdTokenHeader": {
      "name": "Id-Token",
      "in": "header",
      "description": "Идентификационный токен пользователя",
      "required": true,
      "schema": {
        "type": "string",
        "format": "byte"
      }
    }
  }
}