Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Open API (Swagger) Integration for Confluence
openapi: 3.0.1
info:
  title: Abills user API
  version: 0.0.1011
servers:
  - url: https://demo.abills.net.ua:9443/api.cgi
tags:
  - name: user
    description: Работа с пользователем
  - name: internet
    description: Работа с услугой Интернет
  - name: msgs
    description: Работа с заявками пользователя
  - name: abon
    description: Работа с периодическими списаниями
  - name: paysys
    description: Работа с платежными системами
  - name: config
    description: Все доступные конфигурации
paths:
  /users/login:
    post:
      tags:
        - user
      summary: Авторизация пользователя
      operationId: loginUser
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/UserLoginBody'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserLogin'
  /user/{UID}:
    get:
      tags:
        - user
      summary: Информация о пользователе
      operationId: userInfo
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      security:
        - USER_SID: [ ]
  /user/{UID}/pi:
    get:
      tags:
        - user
      summary: Персональная информация пользователя
      operationId: userPersonalInfo
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPi'
      security:
        - USER_SID: [ ]
  /user/{UID}/credit:
    get:
      tags:
        - user
      summary: Информация об установке кредита
      operationId: userCreditInfo
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCreditInfo'
      security:
        - USER_SID: [ ]
    post:
      tags:
        - user
      summary: Установка кредита пользователю
      operationId: userSetCredit
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCredit'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet:
    get:
      tags:
        - internet
      summary: Информация об интернет услугах пользователя
      operationId: userInternetInfo
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInternet'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet/{ID}:
    put:
      tags:
        - internet
      summary: Смена ТП
      operationId: userChangeInternetTP
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID услуги Интернет
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/body'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternetChangeTPSuccess'
        400:
          description: Ошибка
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternetChangeTPError'
      security:
        - USER_SID: [ ]
      x-codegen-request-body-name: body
  /user/{UID}/internet/{ID}/speed:
    get:
      tags:
        - internet
      summary: Скорость ТП
      operationId: userTpSpeed
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID услуги Интернет
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternetSpeed'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet/{ID}/holdup:
    post:
      tags:
        - internet
      summary: Приостановление услуги Интернет
      operationId: userInternetHoldup
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID услуги Интернет
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/body_1'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldupReply'
      security:
        - USER_SID: [ ]
      x-codegen-request-body-name: body
    delete:
      tags:
        - internet
      summary: Удаление рассписания на приостановление услуги Интернет
      operationId: userDeleteInternetHoldup
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID услуги Интернет
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldupReply'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet/tariffs:
    get:
      tags:
        - internet
      summary: Доступные для изменения ТП, на которые хватает денег
      operationId: userInternetAvailableToChangeTariffs
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAvailableTariffs'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet/tariffs/all:
    get:
      tags:
        - internet
      summary: Все доступные для изменения ТП
      operationId: userInternetAvailableToChangeTariffsAll
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAvailableTariffs'
      security:
        - USER_SID: [ ]
  /user/{UID}/internet/{ID}/warnings:
    get:
      tags:
        - internet
      summary: Информация о списаниях
      operationId: userInternetWarnings
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID услуги
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternetWarnings'
      security:
        - USER_SID: [ ]
  /user/{UID}/abon:
    get:
      tags:
        - abon
      summary: Информация об периодических списаниях пользователя
      operationId: userAbonInfo
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAbon'
      security:
        - USER_SID: [ ]
  /user/{UID}/msgs:
    get:
      tags:
        - msgs
      summary: Список заявок пользователя
      operationId: userMsgsList
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsgsArray'
      security:
        - USER_SID: [ ]
    post:
      tags:
        - msgs
      summary: Создание заявки
      operationId: userAddMessage
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/MsgsAdd'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsgsAdded'
      security:
        - USER_SID: [ ]
      x-codegen-request-body-name: body
  /user/{UID}/msgs/{ID}:
    get:
      tags:
        - msgs
      summary: Информация о заявке пользователя
      operationId: userMsgs
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID заявки
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsgsInfo'
      security:
        - USER_SID: [ ]
  /user/{UID}/msgs/{ID}/reply:
    get:
      tags:
        - msgs
      summary: Список заявок пользователя
      operationId: userMsgReplyList
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID заявки
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MsgsReplyArray'
      security:
        - USER_SID: [ ]
    post:
      tags:
        - msgs
      summary: Создание заявки
      operationId: userAddReply
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
        - name: ID
          in: path
          description: ID заявки
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/MsgsReplyAdd'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content: { }
      security:
        - USER_SID: [ ]
      x-codegen-request-body-name: body
  /user/{UID}/paysys/systems:
    get:
      tags:
        - paysys
      summary: Список платежных систем доступных пользователю
      operationId: userPaysysList
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaysysArray'
      security:
        - USER_SID: [ ]
  /user/{UID}/paysys/payconfig:
    postget:
      tags:
        - paysysconfig
      summary: ФормированиеСписок ссылкидоступных наконфигураций быструю оплатупользователя
      operationId: userPaysysPayuserConfig
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      requestBodyresponses:
        content200:
          '*/*'description:
 Успешное выполнение
          schemacontent:
              $ref: '#/components/schemas/PaysysPayBody'
 application/json:
       required: true
      responsesschema:
        200:
          description: Успешное выполнение$ref: '#/components/schemas/UserConfig'
          contentsecurity:
        - USER_SID: [  application/json:
              schema:
                $ref: '#/components/schemas/PaysysPay'
      security:
        - USER_SID: [ ]
  ]
  /user/{UID}/paysys/transaction/statuspay:
    post:
      tags:
        - paysys
      summary: Формирование ссылки Проверкана статусабыструю платежаоплату
      operationId: userPaysysTransactionStatususerPaysysPay
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PaysysTransactionStatusBodyPaysysPayBody'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaysysTransactionStatusPaysysPay'
      security:
        - USER_SID: [ ]
components:
  schemas/user/{UID}/paysys/transaction/status:
    Userpost:
      typetags: object
      properties:
  - paysys
      summary: Проверка статуса платежа
      operationId: userPaysysTransactionStatus
      parameters:
        - name: UID
          in: path
          description: UID пользователя
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PaysysTransactionStatusBody'
        required: true
      responses:
        200:
          description: Успешное выполнение
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaysysTransactionStatus'
      security:
        - USER_SID: [ ]
components:
  schemas:
    User:
      type: object
      properties:
        login:
          type: string
          example: "3433"
        deposit:
          type: integer
          example: 1600
        credit:
          type: integer
          example: 100
        creditDate:
          type: string
          example: 2021-08-13
        billId:
          type: integer
          example: 12
        gid:
          type: integer
          example: 57
        disable:
          type: integer
          example: 0
        deleted:
          type: integer
          example: 0
    UserPi:
      type: object
      properties:
        fio:
          type: string
          example: Иванов Иван Иванович
        loginaddressFull:
          type: string
          example: ул.Адамца, 121, 3
        age:
          type: integer
          example: "3433"33
        depositlocationId:
          type: integer
          example: 16001444
        creditcontractId:
          type: integerstring
          example: 100"575493"
        creditDateemail:
          type: stringarray
          example: 2021-08-13items:
        billId:
          type: integerstring
            example: 12test@gmail.com
        gidphone:
          type: integerarray
          exampleitems:
    57
        disabletype: string
          type  example: integer"380976574568"
    UserInternet:
      exampletype: 0array
      items:
        deleted:$ref: '#/components/schemas/UserInternet_inner'
    InternetSpeed:
      type: integerarray
      items:
      example  $ref: 0'#/components/schemas/InternetSpeed_inner'
    UserPiUserAbon:
      type: objectarray
      propertiesitems:
        fio:$ref: '#/components/schemas/UserAbon_inner'
    UserCredit:
      type: stringobject
          example: Иванов Иван Ивановичproperties:
        addressFullcreditSum:
          type: stringinteger
          example: ул.Адамца, 121, 3500
        agecreditChangePrice:
          type: integer
          example: 33100
        locationIduid:
          type: integer
          example: 144411135
        contractIdcreditDays:
          type: string
          example: "5754933"
        emailcreditMonthChanges:
          type: arraystring
          itemsexample: "1"
      UserCreditInfo:
      type: stringobject
      properties:
        examplecreditChgPrice:
  test@gmail.com
        phonetype: string
          typeexample: array"500"
          itemscreditMonthChanges:
            type: string
            example: "3809765745681"
      UserInternet  creditSum:
          type: arraystring
          itemsexample: "800"
        $ref: '#/components/schemas/UserInternet_inner'creditDays:
    InternetSpeed:
      type: arraystring
      items:
        $ref: '#/components/schemas/InternetSpeed_inner'example: "3"
    UserAbonUserAvailableTariffs:
      type: array
      items:
        $ref: '#/components/schemas/UserAbonUserAvailableTariffs_inner'
    UserCreditHoldupReply:
      type: object
      properties:
        creditSumsuccess:
          type: integer
          example: 5001
        creditChangePricemsg:
          type: integerstring
          example: 100
        uid:
    InternetWarnings:
      type: integerobject
          example: 11135properties:
        creditDaysmessageType:
          type: string
          example: "3"
        creditMonthChanges:success
          typewarning: string
          exampletype: "1"string
    UserCreditInfo:
      typeexample: object
следующее списание через 7   properties:дней
        creditChgPricedaysToFee:
          type: string
          example: "5002"
        creditMonthChangessum:
          type: stringinteger
          example: "1"150
        creditSumabonDate:
          type: string
          example: "800"2021-10-01
    InternetChangeTPSuccess:
    creditDays  type: object
      properties:
        typesuccess: string
          exampletype: "3"integer
    UserAvailableTariffs:
      typeexample: array1
      items  uid:
        $ref  type: '#/components/schemas/UserAvailableTariffs_inner'integer
    HoldupReplyInternetChangeTPError:
      type: object
      properties:
        successerror:
          type: integer
          example: 1145
        msgmessage:
          type: string
     InternetWarnings   messageType:
          type: objectstring
        propertiesmessageTitle:
        messageType  type: string
    MsgsAdd:
      type: stringobject
          example: successproperties:
        warningchapter:
          type: stringinteger
          example: следующее списание через 7 дней3
        daysToFeemessage:
          type: string
          example: "2"Some message
        sumsubject:
          type: integerstring
          example: 150Message subject
        abonDatepriority:
          type: stringinteger
          example: 2021-10-012
    InternetChangeTPSuccessMsgsAdded:
      type: object
      properties:
        successinsertId:
          type: integer
          example: 143
        uidmsgId:
          type: integer
    InternetChangeTPError:
      typeexample: object43
      properties:
        erroraffected:
          type: integer
          example: 1451
        message:
          type: string
     MsgsInfo:
   messageType:
   type: object
      typeproperties: string
        messageTitlesubject:
          type: string
    MsgsAdd:
      typeexample: object
Message user api    properties:subject
        chaptermessage:
          type: integerstring
          example: 3 Test message from user api
        messagechapterName:
          type: string
          example: SomeВторой messageраздел
        subjectchapter:
          type: stringinteger
          example: Message subject3
        priority:
          type: integer
          example: 2
        MsgsAddedstate:
          type: objectinteger
        properties  example: 0
        insertIddate:
          type: integerstring
          example: 43
  2021-09-02 13:20:37
    MsgsArray:
      msgIdtype: array
      items:
        type$ref: integer'#/components/schemas/MsgsInfo'
    MsgsReply:
      exampletype: 43object
        affectedproperties:
          typeuid: integer
          exampletype: 1integer
    MsgsInfo:
      typeexample: object
      properties:0
        subjectaid:
          type: stringinteger
          example: Message user api subject2
        messageid:
          type: stringinteger
          example: Test message from user api54
        chapterNametext:
          type: string
          example: some Второйreply разделtext
        chapterdatetime:
          type: integerstring
          example: 3 2021-09-02 12:50:47
        priorityMsgsReplyAdd:
          type: integerobject
          example: 2properties:
        statereply_text:
          type: integerstring
          example: Some 0reply text
        datereply_subject:
          type: string
          example: 2021-09-02 13:20:37Subject
    MsgsArrayMsgsReplyArray:
      type: array
      items:
        $ref: '#/components/schemas/MsgsInfoMsgsReply'
    MsgsReplybody:
      type: object
      properties:
        uidtp_id:
          type: integer
          example: 04
        aiddate:
          type: integerstring
          example: 22021-09-17
        idperiod:
          type: integer
    body_1:
      exampletype: 54 object
      properties:
        textfrom_date:
          type: string
          example: some reply text2021-08-14
        datetimeto_date:
          type: string
          example: 2021-09-02 12:50:47
08-17
    UserInternet_inner:
      type: object
      properties:
       MsgsReplyAdd:
 id:
          type: objectinteger
          propertiesexample: 2
        reply_texttpName:
          type: string
          example: SomeПремиум replyдо text100м
        reply_subjecttpId:
          type: stringinteger
          example: Subject41
        MsgsReplyArrayinternetStatus:
          type: arrayinteger
          itemsexample: 0
        $ref: '#/components/schemas/MsgsReply'cid:
    body:
      type: objectstring
       properties:   example: 14:11:11:11:11:c1
        tp_idmonthFee:
          type: integer
          example: 250
        dayFee:
          type: 4integer
        date  example: 0
    InternetSpeed_inner:
      type: stringobject
          example: 2021-09-17properties:
        periodinSpeed:
          type: integer
    body_1:
      typeexample: object2999
      properties:
        from_dateoutSpeed:
          type: stringinteger
          example: 2021-08-143000
        to_datetpNum:
          type: stringinteger
          example: 2021-08-17155
    UserInternetUserAbon_inner:
      type: object
      properties:
        id:
          type: integer
          example: 2
        tpNamename:
          type: string
          example: ПремиумTest доabon 100мTP
        tpIdprice:
          type: integer
          example: 41100
        internetStatusperiod:
          type: integer
          example: 01
        cidnextAbon:
          type: string
          example: 14:11:11:11:11:c12021-09-01
        monthFeecomments:
          type: integer
          example: 250string
        dayFeedescription:
          type: integerstring
          example: Test 0description
    InternetSpeedUserAvailableTariffs_inner:
      type: object
      properties:
        inSpeedid:
          type: integer
          example: 29992
        outSpeedname:
          type: integerstring
          example: Премиум до 3000100м
        tpNumtpId:
          type: integer
          example: 155
    UserAbon_inner:41
      type: object
      properties monthFee:
        id:
          type: integer
          example: 2250
        namedayFee:
          type: stringinteger
          example: Test abon TP0
        pricecomments:
          type: integerstring
    PaysysArray:
      exampletype: 100 array
      items:
        period:$ref: '#/components/schemas/PaymentSystem'
    PaymentSystem:
      type: integerobject
          example: 1properties:
        nextAbonid:
          type: stringinteger
          example: 2021-09-011
        commentsname:
          type: string
          example: LiqPay
        descriptionmodule:
          type: string
          example: Test descriptionLiqpay.pm
    UserAvailableTariffs_innerPaysysPayBody:
      type: object
      properties:
        idsystemId:
          type: integer
          example: 21
        namesum:
          type: stringinteger
          example: Премиум до 100м100
        tpIdoperationId:
          type: integerstring
          example: 41123456789
        monthFeePaysysPay:
          type: integerobject
          example: 250properties:
        dayFeeoperationId:
          type: integerstring
          example: 0123456789
        commentstransactionId:
          type: string
          example: PaysysArrayLiqpay:123456789
        typeurl:
  array
        itemstype: string
          $ref: '#/components/schemas/PaymentSystem'example: https://www.liqpay.ua/api/3/checkout?data=123456789&signature=123456789
    PaymentSystemPaysysTransactionStatus:
      type: object
      properties:
        id:
          type: integer
          example: 1
        namedatetime:
          type: string
          example: LiqPay "2022-01-01 01:01:01"
        modulelogin:
          type: string
          example: Liqpay.pm
test
        PaysysPayBodystatus:
          type: objectinteger
          propertiesexample: 1
        systemId:
          type: integer
          example: 1
        sum:
          type: integer
          example: 100
        operationIduid:
          type: stringinteger
          example: 123456789
    PaysysPay:1
      type: object
      properties transactionId:
        operationId:
          type: string
          example: Liqpay:123456789
        transactionIdPaysysTransactionStatusBody:
          type: stringobject
          example: Liqpayproperties:123456789
        urltransactionId:
          type: string
          example: https://www.liqpay.ua/api/3/checkout?data=123456789&signature=Liqpay:123456789
    PaysysTransactionStatusUserLoginBody:
      type: object
      properties:
        idlogin:
          type: integerstring
          example: 1testuser
        datetimepassword:
          type: string
          example: "2022-01-01 01:01:01" testuser
    UserLogin:
      type: object
      properties:
       login:
          type: string
          example: testtestuser
        statussid:
          type: integerstring
          example: 1sW44EJZLyWDMeXAV
        systemIduid:
          type: integer
          example: 1
    UserConfig:
      type: object
      properties:
  sum      acts:
          type: integer
          example: 1006
        uidautomaticPaymentOfServices:
          type: integer
          example: 19
        transactionIdbalanceRecharge:
          type: stringinteger
          example: Liqpay:1234567898
    PaysysTransactionStatusBody:
      typedocuments: object
      properties:
        transactionId:type: integer
          typeexample: string5
          example: Liqpay:123456789helpDesk:
    UserLoginBody:
      type: objectinteger
      properties:    example: 3
        loginhistory:
          type: stringinteger
          example: testuser10
        passwordinternet:
          type: stringinteger
          example: testuser
    UserLogin:1
      type: object
      properties internetCards:
       login:
         type: stringinteger
          example: testuser4
        sidreceipts:
          type: stringinteger
          example: sW44EJZLyWDMeXAV7
       uid statistics:
          type: integer
          example: 12
  securitySchemes:
    USER_SID:
      type: apiKey
      name: USERSID
      in: header

...