Guest User

swagger

a guest
Aug 20th, 2016
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 107.10 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3.   version: "1.0.0"
  4.   title: Oval App
  5.  
  6. securityDefinitions:
  7.   adminKey:
  8.     type: apiKey
  9.     description: Adminpanel token we get after authentication
  10.     name: x-auth-token
  11.     in: header
  12.   userKey:
  13.     type: apiKey
  14.     description: Normal user token we get after authentication
  15.     name: x-auth-token
  16.     in: header
  17. # during dev, should point to your local machine
  18. host: api.ovalmoney.com
  19. # basePath prefixes all resource paths
  20. basePath: /
  21. #
  22. schemes:
  23.  # tip: remove http to make production-grade
  24.   - https
  25. # format of bodies a client can send (Content-Type)
  26. consumes:
  27.  - application/json
  28. # format of the responses to the client (Accepts)
  29. produces:
  30.  - application/json
  31. tags:
  32.   - name: Auth
  33.     description: Authentication-related endpoints
  34.   - name: Bad Wolf
  35.     description: Bad Wolf Bad Wolf Bad Wolf
  36.   - name: Adminpanel
  37.     description: Adminpanel endpoints
  38.   - name: Client
  39.     description: Client endpoints
  40.   - name: Profile
  41.     description: Profile control and info
  42.   - name: General
  43.     description: General information for the app
  44.   - name: Yodlee
  45.     description: Yodlee-related endpoints
  46.   - name: Mangopay
  47.     description: Mangopay-related endpoints
  48.   - name: Banking
  49.     description: Banking information
  50.   - name: Reporting
  51.     description: Reporting methods
  52.   - name: Rules
  53.     description: Rules methods
  54.   - name: Push Notifications
  55.     description: Push notifications registration endpoints.
  56. paths:
  57.   /login/email/verify:
  58.     x-swagger-router-controller: login_local
  59.     get:
  60.       tags:
  61.        - Auth
  62.         - Client
  63.       description: Returns whether email was already registered
  64.       operationId: verify_email
  65.       parameters:
  66.         - name: email
  67.           in: query
  68.           description: Email to be verified
  69.           required: true
  70.           type: string
  71.       responses:
  72.         "200":
  73.           description: Success
  74.           schema:
  75.             $ref: "#/definitions/UserExistenceCheckResponse"
  76.         "400":
  77.           description: Malformed input
  78.            
  79.         default:
  80.           description: Error
  81.           schema:
  82.             $ref: "#/definitions/ErrorResponse"  
  83.   /login/email/perform:
  84.     x-swagger-router-controller: login_local
  85.     post:
  86.       tags:
  87.        - Auth
  88.         - Client
  89.       description: Perfoms email login
  90.       operationId: login_email
  91.       parameters:
  92.         - name: data
  93.           in: body
  94.           description: Email login body
  95.           required: true
  96.           schema:
  97.             $ref: "#/definitions/EmailLoginBody"
  98.       responses:
  99.         "200":
  100.           description: Login success
  101.           schema:
  102.             $ref: "#/definitions/UserLoginResponse"
  103.         "400":
  104.           description: Malformed input
  105.         "404":
  106.           description: User not found
  107.         "403":
  108.           description: Invalid credentials
  109.         default:
  110.           description: Error
  111.           schema:
  112.             $ref: "#/definitions/ErrorResponse"  
  113.            
  114.   /login/facebook/verify:
  115.     x-swagger-router-controller: login_facebook
  116.     post:
  117.       tags:
  118.        - Auth
  119.         - Client
  120.       description: Returns whether the specified facebook access_token is already registered
  121.       operationId: verify_facebook
  122.       parameters:
  123.         - name: data
  124.           in: body
  125.           description: Facebook verification body
  126.           required: true
  127.           schema:
  128.             $ref: "#/definitions/FacebookLoginBody"
  129.            
  130.       responses:
  131.         "200":
  132.           description: Success
  133.           schema:
  134.             $ref: "#/definitions/UserExistenceCheckResponse"
  135.         "400":
  136.           description: Malformed input
  137.         default:
  138.           description: Error
  139.           schema:
  140.             $ref: "#/definitions/ErrorResponse"
  141.            
  142.   /login/facebook/bind:
  143.     x-swagger-router-controller: login_facebook
  144.     post:
  145.       tags:
  146.        - Auth
  147.         - Client
  148.       security:
  149.         - userKey: []
  150.       description: Performs a facebook login
  151.       operationId: bind_facebook
  152.       parameters:
  153.         - name: data
  154.           in: body
  155.           description: Facebook login body
  156.           required: true
  157.           schema:
  158.             $ref: "#/definitions/FacebookLoginBody"
  159.       responses:
  160.         "200":
  161.           description: Attachment successful
  162.         "400":
  163.           description: Malformed input
  164.         "403":
  165.           description: Invalid token
  166.         default:
  167.           description: Error
  168.           schema:
  169.             $ref: "#/definitions/ErrorResponse"
  170.            
  171.   /login/facebook/perform:
  172.     x-swagger-router-controller: login_facebook
  173.     post:
  174.       tags:
  175.        - Auth
  176.         - Client
  177.       description: Performs a facebook login
  178.       operationId: login_facebook
  179.       parameters:
  180.         - name: data
  181.           in: body
  182.           description: Facebook login body
  183.           required: true
  184.           schema:
  185.             $ref: "#/definitions/FacebookLoginBody"
  186.       responses:
  187.         "200":
  188.           description: Login successful
  189.           schema:
  190.             $ref: "#/definitions/UserLoginResponse"
  191.         "400":
  192.           description: Malformed input
  193.         "403":
  194.           description: Invalid token
  195.         "404":
  196.           description: User not found
  197.         default:
  198.           description: Error
  199.           schema:
  200.             $ref: "#/definitions/ErrorResponse"
  201.  
  202.   /register/facebook/perform:
  203.     x-swagger-router-controller: login_facebook
  204.     post:
  205.       tags:
  206.        - Auth
  207.         - Client
  208.       description: Performs a Facebook registraction
  209.       operationId: register_facebook
  210.       parameters:
  211.         - name: data
  212.           in: body
  213.           description: Registration body
  214.           required: true
  215.           schema:
  216.             $ref: "#/definitions/FacebookRegistrationBody"
  217.       responses:
  218.         "200":
  219.           description: Registration successful
  220.           schema:
  221.             $ref: "#/definitions/UserLoginResponse"
  222.         "400":
  223.           description: Malformed input
  224.         "403":
  225.           description: Invalid token
  226.         default:
  227.           description: Error
  228.           schema:
  229.             $ref: "#/definitions/ErrorResponse"  
  230.   /register/email/perform:
  231.     x-swagger-router-controller: login_local
  232.     post:
  233.       tags:
  234.        - Auth
  235.         - Client
  236.       description: Performs an email registraction
  237.       operationId: register_email
  238.       parameters:
  239.         - name: data
  240.           in: body
  241.           description: Registration body
  242.           required: true
  243.           schema:
  244.             $ref: "#/definitions/EmailRegistrationBody"
  245.       responses:
  246.         "200":
  247.           description: Registration successful
  248.           schema:
  249.             $ref: "#/definitions/UserLoginResponse"
  250.         "400":
  251.           description: Malformed input
  252.         default:
  253.           description: Error
  254.           schema:
  255.             $ref: "#/definitions/ErrorResponse"  
  256.  
  257.   /user/profile/logout/all:
  258.     x-swagger-router-controller: profile
  259.     post:
  260.       tags:
  261.        - Auth
  262.         - Client
  263.       security:
  264.         - userKey: []
  265.       description: Logouts all other current user sessions
  266.       operationId: logout_all_user
  267.       responses:
  268.         "200":
  269.           description: Success
  270.           schema:
  271.             $ref: "#/definitions/UserLoginResponse"
  272.         "403":
  273.           description: Access denied
  274.         default:
  275.           description: Error
  276.           schema:
  277.             $ref: "#/definitions/ErrorResponse"
  278.   /user/is_logged_in:
  279.     x-swagger-router-controller: profile
  280.     post:
  281.       tags:
  282.        - Auth
  283.         - Client
  284.       security:
  285.         - userKey: []
  286.       description: Checks that the user is logged in (token validation)
  287.       operationId: is_logged_in_user
  288.       responses:
  289.         "200":
  290.           description: Success
  291.           schema:
  292.             $ref: "#/definitions/UserLoginResponse"
  293.         "403":
  294.           description: Invalid token
  295.         default:
  296.           description: Error
  297.           schema:
  298.             $ref: "#/definitions/ErrorResponse"
  299.  
  300.   /user/profile:
  301.     x-swagger-router-controller: profile
  302.     get:
  303.       tags:
  304.        - Client
  305.         - Profile
  306.       security:
  307.         - userKey: []
  308.       description: Gets the profile of the specified user
  309.       operationId: get_profile
  310.       parameters:
  311.         - name: id
  312.           in: query
  313.           description: the id of the user
  314.           required: true
  315.           type: integer
  316.       responses:
  317.         "200":
  318.           description: Success
  319.           schema:
  320.             $ref: "#/definitions/UserProfileResponse"
  321.         "400":
  322.           description: Malformed request
  323.         "403":
  324.           description: Access denied
  325.         "404":
  326.           description: User not found
  327.         default:
  328.             description: Error
  329.             schema:
  330.               $ref: "#/definitions/ErrorResponse"  
  331.     post:
  332.       tags:
  333.        - Client
  334.         - Profile
  335.       security:
  336.         - userKey: []
  337.       description: Changes the profile of the specified user
  338.       operationId: change_profile
  339.       parameters:
  340.         - name: data
  341.           in: body
  342.           description: Change profile request body
  343.           required: true
  344.           schema:
  345.             $ref: "#/definitions/UserProfileChangeRequest"
  346.       responses:
  347.         "200":
  348.           description: Success
  349.           schema:
  350.             $ref: "#/definitions/UserLoginResponse"
  351.         "400":
  352.           description: Malformed request
  353.         "403":
  354.           description: Access denied
  355.         "404":
  356.           description: User not found
  357.         default:
  358.           description: Error
  359.           schema:
  360.             $ref: "#/definitions/ErrorResponse"
  361.  
  362.   /versions.json:
  363.     x-swagger-router-controller: versions
  364.     get:
  365.       tags:
  366.        - Client
  367.         - General
  368.       description: Gets the avaliable app versions
  369.       operationId: get_versions
  370.       responses:
  371.         "200":
  372.           description: Success
  373.           schema:
  374.               $ref: "#/definitions/VersionsResponse"  
  375.         default:
  376.           description: Error
  377.           schema:
  378.             $ref: "#/definitions/ErrorResponse"  
  379.   /server/time:
  380.     x-swagger-router-controller: server
  381.     post:
  382.       tags:
  383.        - Client
  384.         - General
  385.       description: Gets the current server date-time
  386.       operationId: get_time
  387.       responses:
  388.         "200":
  389.           description: Success
  390.           schema:
  391.             $ref: "#/definitions/TimeResponse"  
  392.            
  393.         default:
  394.           description: Error
  395.           schema:
  396.             $ref: "#/definitions/ErrorResponse"  
  397.   /flags/flag-{countryCode2}@{scaleFactor}x.png:
  398.     get:
  399.       produces:
  400.        - image/png
  401.       tags:
  402.        - Client
  403.         - General
  404.       description: Gets country's flag
  405.       operationId: get_country_flag
  406.       parameters:
  407.         - name: countryCode2
  408.           type: string
  409.           in: path
  410.           required: true
  411.         - name: scaleFactor
  412.           type: integer
  413.           in: path
  414.           required: true
  415.       responses:
  416.         "200":
  417.           description: Success
  418.           schema:
  419.             type: string
  420.             format: binary
  421.   /countries:
  422.     x-swagger-router-controller: country
  423.     get:
  424.       tags:
  425.        - Client
  426.         - General
  427.       description: Gets all countries
  428.       operationId: all_countries
  429.       responses:
  430.         "200":
  431.           description: Success
  432.           schema:
  433.             type: array
  434.             items:
  435.               $ref: "#/definitions/CountryResponse"  
  436.         default:
  437.           description: Error
  438.           schema:
  439.             $ref: "#/definitions/ErrorResponse"  
  440.            
  441.   /user/profile/image:
  442.     x-swagger-router-controller: profile
  443.     post:
  444.       tags:
  445.        - Client
  446.         - Profile
  447.       description: Upload profile image
  448.       operationId: upload_profile_image
  449.       consumes:
  450.        - multipart/form-data
  451.       security:
  452.         - userKey: []
  453.       parameters:
  454.         - name: image
  455.           in: formData
  456.           description: The profile image
  457.           required: true
  458.           type: file
  459.       responses:
  460.         "200":
  461.           description: Success
  462.           schema:
  463.             $ref: "#/definitions/UserAvatar"
  464.         default:
  465.           description: Error
  466.           schema:
  467.             $ref: "#/definitions/ErrorResponse"
  468.     delete:
  469.       tags:
  470.        - Client
  471.         - Profile
  472.       security:
  473.         - userKey: []
  474.       description: Delete profile image
  475.       operationId: delete_profile_image
  476.       responses:
  477.         "200":
  478.           description: Success
  479.         default:
  480.           description: Error
  481.           schema:
  482.             $ref: "#/definitions/ErrorResponse"
  483.   /user/profile/password/reset/request:
  484.     x-swagger-router-controller: profile
  485.     post:
  486.       tags:
  487.        - Client
  488.         - Profile
  489.       description: Request password reset
  490.       operationId: request_reset
  491.       parameters:
  492.         - name: data
  493.           in: body
  494.           description: Change profile request body
  495.           required: true
  496.           schema:
  497.             $ref: "#/definitions/PasswordResetBody"
  498.       responses:
  499.         "200":
  500.           description: Request successful
  501.         "400":
  502.           description: Invalid email
  503.         "403":
  504.           description: User was registered through facebook
  505.         "404":
  506.           description: User not found
  507.          
  508.         default:
  509.           description: Error
  510.           schema:
  511.             $ref: "#/definitions/ErrorResponse"
  512.   /user/profile/password/reset/do:
  513.     x-swagger-router-controller: profile
  514.     post:
  515.       tags:
  516.        - Client
  517.         - Adminpanel
  518.         - Profile
  519.       description: Request password reset
  520.       operationId: perform_reset
  521.       parameters:
  522.         - name: data
  523.           in: body
  524.           description: Change profile request body
  525.           required: true
  526.           schema:
  527.             $ref: "#/definitions/PasswordResetDoBody"
  528.       responses:
  529.         "200":
  530.           description: Request successful
  531.         "400":
  532.           description: Malformed request
  533.         "403":
  534.           description: Invalid token
  535.          
  536.         default:
  537.           description: Error
  538.           schema:
  539.             $ref: "#/definitions/ErrorResponse"
  540.  
  541.   /user/profile/yodlee/fastlink/url:
  542.     x-swagger-router-controller: yodlee_controller
  543.     post:
  544.       tags:
  545.        - Yodlee
  546.         - Client
  547.         - Banking
  548.       security:
  549.         - userKey: []
  550.       description: Gets the fastlink url and body
  551.       operationId: get_fast_link_url
  552.       responses:
  553.         "200":
  554.           description: Success
  555.           schema:
  556.             $ref: "#/definitions/UrlResponse"
  557.         default:
  558.           description: Error
  559.           schema:
  560.             $ref: "#/definitions/ErrorResponse"  
  561.   /user/profile/yodlee/accounts:
  562.     x-swagger-router-controller: yodlee_controller
  563.     post:
  564.       tags:
  565.         - Profile
  566.         - Yodlee
  567.         - Client
  568.         - Banking
  569.       security:
  570.         - userKey: []
  571.       description: Gets all the yodlee's attached accounts
  572.       operationId: accounts_summary_all
  573.       responses:
  574.         "200":
  575.           description: Success
  576.           schema:
  577.             $ref: "#/definitions/YodleeAccountsResponse"
  578.         default:
  579.           description: Error
  580.           schema:
  581.             $ref: "#/definitions/ErrorResponse"
  582.            
  583.   /user/profile/yodlee/account:
  584.     x-swagger-router-controller: yodlee_controller
  585.     post:
  586.       tags:
  587.         - Profile
  588.         - Yodlee
  589.         - Client
  590.         - Banking
  591.       security:
  592.         - userKey: []
  593.       description: Change state of yodlee item account
  594.       operationId: change_item_account_state
  595.       parameters:
  596.         - name: data
  597.           in: body
  598.           description: Change item account state body
  599.           required: true
  600.           schema:
  601.             $ref: "#/definitions/ChangeItemAccountStateBody"
  602.       responses:
  603.         "200":
  604.           description: State changed
  605.         default:
  606.           description: Error
  607.           schema:
  608.             $ref: "#/definitions/ErrorResponse"
  609.     delete:
  610.       tags:
  611.         - Profile
  612.         - Yodlee
  613.         - Client
  614.         - Banking
  615.       security:
  616.         - userKey: []
  617.       description: Delete yodlee item account
  618.       operationId: remove_item_account
  619.       parameters:
  620.         - name: itemAccountId
  621.           in: query
  622.           description: Remove item account body
  623.           required: true
  624.           type: string
  625.       responses:
  626.         "200":
  627.           description: State changed
  628.         default:
  629.           description: Error
  630.           schema:
  631.             $ref: "#/definitions/ErrorResponse"
  632.            
  633.   /user/profile/yodlee/callback/{userId}:
  634.     x-swagger-router-controller: yodlee_controller
  635.     post:
  636.       tags:
  637.         - Profile
  638.         - Yodlee
  639.         - Banking
  640.       description: Callback for yodlee's fastlink
  641.       operationId: yodlee_callback_processor
  642.       parameters:
  643.         - name: status
  644.           in: query
  645.           description: status from Yodlee API as per https://developer.yodlee.com/Fastlink_2.0/FastLink_Integration_Guide_for_Web/Fastlink_Callback_Parameters
  646.           required: false
  647.           type: string
  648.         - name: userId
  649.           in: path
  650.           description: id of the user
  651.           required: true
  652.           type: number
  653.           format: int64
  654.       responses:
  655.         "200":
  656.           description: Success
  657.         default:
  658.           description: Error
  659.           schema:
  660.             $ref: "#/definitions/ErrorResponse"
  661.            
  662.   /user/profile/yodlee/callback/listener:
  663.     x-swagger-router-controller: yodlee_controller
  664.     post:
  665.       tags:
  666.         - Profile
  667.         - Client
  668.         - Yodlee
  669.         - Banking
  670.       security:
  671.         - userKey: []
  672.       description: Listener for whether the callback was called, this is a long-poll request
  673.       operationId: yodlee_callback_listener
  674.       responses:
  675.         "200":
  676.           description: Success
  677.           schema:
  678.             $ref: "#/definitions/YodleeCallbackListenerResponse"
  679.         default:
  680.           description: Error
  681.           schema:
  682.             $ref: "#/definitions/ErrorResponse"
  683.            
  684.   /user/profile/mangopay/balance:
  685.     x-swagger-router-controller: mangopay_controller
  686.     post:
  687.       tags:
  688.         - Profile
  689.         - Mangopay
  690.         - Client
  691.         - Banking
  692.       security:
  693.         - userKey: []
  694.       description: Gets the wallet balance for the user
  695.       operationId: get_wallet_balance
  696.       responses:
  697.         "200":
  698.           description: Wallet balance
  699.           schema:
  700.             $ref: "#/definitions/TotalBalance"
  701.         default:
  702.           description: Error
  703.           schema:
  704.             $ref: "#/definitions/ErrorResponse"
  705.            
  706.   /user/profile/mangopay/withdraw:
  707.     x-swagger-router-controller: mangopay_controller
  708.     post:
  709.       tags:
  710.        - Profile
  711.         - Mangopay
  712.         - Client
  713.         - Banking
  714.       security:
  715.         - userKey: []
  716.       description: Withdraws money from user balance
  717.       operationId: withdraw
  718.       parameters:
  719.         - name: data
  720.           in: body
  721.           description: Money to withdraw
  722.           required: true
  723.           schema:
  724.             $ref: "#/definitions/MoneyOperationBody"
  725.       responses:
  726.         "200":
  727.           description: Withdraw successful
  728.           schema:
  729.             $ref: "#/definitions/TransactionInfo"
  730.         default:
  731.           description: Error
  732.           schema:
  733.             $ref: "#/definitions/ErrorResponse"
  734.  
  735.   /user/profile/mangopay/deposit:
  736.     x-swagger-router-controller: mangopay_controller
  737.     post:
  738.       tags:
  739.        - Profile
  740.         - Mangopay
  741.         - Client
  742.         - Banking
  743.       security:
  744.         - userKey: []
  745.       description: Deposits money to user wallet
  746.       operationId: deposit
  747.       parameters:
  748.         - name: data
  749.           in: body
  750.           description: Money to deposit
  751.           required: true
  752.           schema:
  753.             $ref: "#/definitions/MoneyOperationBody"
  754.       responses:
  755.         "200":
  756.           description: Deposit successful
  757.           schema:
  758.             $ref: "#/definitions/TransactionInfo"
  759.         default:
  760.           description: Error
  761.           schema:
  762.             $ref: "#/definitions/ErrorResponse"
  763.  
  764.   /user/profile/mangopay/account:
  765.     x-swagger-router-controller: mangopay_controller
  766.     post:
  767.       tags:
  768.        - Profile
  769.         - Mangopay
  770.         - Client
  771.         - Banking
  772.       security:
  773.         - userKey: []
  774.       description: Attach a bank account to the current profile
  775.       operationId: attach_bank_account
  776.       parameters:
  777.         - name: data
  778.           in: body
  779.           description: Money to deposit
  780.           required: true
  781.           schema:
  782.             $ref: "#/definitions/AttachMangopayAccountBody"
  783.       responses:
  784.         "200":
  785.           description: Attachment successful
  786.         default:
  787.           description: Error
  788.           schema:
  789.             $ref: "#/definitions/ErrorResponse"
  790.     get:
  791.       tags:
  792.        - Profile
  793.         - Mangopay
  794.         - Client
  795.         - Banking
  796.       security:
  797.         - userKey: []
  798.       description: Gets bank account information
  799.       operationId: get_bank_account_info
  800.       responses:
  801.         "200":
  802.           description: Success
  803.           schema:
  804.             $ref: "#/definitions/MangopayBankAccount"
  805.         "404":
  806.           description: No bank account attached
  807.         default:
  808.           description: Error
  809.           schema:
  810.             $ref: "#/definitions/ErrorResponse"
  811.     delete:
  812.       tags:
  813.        - Profile
  814.         - Mangopay
  815.         - Client
  816.         - Banking
  817.       security:
  818.         - userKey: []
  819.       description: Deletes the bank account
  820.       operationId: detach_bank_account
  821.       responses:
  822.         "200":
  823.           description: Success
  824.         default:
  825.           description: Error
  826.           schema:
  827.             $ref: "#/definitions/ErrorResponse"
  828.  
  829.   /user/profile/mangopay/account/identity:
  830.     x-swagger-router-controller: mangopay_controller
  831.     post:
  832.       tags:
  833.        - Profile
  834.         - Mangopay
  835.         - Client
  836.         - Banking
  837.       security:
  838.         - userKey: []
  839.       description: Attaches identity proof documents to the account. Info is avaliable later in profile.
  840.       operationId: identity_proof
  841.       parameters:
  842.         - name: data
  843.           in: body
  844.           required: true
  845.           schema:
  846.             $ref: "#/definitions/IdentityProofRequest"
  847.       responses:
  848.         "200":
  849.           description: Successful upload
  850.         default:
  851.           description: Error happened. Note, here 3 additional error codes are possible - invalid_mime_type, document_validation_in_progress, document_already_validated
  852.           schema:
  853.             $ref: "#/definitions/ErrorResponse"
  854.  
  855.   /transaction/types:
  856.     x-swagger-router-controller: transaction_types
  857.     get:
  858.       tags:
  859.        - Client
  860.         - Banking
  861.       security:
  862.         - userKey: []
  863.       description: Gets all the possible transaction type boundaries
  864.       operationId: all_types
  865.       responses:
  866.         "200":
  867.           description: Success
  868.           schema:
  869.             type: array
  870.             items:
  871.               $ref: "#/definitions/BoundaryResponse"
  872.  
  873.         "403":
  874.           description: Not authorized
  875.  
  876.         default:
  877.           description: Error
  878.           schema:
  879.             $ref: "#/definitions/ErrorResponse"
  880.   /transaction/mangopay/all:
  881.     x-swagger-router-controller: transactions
  882.     get:
  883.       tags:
  884.        - Client
  885.         - Banking
  886.       security:
  887.         - userKey: []
  888.       description: Gets all mangopay transactions
  889.       operationId: list_mangopay_transactions
  890.       parameters:
  891.         - name: startingId
  892.           in: query
  893.           type: number
  894.           format: int64
  895.           description: Last known transaction id (they are ordered DESC by id).
  896.       responses:
  897.         "200":
  898.           description: Success
  899.           schema:
  900.             type: array
  901.             items:
  902.               $ref: "#/definitions/TransactionInfo"
  903.         default:
  904.           description: Error
  905.           schema:
  906.             $ref: "#/definitions/ErrorResponse"
  907.   /transaction/mangopay/{id}:
  908.     x-swagger-router-controller: transactions
  909.     get:
  910.       tags:
  911.        - Client
  912.         - Banking
  913.       security:
  914.         - userKey: []
  915.       description: Get one mangopay transaction
  916.       operationId: get_mangopay_transaction
  917.       parameters:
  918.         - name: id
  919.           in: path
  920.           type: number
  921.           format: int64
  922.           required: true
  923.           description: id of the transaction to get
  924.       responses:
  925.         "200":
  926.           description: Success
  927.           schema:
  928.             $ref: "#/definitions/TransactionInfo"
  929.         default:
  930.           description: Error
  931.           schema:
  932.             $ref: "#/definitions/ErrorResponse"
  933.   /transaction/category/normal:
  934.     x-swagger-router-controller: transactions
  935.     get:
  936.       tags:
  937.        - Client
  938.         - Banking
  939.       security:
  940.         - userKey: []
  941.       description: Lists all the transaction categories
  942.       operationId: list_transaction_categories
  943.       responses:
  944.         "200":
  945.           description: Success
  946.           schema:
  947.             type: array
  948.             items:
  949.               $ref: "#/definitions/TransactionCategory"
  950.         default:
  951.           description: Error
  952.           schema:
  953.             $ref: "#/definitions/ErrorResponse"
  954.            
  955.   /transaction/category/base:
  956.     x-swagger-router-controller: transactions
  957.     get:
  958.       tags:
  959.        - Client
  960.         - Yodlee
  961.         - Banking
  962.       security:
  963.         - userKey: []
  964.       description: Lists all the base transaction categories
  965.       operationId: list_transaction_base_categories
  966.       responses:
  967.         "200":
  968.           description: Success
  969.           schema:
  970.             type: array
  971.             items:
  972.               $ref: "#/definitions/BaseTransactionCategory"
  973.         default:
  974.           description: Error
  975.           schema:
  976.             $ref: "#/definitions/ErrorResponse"
  977.  
  978.  
  979.   /transaction/viewed:
  980.     x-swagger-router-controller: transactions
  981.     post:
  982.       tags:
  983.        - Client
  984.         - Yodlee
  985.         - Banking
  986.       security:
  987.         - userKey: []
  988.       description: Marks transactions as viewed or not viewed
  989.       operationId: mark_as_viewed
  990.       parameters:
  991.         - name: data
  992.           in: body
  993.           required: true
  994.           schema:
  995.             $ref: '#/definitions/MarkAsViewed'
  996.       responses:
  997.         "200":
  998.           description: Success
  999.         default:
  1000.           description: Error
  1001.           schema:
  1002.             $ref: "#/definitions/ErrorResponse"
  1003.  
  1004.   /transaction/count:
  1005.     x-swagger-router-controller: transactions
  1006.     get:
  1007.       tags:
  1008.        - Client
  1009.         - Yodlee
  1010.         - Banking
  1011.       security:
  1012.         - userKey: []
  1013.       description: Counts the transactions with filter
  1014.       operationId: count_transactions
  1015.       parameters:
  1016.         - name: isMagicRuleApplicable
  1017.           in: query
  1018.           type: integer
  1019.         - name: filterDate
  1020.           in: query
  1021.           type: string
  1022.           format: date
  1023.         - name: viewed
  1024.           in: query
  1025.           type: integer
  1026.       responses:
  1027.         "200":
  1028.           description: Success
  1029.           schema:
  1030.             $ref: '#/definitions/CountResponse'
  1031.         "403":
  1032.           description: Not authorized
  1033.         "404":
  1034.           description: Not found
  1035.         default:
  1036.           description: Error
  1037.           schema:
  1038.             $ref: "#/definitions/ErrorResponse"
  1039.  
  1040.   /transaction/all:
  1041.     x-swagger-router-controller: transactions
  1042.     get:
  1043.       tags:
  1044.        - Client
  1045.         - Yodlee
  1046.         - Banking
  1047.       security:
  1048.         - userKey: []
  1049.       description: Gets all the user transactions
  1050.       operationId: list_transactions
  1051.       parameters:
  1052.         - name: lastId
  1053.           in: query
  1054.           type: integer
  1055.         - name: isMagicRuleApplicable
  1056.           in: query
  1057.           type: integer
  1058.         - name: filterDate
  1059.           in: query
  1060.           type: string
  1061.           format: date
  1062.         - name: viewed
  1063.           in: query
  1064.           type: integer
  1065.       responses:
  1066.         "200":
  1067.           description: Success
  1068.           schema:
  1069.             type: array
  1070.             items:
  1071.               $ref: "#/definitions/Transaction"
  1072.         "403":
  1073.           description: Not authorized
  1074.         "404":
  1075.           description: Not found
  1076.         default:
  1077.           description: Error
  1078.           schema:
  1079.             $ref: "#/definitions/ErrorResponse"
  1080.            
  1081.   /transaction/{id}:
  1082.     x-swagger-router-controller: transactions
  1083.     get:
  1084.       tags:
  1085.        - Client
  1086.         - Yodlee
  1087.         - Banking
  1088.       security:
  1089.         - userKey: []
  1090.       description: Gets all the user transactions
  1091.       operationId: get_transaction
  1092.       parameters:
  1093.         - name: id
  1094.           in: path
  1095.           type: integer
  1096.           required: true
  1097.       responses:
  1098.         "200":
  1099.           description: Success
  1100.           schema:
  1101.             $ref: "#/definitions/Transaction"
  1102.         "403":
  1103.           description: Not authorized
  1104.         "404":
  1105.           description: Not found
  1106.         default:
  1107.           description: Error
  1108.           schema:
  1109.             $ref: "#/definitions/ErrorResponse"
  1110.            
  1111.   /transaction/stats/daysofweek:
  1112.     x-swagger-router-controller: transactions
  1113.     get:
  1114.       tags:
  1115.        - Client
  1116.         - Yodlee
  1117.         - Banking
  1118.       security:
  1119.         - userKey: []
  1120.       description: Get the average of transactions per days of the week
  1121.       operationId: get_transaction_per_dayofweek_average
  1122.       responses:
  1123.         "200":
  1124.           description: Success
  1125.           schema:
  1126.             type: array
  1127.             items:
  1128.               $ref: "#/definitions/TransactionsStats"
  1129.         default:
  1130.           description: Error
  1131.           schema:
  1132.             $ref: "#/definitions/ErrorResponse"
  1133.   /report:
  1134.     x-swagger-router-controller: reporting
  1135.     post:
  1136.       tags:
  1137.        - Client
  1138.         - Reporting
  1139.       security:
  1140.         - userKey: []
  1141.       description: Add report
  1142.       operationId: add_report
  1143.       parameters:
  1144.         - name: data
  1145.           in: body
  1146.           description: Report
  1147.           required: true
  1148.           schema:
  1149.             $ref: "#/definitions/AddReport"
  1150.       responses:
  1151.         "200":
  1152.           description: Success
  1153.         default:
  1154.           description: Error
  1155.           schema:
  1156.             $ref: "#/definitions/ErrorResponse"
  1157.            
  1158.   /rule:
  1159.     x-swagger-router-controller: rules
  1160.     get:
  1161.       tags:
  1162.        - Rules
  1163.         - Client
  1164.       security:
  1165.         - userKey: []
  1166.       description: Get one rule
  1167.       operationId: get_rule
  1168.       parameters:
  1169.         - name: id
  1170.           in: query
  1171.           description: Rule ID
  1172.           required: true
  1173.           type: integer
  1174.       responses:
  1175.         "200":
  1176.           description: Success
  1177.           schema:
  1178.             $ref: "#/definitions/Rule"
  1179.         default:
  1180.           description: Error
  1181.           schema:
  1182.             $ref: "#/definitions/ErrorResponse"
  1183.     post:
  1184.       tags:
  1185.        - Rules
  1186.         - Client
  1187.       security:
  1188.         - userKey: []
  1189.       description: Create one rule
  1190.       operationId: add_rule
  1191.       parameters:
  1192.         - name: data
  1193.           in: body
  1194.           required: true
  1195.           schema:
  1196.             $ref: "#/definitions/RuleCreation"
  1197.       responses:
  1198.         "200":
  1199.           description: Success
  1200.           schema:
  1201.             $ref: "#/definitions/Rule"
  1202.         default:
  1203.           description: Error
  1204.           schema:
  1205.             $ref: "#/definitions/ErrorResponse"
  1206.     put:
  1207.       tags:
  1208.        - Rules
  1209.         - Client
  1210.       security:
  1211.         - userKey: []
  1212.       description: Edit one rule
  1213.       operationId: edit_rule
  1214.       parameters:
  1215.         - name: data
  1216.           in: body
  1217.           required: true
  1218.           schema:
  1219.             $ref: "#/definitions/RuleEdit"
  1220.       responses:
  1221.         "200":
  1222.           description: Success
  1223.           schema:
  1224.             $ref: "#/definitions/Rule"
  1225.         default:
  1226.           description: Error
  1227.           schema:
  1228.             $ref: "#/definitions/ErrorResponse"
  1229.     delete:
  1230.       tags:
  1231.        - Rules
  1232.         - Client
  1233.       security:
  1234.         - userKey: []
  1235.       description: Delete one rule
  1236.       operationId: delete_rule
  1237.       parameters:
  1238.         - name: id
  1239.           in: query
  1240.           description: Rule ID
  1241.           required: true
  1242.           type: integer
  1243.       responses:
  1244.         "200":
  1245.           description: Success
  1246.         default:
  1247.           description: Error
  1248.           schema:
  1249.             $ref: "#/definitions/ErrorResponse"
  1250.  
  1251.   /rule/all:
  1252.     x-swagger-router-controller: rules
  1253.     get:
  1254.       tags:
  1255.        - Rules
  1256.         - Client
  1257.       security:
  1258.         - userKey: []
  1259.       description: Get all rules
  1260.       operationId: get_rules
  1261.       parameters:
  1262.         - name: lastId
  1263.           in: query
  1264.           required: true
  1265.           type: integer
  1266.         - name: active
  1267.           in: query
  1268.           type: number
  1269.       responses:
  1270.         "200":
  1271.           description: Success
  1272.           schema:
  1273.             type: array
  1274.             items:
  1275.               $ref: "#/definitions/Rule"
  1276.         default:
  1277.           description: Error
  1278.           schema:
  1279.             $ref: "#/definitions/ErrorResponse"
  1280.   /rule/collection/all:
  1281.     x-swagger-router-controller: rules
  1282.     get:
  1283.       tags:
  1284.        - Rules
  1285.         - Client
  1286.       security:
  1287.         - userKey: []
  1288.       description: Get all rule collections
  1289.       operationId: get_rule_collections
  1290.       responses:
  1291.         "200":
  1292.           description: Success
  1293.           schema:
  1294.             type: array
  1295.             items:
  1296.               $ref: "#/definitions/RuleCollection"
  1297.         default:
  1298.           description: Error
  1299.           schema:
  1300.             $ref: "#/definitions/ErrorResponse"
  1301.   /rule/collection/rules/all:
  1302.     x-swagger-router-controller: rules
  1303.     get:
  1304.       tags:
  1305.        - Rules
  1306.         - Client
  1307.       security:
  1308.         - userKey: []
  1309.       description: Get all rules from collection
  1310.       operationId: get_rules_from_collection
  1311.       parameters:
  1312.         - name: id
  1313.           in: query
  1314.           required: true
  1315.           type: integer
  1316.       responses:
  1317.         "200":
  1318.           description: Success
  1319.           schema:
  1320.             type: array
  1321.             items:
  1322.               $ref: "#/definitions/Rule"
  1323.         default:
  1324.           description: Error
  1325.           schema:
  1326.             $ref: "#/definitions/ErrorResponse"
  1327.  
  1328.   /admin/api/collections:
  1329.     x-swagger-router-controller: collections
  1330.     get:
  1331.       tags:
  1332.        - Adminpanel
  1333.       security:
  1334.         - adminKey: []
  1335.       description: Get collections
  1336.       operationId: getCollections
  1337.       parameters:
  1338.         - name: limit
  1339.           in: query
  1340.           type: number
  1341.           required: true
  1342.         - name: offset
  1343.           in: query
  1344.           type: number
  1345.       responses:
  1346.         "200":
  1347.           description: Success
  1348.           schema:
  1349.             $ref: "#/definitions/getCollections"
  1350.         "403":
  1351.           description: Not authorized
  1352.         "404":
  1353.           description: Not found
  1354.         default:
  1355.           description: Error
  1356.           schema:
  1357.             $ref: "#/definitions/ErrorResponse"
  1358.  
  1359.   /api/collections:
  1360.     x-swagger-router-controller: collections
  1361.     get:
  1362.       tags:
  1363.        - Client
  1364.       security:
  1365.         - userKey: []
  1366.       description: Get collections
  1367.       operationId: getCollections
  1368.       responses:
  1369.         "200":
  1370.           description: Success
  1371.           schema:
  1372.             $ref: "#/definitions/getCollections"
  1373.         "403":
  1374.           description: Not authorized
  1375.         "404":
  1376.           description: Not found
  1377.         default:
  1378.           description: Error
  1379.           schema:
  1380.             $ref: "#/definitions/ErrorResponse"
  1381.  
  1382.   /admin/api/collection:
  1383.     x-swagger-router-controller: collections
  1384.     get:
  1385.       tags:
  1386.        - Adminpanel
  1387.       security:
  1388.         - adminKey: []
  1389.       description: Get collection by Id
  1390.       operationId: getCollection
  1391.       parameters:
  1392.         - name: id
  1393.           in: query
  1394.           type: number
  1395.           required: true
  1396.       responses:
  1397.         "200":
  1398.           description: Success
  1399.           schema:
  1400.             $ref: "#/definitions/Collection"
  1401.         "403":
  1402.           description: Not authorized
  1403.         "404":
  1404.           description: Not found
  1405.         default:
  1406.           description: Error
  1407.           schema:
  1408.             $ref: "#/definitions/ErrorResponse"
  1409.     post:
  1410.       tags:
  1411.        - Adminpanel
  1412.       security:
  1413.         - adminKey: []
  1414.       description: Add or update collection
  1415.       operationId: postCollection
  1416.       parameters:
  1417.         - name: id
  1418.           in: query
  1419.           type: number
  1420.       responses:
  1421.         "200":
  1422.           description: Success
  1423.           schema:
  1424.             $ref: "#/definitions/Collection"
  1425.         "403":
  1426.           description: Not authorized
  1427.         "404":
  1428.           description: Not found
  1429.         default:
  1430.           description: Error
  1431.           schema:
  1432.             $ref: "#/definitions/ErrorResponse"
  1433.     delete:
  1434.       tags:
  1435.        - Adminpanel
  1436.       security:
  1437.         - adminKey: []
  1438.       description: Delete collection
  1439.       operationId: deleteCollection
  1440.       parameters:
  1441.         - name: id
  1442.           in: query
  1443.           type: number
  1444.           required: true
  1445.       responses:
  1446.         "200":
  1447.           description: Success
  1448.         default:
  1449.           description: Error
  1450.           schema:
  1451.             $ref: "#/definitions/ErrorResponse"
  1452.  
  1453.   /admin/api/collection/prototype:
  1454.     x-swagger-router-controller: collections
  1455.     post:
  1456.       tags:
  1457.        - Adminpanel
  1458.       security:
  1459.         - adminKey: []
  1460.       description: Add prototype to collection
  1461.       operationId: addPrototype
  1462.       parameters:
  1463.         - name: collectionId
  1464.           in: query
  1465.           type: number
  1466.           required: true
  1467.         - name: prototypeId
  1468.           in: query
  1469.           type: number
  1470.           required: true
  1471.       responses:
  1472.         "200":
  1473.           description: Success
  1474.           schema:
  1475.             $ref: "#/definitions/Prototype"
  1476.         "403":
  1477.           description: Not authorized
  1478.         "404":
  1479.           description: Not found
  1480.         default:
  1481.           description: Error
  1482.           schema:
  1483.             $ref: "#/definitions/ErrorResponse"
  1484.     delete:
  1485.       tags:
  1486.        - Adminpanel
  1487.       security:
  1488.         - adminKey: []
  1489.       description: Delete prototype from collection
  1490.       operationId: deletePrototype
  1491.       parameters:
  1492.         - name: collectionId
  1493.           in: query
  1494.           type: number
  1495.           required: true
  1496.         - name: prototypeId
  1497.           in: query
  1498.           type: number
  1499.           required: true
  1500.       responses:
  1501.         "200":
  1502.           description: Success
  1503.         default:
  1504.           description: Error
  1505.           schema:
  1506.             $ref: "#/definitions/ErrorResponse"
  1507.  
  1508.   /api/prototypes:
  1509.     x-swagger-router-controller: prototypes
  1510.     get:
  1511.       tags:
  1512.        - Client
  1513.       security:
  1514.         - userKey: []
  1515.       description: Get prototypes
  1516.       operationId: getPrototypes
  1517.       responses:
  1518.         "200":
  1519.           description: Success
  1520.           schema:
  1521.             $ref: "#/definitions/getPrototypes"
  1522.         "403":
  1523.           description: Not authorized
  1524.         "404":
  1525.           description: Not found
  1526.         default:
  1527.           description: Error
  1528.           schema:
  1529.             $ref: "#/definitions/ErrorResponse"
  1530.  
  1531.   /admin/api/prototypes:
  1532.     x-swagger-router-controller: prototypes
  1533.     get:
  1534.       tags:
  1535.        - Adminpanel
  1536.       security:
  1537.         - adminKey: []
  1538.       description: Get prototypes
  1539.       operationId: getPrototypes
  1540.       parameters:
  1541.         - name: limit
  1542.           in: query
  1543.           type: number
  1544.         - name: offset
  1545.           in: query
  1546.           type: number
  1547.         - name: order
  1548.           in: query
  1549.           type: string
  1550.           enum: ['ASC', 'DESC']
  1551.       responses:
  1552.         "200":
  1553.           description: Success
  1554.           schema:
  1555.             $ref: "#/definitions/getPrototypes"
  1556.         "403":
  1557.           description: Not authorized
  1558.         "404":
  1559.           description: Not found
  1560.         default:
  1561.           description: Error
  1562.           schema:
  1563.             $ref: "#/definitions/ErrorResponse"
  1564.  
  1565.   /admin/api/prototype:
  1566.     x-swagger-router-controller: prototypes
  1567.     get:
  1568.       tags:
  1569.        - Adminpanel
  1570.       security:
  1571.         - adminKey: []
  1572.       description: Get prototype by Id
  1573.       operationId: getPrototype
  1574.       parameters:
  1575.         - name: id
  1576.           in: query
  1577.           type: number
  1578.           required: true
  1579.       responses:
  1580.         "200":
  1581.           description: Success
  1582.           schema:
  1583.             $ref: "#/definitions/Prototype"
  1584.         "403":
  1585.           description: Not authorized
  1586.         "404":
  1587.           description: Not found
  1588.         default:
  1589.           description: Error
  1590.           schema:
  1591.             $ref: "#/definitions/ErrorResponse"
  1592.     post:
  1593.       tags:
  1594.        - Adminpanel
  1595.       security:
  1596.         - adminKey: []
  1597.       description: Add or update prototype
  1598.       operationId: postPrototype
  1599.       parameters:
  1600.         - name: id
  1601.           in: query
  1602.           type: number
  1603.       responses:
  1604.         "200":
  1605.           description: Success
  1606.           schema:
  1607.             $ref: "#/definitions/Prototype"
  1608.         "403":
  1609.           description: Not authorized
  1610.         "404":
  1611.           description: Not found
  1612.         default:
  1613.           description: Error
  1614.           schema:
  1615.             $ref: "#/definitions/ErrorResponse"
  1616.     delete:
  1617.       tags:
  1618.        - Adminpanel
  1619.       security:
  1620.         - adminKey: []
  1621.       description: Delete prototype
  1622.       operationId: deletePrototype
  1623.       parameters:
  1624.         - name: id
  1625.           in: query
  1626.           type: number
  1627.           required: true
  1628.       responses:
  1629.         "200":
  1630.           description: Success
  1631.         default:
  1632.           description: Error
  1633.           schema:
  1634.             $ref: "#/definitions/ErrorResponse"
  1635.  
  1636.   /api/prototype/follow:
  1637.     x-swagger-router-controller: prototypes
  1638.     get:
  1639.       tags:
  1640.        - Client
  1641.       security:
  1642.         - userKey: []
  1643.       description: Follow prototype
  1644.       operationId: prototypeFollow
  1645.       parameters:
  1646.         - name: id
  1647.           in: query
  1648.           type: number
  1649.           required: true
  1650.       responses:
  1651.         "200":
  1652.           description: Success
  1653.           schema:
  1654.             $ref: "#/definitions/Rule"
  1655.         "403":
  1656.           description: Not authorized
  1657.         "404":
  1658.           description: Not found
  1659.         default:
  1660.           description: Error
  1661.           schema:
  1662.             $ref: "#/definitions/ErrorResponse"
  1663.  
  1664.   /notifications/device:
  1665.     x-swagger-router-controller: push_notifications
  1666.     post:
  1667.       tags:
  1668.        - Push Notifications
  1669.         - Client
  1670.       security:
  1671.         - userKey: []
  1672.       description: Registers a push notification device
  1673.       operationId: add_device
  1674.       parameters:
  1675.         - name: data
  1676.           in: body
  1677.           required: true
  1678.           schema:
  1679.             $ref: '#/definitions/RegisterPushNotificationDevice'
  1680.       responses:
  1681.         "200":
  1682.           description: Success
  1683.           schema:
  1684.             $ref: '#/definitions/PushNotificationDevice'
  1685.         "403":
  1686.           description: Access denied
  1687.         default:
  1688.           description: Error
  1689.           schema:
  1690.             $ref: "#/definitions/ErrorResponse"
  1691.   /notifications/device/{id}:
  1692.     x-swagger-router-controller: push_notifications
  1693.     put:
  1694.       tags:
  1695.        - Push Notifications
  1696.         - Client
  1697.       security:
  1698.         - userKey: []
  1699.       description: Edits a push notification device
  1700.       operationId: edit_device
  1701.       parameters:
  1702.         - name: id
  1703.           in: path
  1704.           required: true
  1705.           type: integer
  1706.         - name: data
  1707.           in: body
  1708.           required: true
  1709.           schema:
  1710.             $ref: '#/definitions/EditPushNotificationDevice'
  1711.       responses:
  1712.         "200":
  1713.           description: Success
  1714.           schema:
  1715.             $ref: '#/definitions/PushNotificationDevice'
  1716.         "403":
  1717.           description: Access denied
  1718.         "404":
  1719.           description: Push device not found
  1720.         default:
  1721.           description: Error
  1722.           schema:
  1723.             $ref: "#/definitions/ErrorResponse"
  1724.     get:
  1725.       tags:
  1726.        - Push Notifications
  1727.         - Client
  1728.       security:
  1729.         - userKey: []
  1730.       description: Gets a push notification device
  1731.       operationId: get_device
  1732.       parameters:
  1733.         - name: id
  1734.           in: path
  1735.           required: true
  1736.           type: integer
  1737.       responses:
  1738.         "200":
  1739.           description: Success
  1740.           schema:
  1741.             $ref: '#/definitions/PushNotificationDevice'
  1742.         "403":
  1743.           description: Access denied
  1744.         "404":
  1745.           description: Push device not found
  1746.         default:
  1747.           description: Error
  1748.           schema:
  1749.             $ref: "#/definitions/ErrorResponse"
  1750.     delete:
  1751.       tags:
  1752.        - Push Notifications
  1753.         - Client
  1754.       security:
  1755.         - userKey: []
  1756.       description: Deletes a push notification device
  1757.       operationId: remove_device
  1758.       parameters:
  1759.         - name: id
  1760.           in: path
  1761.           required: true
  1762.           type: integer
  1763.       responses:
  1764.         "200":
  1765.           description: Success
  1766.         "403":
  1767.           description: Access denied
  1768.         "404":
  1769.           description: Push device not found
  1770.         default:
  1771.           description: Error
  1772.           schema:
  1773.             $ref: "#/definitions/ErrorResponse"
  1774.   /notifications/device/all:
  1775.     x-swagger-router-controller: push_notifications
  1776.     get:
  1777.       tags:
  1778.        - Push Notifications
  1779.         - Client
  1780.       security:
  1781.         - userKey: []
  1782.       description: Gets all push notification devices
  1783.       operationId: list_devices
  1784.       responses:
  1785.         "200":
  1786.           description: Success
  1787.           schema:
  1788.             type: array
  1789.             items:
  1790.               $ref: '#/definitions/PushNotificationDevice'
  1791.         "403":
  1792.           description: Access denied
  1793.         default:
  1794.           description: Error
  1795.           schema:
  1796.             $ref: "#/definitions/ErrorResponse"
  1797.  
  1798.   /admin/api/report/all:
  1799.     x-swagger-router-controller: reporting
  1800.     get:
  1801.       tags:
  1802.        - Adminpanel
  1803.       security:
  1804.         - adminKey: []
  1805.       description: List reports
  1806.       operationId: list_reports
  1807.       parameters:
  1808.         - name: lastId
  1809.           in: query
  1810.           required: true
  1811.           type: integer
  1812.         - name: isRead
  1813.           in: query
  1814.           required: true
  1815.           type: integer
  1816.       responses:
  1817.         "200":
  1818.           description: Success
  1819.           schema:
  1820.             type: array
  1821.             items:
  1822.               $ref: "#/definitions/Report"
  1823.         default:
  1824.           description: Error
  1825.           schema:
  1826.             $ref: "#/definitions/ErrorResponse"
  1827.   /admin/api/report/state/change:
  1828.     x-swagger-router-controller: reporting
  1829.     post:
  1830.       tags:
  1831.        - Adminpanel
  1832.       security:
  1833.         - adminKey: []
  1834.       description: Change report state
  1835.       operationId: change_report_state
  1836.       parameters:
  1837.         - name: data
  1838.           in: body
  1839.           description: Report state change query
  1840.           required: true
  1841.           schema:
  1842.             $ref: "#/definitions/SetReportState"
  1843.       responses:
  1844.         "200":
  1845.           description: Success
  1846.         default:
  1847.           description: Error
  1848.           schema:
  1849.             $ref: "#/definitions/ErrorResponse"  
  1850.   /admin/api/users:
  1851.     x-swagger-router-controller: admin_users
  1852.     get:
  1853.       tags:
  1854.        - Adminpanel
  1855.       security:
  1856.         - adminKey: []
  1857.       description: Gets all users from the database
  1858.       operationId: get_all_users
  1859.       parameters:
  1860.         - name: startingId
  1861.           in: query
  1862.           description: id of the last known user, 0 if no users known
  1863.           required: true
  1864.           type: integer
  1865.         - name: sortField
  1866.           in: query
  1867.           description: Ordering field to use (+id, -id, +lastName, etc)
  1868.           type: string
  1869.       responses:
  1870.         "200":
  1871.           description: Success
  1872.           schema:
  1873.             type: array
  1874.             items:
  1875.               $ref: "#/definitions/UserProfileResponse"
  1876.         "403":
  1877.           description: Not authorized
  1878.         default:
  1879.           description: Error
  1880.           schema:
  1881.             $ref: "#/definitions/ErrorResponse"
  1882.   /admin/api/users/one:
  1883.     x-swagger-router-controller: admin_users
  1884.     get:
  1885.       tags:
  1886.        - Adminpanel
  1887.       security:
  1888.         - adminKey: []
  1889.       description: Gets one user from the database
  1890.       operationId: get_one_user
  1891.       parameters:
  1892.         - name: id
  1893.           in: query
  1894.           description: the id of the user
  1895.           required: true
  1896.           type: integer
  1897.       responses:
  1898.         "200":
  1899.           description: Success
  1900.           schema:
  1901.             $ref: "#/definitions/UserProfileResponse"
  1902.         "403":
  1903.           description: Not authorized
  1904.         default:
  1905.           description: Error
  1906.           schema:
  1907.             $ref: "#/definitions/ErrorResponse"
  1908.     post:
  1909.       tags:
  1910.        - Adminpanel
  1911.       security:
  1912.         - adminKey: []
  1913.       description: Changes one user
  1914.       operationId: edit_one_user
  1915.       parameters:
  1916.         - name: data
  1917.           in: body
  1918.           description: Change profile request body
  1919.           required: true
  1920.           schema:
  1921.             $ref: "#/definitions/UserProfileChangeRequestAdmin"
  1922.       responses:
  1923.         "200":
  1924.           description: Success
  1925.         "403":
  1926.           description: Not authorized
  1927.         default:
  1928.           description: Error
  1929.           schema:
  1930.             $ref: "#/definitions/ErrorResponse"
  1931.   /admin/api/admins:
  1932.     x-swagger-router-controller: admin_admins
  1933.     get:
  1934.       tags:
  1935.        - Adminpanel
  1936.       security:
  1937.         - adminKey: []
  1938.       description: Gets all users from the database
  1939.       operationId: get_all_admins
  1940.       responses:
  1941.         "200":
  1942.           description: Success
  1943.           schema:
  1944.             type: array
  1945.             items:
  1946.               $ref: "#/definitions/AdminProfileResponse"
  1947.         "403":
  1948.           description: Not authorized
  1949.         default:
  1950.           description: Error
  1951.           schema:
  1952.             $ref: "#/definitions/ErrorResponse"
  1953.   /admin/api/admins/one:
  1954.     x-swagger-router-controller: admin_admins
  1955.     delete:
  1956.       tags:
  1957.        - Adminpanel
  1958.       security:
  1959.         - adminKey: []
  1960.       description: Deletes one admin
  1961.       operationId: delete_one_admin
  1962.       parameters:
  1963.         - name: data
  1964.           in: body
  1965.           description: Change profile request body
  1966.           required: true
  1967.           schema:
  1968.             $ref: "#/definitions/IDOnlyRequest"
  1969.       responses:
  1970.         "200":
  1971.           description: Success
  1972.         "403":
  1973.           description: Not authorized
  1974.         default:
  1975.           description: Error
  1976.           schema:
  1977.             $ref: "#/definitions/ErrorResponse"
  1978.   /admin/api/login:
  1979.     x-swagger-router-controller: admin_auth
  1980.     post:
  1981.       tags:
  1982.        - Adminpanel
  1983.       description: Logins as admin user
  1984.       operationId: login_admin
  1985.       parameters:
  1986.         - name: data
  1987.           in: body
  1988.           description: Login request body
  1989.           required: true
  1990.           schema:
  1991.             $ref: "#/definitions/AdminLoginBody"
  1992.       responses:
  1993.         "200":
  1994.           description: Success
  1995.           schema:
  1996.             $ref: "#/definitions/AdminLoginResponse"
  1997.         "403":
  1998.           description: Invalid user
  1999.         default:
  2000.           description: Error
  2001.           schema:
  2002.             $ref: "#/definitions/ErrorResponse"
  2003.   /admin/api/logout/all:
  2004.     x-swagger-router-controller: admin_auth
  2005.     post:
  2006.       tags:
  2007.        - Adminpanel
  2008.       security:
  2009.         - adminKey: []
  2010.       description: Logouts all other current admin sessions
  2011.       operationId: logout_all_admin
  2012.       responses:
  2013.         "200":
  2014.           description: Success
  2015.           schema:
  2016.             $ref: "#/definitions/AdminLoginResponse"
  2017.         "403":
  2018.           description: Access denied
  2019.         default:
  2020.           description: Error
  2021.           schema:
  2022.             $ref: "#/definitions/ErrorResponse"
  2023.   /admin/api/register:
  2024.     x-swagger-router-controller: admin_auth
  2025.     post:
  2026.       tags:
  2027.        - Adminpanel
  2028.       description: Logins as admin user
  2029.       operationId: register_admin
  2030.       parameters:
  2031.         - name: data
  2032.           in: body
  2033.           description: Login request body
  2034.           required: true
  2035.           schema:
  2036.             $ref: "#/definitions/AdminRegisterBody"
  2037.       responses:
  2038.         "200":
  2039.           description: Success
  2040.           schema:
  2041.             $ref: "#/definitions/AdminLoginResponse"
  2042.         "403":
  2043.           description: Invalid token or taken username
  2044.         default:
  2045.           description: Error
  2046.           schema:
  2047.             $ref: "#/definitions/ErrorResponse"
  2048.   /admin/api/is_logged_in:
  2049.     x-swagger-router-controller: admin_auth
  2050.     post:
  2051.       tags:
  2052.        - Adminpanel
  2053.       security:
  2054.         - adminKey: []
  2055.       description: Checks that admin is logged in
  2056.       operationId: is_logged_in_admin
  2057.       responses:
  2058.         "200":
  2059.           description: Success
  2060.           schema:
  2061.             $ref: "#/definitions/AdminLoginResponse"
  2062.         "403":
  2063.           description: Invalid token or taken username
  2064.         default:
  2065.           description: Error
  2066.           schema:
  2067.             $ref: "#/definitions/ErrorResponse"
  2068.   /admin/api/custom/code/request:
  2069.     x-swagger-router-controller: admin_admins
  2070.     post:
  2071.       tags:
  2072.        - Adminpanel
  2073.       security:
  2074.         - adminKey: []
  2075.       description: Requests link for admin user
  2076.       operationId: code_admin_request
  2077.       responses:
  2078.         "200":
  2079.           description: Success
  2080.           schema:
  2081.             $ref: "#/definitions/AdminCodeResponse"
  2082.         "403":
  2083.           description: Access denied
  2084.         default:
  2085.           description: Error
  2086.           schema:
  2087.             $ref: "#/definitions/ErrorResponse"
  2088.   /admin/api/countries:
  2089.     x-swagger-router-controller: country
  2090.     get:
  2091.       tags:
  2092.        - Adminpanel
  2093.       security:
  2094.         - adminKey: []
  2095.       description: Gets all countries
  2096.       operationId: all_countries_admin
  2097.       responses:
  2098.         "200":
  2099.           description: Success
  2100.           schema:
  2101.             type: array
  2102.             items:
  2103.               $ref: "#/definitions/CountryResponse"
  2104.         default:
  2105.           description: Error
  2106.           schema:
  2107.             $ref: "#/definitions/ErrorResponse"
  2108.   /admin/api/transaction/boundaries:
  2109.     x-swagger-router-controller: admin_transaction_types
  2110.     get:
  2111.       tags:
  2112.        - Adminpanel
  2113.       security:
  2114.         - adminKey: []
  2115.       description: Gets all the type boundaries defined
  2116.       operationId: all_transaction_types_admin
  2117.       responses:
  2118.         "200":
  2119.           description: Success
  2120.           schema:
  2121.             type: array
  2122.             items:
  2123.               $ref: "#/definitions/BoundaryResponse"
  2124.         default:
  2125.           description: Error
  2126.           schema:
  2127.             $ref: "#/definitions/ErrorResponse"
  2128.     post:
  2129.       tags:
  2130.        - Adminpanel
  2131.       security:
  2132.         - adminKey: []
  2133.       description: Replaces transaction types with the new ones
  2134.       operationId: replace_transaction_types
  2135.       parameters:
  2136.         - in: body
  2137.           name: data
  2138.           description: Transaction types (in cents!)
  2139.           required: true
  2140.           schema:
  2141.             type: array
  2142.             items:
  2143.               type: integer
  2144.       responses:
  2145.         "200":
  2146.           description: Success
  2147.         default:
  2148.           description: Error
  2149.           schema:
  2150.             $ref: "#/definitions/ErrorResponse"
  2151.   /admin/api/password/change:
  2152.     x-swagger-router-controller: admin_auth
  2153.     post:
  2154.       tags:
  2155.        - Adminpanel
  2156.       security:
  2157.         - adminKey: []
  2158.       description: Changes current AdminUser password
  2159.       operationId: change_password_admin
  2160.       parameters:
  2161.         - name: data
  2162.           in: body
  2163.           description: Login request body
  2164.           required: true
  2165.           schema:
  2166.             $ref: "#/definitions/AdminPasswordChangeRequest"
  2167.       responses:
  2168.         "200":
  2169.           description: Success
  2170.           schema:
  2171.             $ref: "#/definitions/AdminLoginResponse"
  2172.         "400":
  2173.           description: Invalid new password
  2174.         "403":
  2175.           description: Invalid token
  2176.         default:
  2177.           description: Error
  2178.           schema:
  2179.             $ref: "#/definitions/ErrorResponse"
  2180.  
  2181.   /admin/api/password/reset:
  2182.     x-swagger-router-controller: admin_auth
  2183.     post:
  2184.       tags:
  2185.        - Adminpanel
  2186.       security:
  2187.         - adminKey: []
  2188.       description: Resets specified AdminUser password
  2189.       operationId: reset_password_admin
  2190.       parameters:
  2191.         - name: data
  2192.           in: body
  2193.           description: Login request body
  2194.           required: true
  2195.           schema:
  2196.             $ref: "#/definitions/AdminPasswordResetRequest"
  2197.       responses:
  2198.         "200":
  2199.           description: Success
  2200.         "400":
  2201.           description: Invalid new password
  2202.         "403":
  2203.           description: Invalid token or trying to reset admin
  2204.         "404":
  2205.           description: User not found
  2206.         default:
  2207.           description: Error
  2208.           schema:
  2209.             $ref: "#/definitions/ErrorResponse"
  2210.            
  2211.   /admin/api/transaction/mangopay/all:
  2212.     x-swagger-router-controller: transactions
  2213.     get:
  2214.       tags:
  2215.        - Client
  2216.         - Banking
  2217.       security:
  2218.         - adminKey: []
  2219.       description: Gets all mangopay transactions
  2220.       operationId: list_mangopay_transactions_admin
  2221.       parameters:
  2222.         - name: startingId
  2223.           in: query
  2224.           type: number
  2225.           format: int64
  2226.           required: true
  2227.           description: Last known transaction id, or 0 if none known
  2228.         - name: userId
  2229.           in: query
  2230.           type: number
  2231.           format: int64
  2232.           required: false
  2233.           description: The user to filter the transaction by
  2234.       responses:
  2235.         "200":
  2236.           description: Success
  2237.           schema:
  2238.             type: array
  2239.             items:
  2240.               $ref: "#/definitions/TransactionInfo"
  2241.         default:
  2242.           description: Error
  2243.           schema:
  2244.             $ref: "#/definitions/ErrorResponse"
  2245.   /admin/api/transaction/mangopay/{id}:
  2246.     x-swagger-router-controller: transactions
  2247.     get:
  2248.       tags:
  2249.        - Client
  2250.         - Banking
  2251.       security:
  2252.         - adminKey: []
  2253.       description: Get one mangopay transaction
  2254.       operationId: get_mangopay_transaction_admin
  2255.       parameters:
  2256.         - name: id
  2257.           in: path
  2258.           type: number
  2259.           format: int64
  2260.           required: true
  2261.           description: id of the transaction to get
  2262.       responses:
  2263.         "200":
  2264.           description: Success
  2265.           schema:
  2266.             $ref: "#/definitions/TransactionInfo"
  2267.         default:
  2268.           description: Error
  2269.           schema:
  2270.             $ref: "#/definitions/ErrorResponse"
  2271.            
  2272.   /admin/api/currencies:
  2273.     x-swagger-router-controller: currencies
  2274.     get:
  2275.       tags:
  2276.        - Adminpanel
  2277.       security:
  2278.         - adminKey: []
  2279.       description: Gets all currencies
  2280.       operationId: all_currencies
  2281.       responses:
  2282.         "200":
  2283.           description: Success
  2284.           schema:
  2285.             type: array
  2286.             items:
  2287.               $ref: "#/definitions/CurrencyInfo"
  2288.  
  2289.   /admin/api/transaction/category/normal:
  2290.     x-swagger-router-controller: transactions
  2291.     get:
  2292.       tags:
  2293.        - Adminpanel
  2294.       security:
  2295.         - adminKey: []
  2296.       description: Lists all the transaction categories
  2297.       operationId: list_transaction_categories_admin
  2298.       responses:
  2299.         "200":
  2300.           description: Success
  2301.           schema:
  2302.             type: array
  2303.             items:
  2304.               $ref: "#/definitions/TransactionCategory"
  2305.         default:
  2306.           description: Error
  2307.           schema:
  2308.             $ref: "#/definitions/ErrorResponse"
  2309.            
  2310.   /admin/api/transaction/category/base:
  2311.     x-swagger-router-controller: transactions
  2312.     get:
  2313.       tags:
  2314.        - Adminpanel
  2315.       security:
  2316.         - adminKey: []
  2317.       description: Lists all the base transaction categories
  2318.       operationId: list_transaction_base_categories_admin
  2319.       responses:
  2320.         "200":
  2321.           description: Success
  2322.           schema:
  2323.             type: array
  2324.             items:
  2325.               $ref: "#/definitions/BaseTransactionCategory"
  2326.         default:
  2327.           description: Error
  2328.           schema:
  2329.             $ref: "#/definitions/ErrorResponse"    
  2330.            
  2331.   /admin/api/transaction/all:
  2332.     x-swagger-router-controller: transactions
  2333.     get:
  2334.       tags:
  2335.        - Adminpanel
  2336.       security:
  2337.         - adminKey: []
  2338.       description: Gets all the yodlee transactions
  2339.       operationId: list_transactions_admin
  2340.       parameters:
  2341.         - name: lastId
  2342.           in: query
  2343.           type: integer
  2344.         - name: userId
  2345.           in: query
  2346.           type: integer
  2347.         - name: isMagicRuleApplicable
  2348.           in: query
  2349.           type: integer
  2350.         - name: filterDate
  2351.           in: query
  2352.           type: string
  2353.           format: date
  2354.         - name: viewed
  2355.           in: query
  2356.           type: integer
  2357.       responses:
  2358.         "200":
  2359.           description: Success
  2360.           schema:
  2361.             type: array
  2362.             items:
  2363.               $ref: "#/definitions/Transaction"
  2364.         "403":
  2365.           description: Not authorized
  2366.         "404":
  2367.           description: Not found
  2368.         default:
  2369.           description: Error
  2370.           schema:
  2371.             $ref: "#/definitions/ErrorResponse"
  2372.            
  2373.   /admin/api/transaction/all/grouped:
  2374.     x-swagger-router-controller: transactions
  2375.     get:
  2376.       tags:
  2377.        - Adminpanel
  2378.       security:
  2379.         - adminKey: []
  2380.       description: Gets all the yodlee transactions
  2381.       operationId: list_grouped_by_day_transactions_admin
  2382.       parameters:
  2383.         - name: lastId
  2384.           in: query
  2385.           type: integer
  2386.         - name: userId
  2387.           in: query
  2388.           type: integer
  2389.         - name: isMagicRuleApplicable
  2390.           in: query
  2391.           type: integer
  2392.       responses:
  2393.         "200":
  2394.           description: Success
  2395.           schema:
  2396.             type: array
  2397.             items:
  2398.               $ref: "#/definitions/TransactionGroup"
  2399.         "403":
  2400.           description: Not authorized
  2401.         "404":
  2402.           description: Not found
  2403.         default:
  2404.           description: Error
  2405.           schema:
  2406.             $ref: "#/definitions/ErrorResponse"
  2407.  
  2408.   /admin/api/notifications/send:
  2409.     x-swagger-router-controller: push_notifications
  2410.     post:
  2411.       tags:
  2412.        - Adminpanel
  2413.       security:
  2414.         - adminKey: []
  2415.       description: Sends a push to a specific user
  2416.       operationId: send_push_to_user
  2417.       parameters:
  2418.         - name: data
  2419.           in: body
  2420.           required: true
  2421.           schema:
  2422.             $ref: '#/definitions/PushToUserBody'
  2423.       responses:
  2424.         "200":
  2425.           description: Sucess
  2426.           schema:
  2427.             $ref: '#/definitions/PushResult'
  2428.         default:
  2429.           description: Error
  2430.           schema:
  2431.             $ref: "#/definitions/ErrorResponse"
  2432.  
  2433.   /admin/api/transaction/{id}:
  2434.     x-swagger-router-controller: transactions
  2435.     get:
  2436.       tags:
  2437.        - Adminpanel
  2438.       security:
  2439.         - adminKey: []
  2440.       description: Gets all the user transactions
  2441.       operationId: get_transaction_admin
  2442.       parameters:
  2443.         - name: id
  2444.           in: path
  2445.           type: integer
  2446.           required: true
  2447.       responses:
  2448.         "200":
  2449.           description: Success
  2450.           schema:
  2451.             $ref: "#/definitions/Transaction"
  2452.         "403":
  2453.           description: Not authorized
  2454.         "404":
  2455.           description: Not found
  2456.         default:
  2457.           description: Error
  2458.           schema:
  2459.             $ref: "#/definitions/ErrorResponse"
  2460.  
  2461.   /admin/api/article:
  2462.     x-swagger-router-controller: news
  2463.     get:
  2464.       tags:
  2465.        - Adminpanel
  2466.       security:
  2467.         - adminKey: []
  2468.       description: Get news with offset and limit
  2469.       operationId: getArticle
  2470.       parameters:
  2471.         - name: id
  2472.           in: query
  2473.           type: number
  2474.           required: true
  2475.       responses:
  2476.         "200":
  2477.           description: Success
  2478.           schema:
  2479.             $ref: "#/definitions/News"
  2480.         "403":
  2481.           description: Not authorized
  2482.         "404":
  2483.           description: Not found
  2484.         default:
  2485.           description: Error
  2486.           schema:
  2487.             $ref: "#/definitions/ErrorResponse"
  2488.     post:
  2489.       tags:
  2490.        - Adminpanel
  2491.       security:
  2492.         - adminKey: []
  2493.       description: Add or update an article
  2494.       operationId: postArticle
  2495.       parameters:
  2496.         - name: id
  2497.           in: query
  2498.           type: number
  2499.       responses:
  2500.         "200":
  2501.           description: Success
  2502.           schema:
  2503.             $ref: "#/definitions/News"
  2504.         "403":
  2505.           description: Not authorized
  2506.         "404":
  2507.           description: Not found
  2508.         default:
  2509.           description: Error
  2510.           schema:
  2511.             $ref: "#/definitions/ErrorResponse"
  2512.     delete:
  2513.       tags:
  2514.        - Adminpanel
  2515.       security:
  2516.         - adminKey: []
  2517.       description: Delete an article
  2518.       operationId: deleteAticle
  2519.       parameters:
  2520.         - name: id
  2521.           in: query
  2522.           type: number
  2523.           required: true
  2524.       responses:
  2525.         "200":
  2526.           description: Success
  2527.         default:
  2528.           description: Error
  2529.           schema:
  2530.             $ref: "#/definitions/ErrorResponse"
  2531.  
  2532.   /admin/api/news/get:
  2533.     x-swagger-router-controller: news
  2534.     get:
  2535.       tags:
  2536.        - Adminpanel
  2537.       security:
  2538.         - adminKey: []
  2539.       description: Get news with offset and limit
  2540.       operationId: getNews
  2541.       parameters:
  2542.         - name: offset
  2543.           in: query
  2544.           type: number
  2545.           required: true
  2546.         - name: limit
  2547.           in: query
  2548.           type: number
  2549.           required: true
  2550.         - name: order
  2551.           in: query
  2552.           type: string
  2553.           enum: ['ASC', 'DESC']
  2554.           required: false
  2555.       responses:
  2556.         "200":
  2557.           description: Success
  2558.           schema:
  2559.             $ref: "#/definitions/getNews"
  2560.         "403":
  2561.           description: Not authorized
  2562.         "404":
  2563.           description: Not found
  2564.         default:
  2565.           description: Error
  2566.           schema:
  2567.             $ref: "#/definitions/ErrorResponse"
  2568.  
  2569.   /api/news/get:
  2570.     x-swagger-router-controller: news
  2571.     get:
  2572.       tags:
  2573.        - Adminpanel
  2574.       security:
  2575.         - userKey: []
  2576.       description: Get news with offset and limit
  2577.       operationId: getNews
  2578.       parameters:
  2579.         - name: offset
  2580.           in: query
  2581.           type: number
  2582.           required: true
  2583.         - name: limit
  2584.           in: query
  2585.           type: number
  2586.           required: true
  2587.         - name: order
  2588.           in: query
  2589.           type: string
  2590.           enum: ['ASC', 'DESC']
  2591.           required: false
  2592.       responses:
  2593.         "200":
  2594.           description: Success
  2595.           schema:
  2596.             $ref: "#/definitions/getNews"
  2597.         "403":
  2598.           description: Not authorized
  2599.         "404":
  2600.           description: Not found
  2601.         default:
  2602.           description: Error
  2603.           schema:
  2604.             $ref: "#/definitions/ErrorResponse"
  2605.  
  2606.   /api/getSuggestions/{type}:
  2607.     x-swagger-router-controller: suggestions
  2608.     get:
  2609.       tags:
  2610.        - Client
  2611.       security:
  2612.         - userKey: []
  2613.       description: Getting rules suggestions
  2614.       operationId: getUserRulesPrototypes
  2615.       parameters:
  2616.         - name: type
  2617.           in: path
  2618.           type: string
  2619.           required: true
  2620.       responses:
  2621.         "200":
  2622.           description: Success
  2623.           schema:
  2624.             $ref: "#/definitions/ruleSuggestions"
  2625.         default:
  2626.           description: Error
  2627.           schema:
  2628.             $ref: "#/definitions/ErrorResponse"
  2629.  
  2630.   /api/statistics/day:
  2631.     x-swagger-router-controller: statistics
  2632.     get:
  2633.       tags:
  2634.        - Client
  2635.       security:
  2636.         - userKey: []
  2637.       description: Get statistics on a day
  2638.       operationId: getDailyStatistics
  2639.       parameters:
  2640.         - name: date
  2641.           in: query
  2642.           type: string
  2643.           required: false
  2644.       responses:
  2645.         "200":
  2646.           description: Success
  2647.           schema:
  2648.             $ref: "#/definitions/dailyStatistics"
  2649.         default:
  2650.           description: Error
  2651.           schema:
  2652.             $ref: "#/definitions/ErrorResponse"
  2653.  
  2654.   /api/statistics/week:
  2655.     x-swagger-router-controller: statistics
  2656.     get:
  2657.       tags:
  2658.        - Client
  2659.       security:
  2660.         - userKey: []
  2661.       description: Get statistics on a week
  2662.       operationId: getWeeklyStatistics
  2663.       parameters:
  2664.         - name: date
  2665.           in: query
  2666.           type: string
  2667.           required: false
  2668.       responses:
  2669.         "200":
  2670.           description: Success
  2671.           schema:
  2672.             $ref: "#/definitions/weeklyStatistics"
  2673.         default:
  2674.           description: Error
  2675.           schema:
  2676.             $ref: "#/definitions/ErrorResponse"
  2677.  
  2678.   /api/statistics/chart:
  2679.     x-swagger-router-controller: statistics
  2680.     get:
  2681.       tags:
  2682.        - Client
  2683.       security:
  2684.         - userKey: []
  2685.       description: Get statistics on a week for chart
  2686.       operationId: getWeeklyChart
  2687.       parameters:
  2688.         - name: date
  2689.           in: query
  2690.           type: string
  2691.           required: false
  2692.       responses:
  2693.         "200":
  2694.           description: Success
  2695.           schema:
  2696.             $ref: "#/definitions/weeklyChart"
  2697.         default:
  2698.           description: Error
  2699.           schema:
  2700.             $ref: "#/definitions/ErrorResponse"
  2701.  
  2702.   /api/statistics/transactions:
  2703.     x-swagger-router-controller: statistics
  2704.     get:
  2705.       tags:
  2706.        - Client
  2707.       security:
  2708.         - userKey: []
  2709.       description: Get statistics of transactions for a month
  2710.       operationId: getAvgTransactions
  2711.       parameters:
  2712.         - name: date
  2713.           in: query
  2714.           type: string
  2715.           required: true
  2716.       responses:
  2717.         "200":
  2718.           description: Success
  2719.           schema:
  2720.             $ref: "#/definitions/transactionsAvarage"
  2721.         default:
  2722.           description: Error
  2723.           schema:
  2724.             $ref: "#/definitions/ErrorResponse"
  2725.  
  2726.   /api/statistics/rulesDynamics:
  2727.     x-swagger-router-controller: statistics
  2728.     get:
  2729.       tags:
  2730.        - Client
  2731.       security:
  2732.         - userKey: []
  2733.       description: Get Rules with statistics for current and last month
  2734.       operationId: rulesWithStats
  2735.       parameters:
  2736.         - name: date
  2737.           in: query
  2738.           type: string
  2739.           required: false
  2740.       responses:
  2741.         "200":
  2742.           description: Success
  2743.           schema:
  2744.             $ref: "#/definitions/RuleStats"
  2745.         default:
  2746.           description: Error
  2747.           schema:
  2748.             $ref: "#/definitions/ErrorResponse"
  2749.  
  2750.   /api/payments/balance:
  2751.     x-swagger-router-controller: payments
  2752.     get:
  2753.       tags:
  2754.        - Client
  2755.       security:
  2756.         - userKey: []
  2757.       description: Check user balance in Oval
  2758.       operationId: checkBalance
  2759.       responses:
  2760.         "200":
  2761.           description: Success
  2762.           schema:
  2763.             $ref: "#/definitions/userBalance"
  2764.         default:
  2765.           description: Error
  2766.           schema:
  2767.             $ref: "#/definitions/ErrorResponse"
  2768.  
  2769.   /api/payments/history:
  2770.     x-swagger-router-controller: payments
  2771.     get:
  2772.       tags:
  2773.        - Client
  2774.       security:
  2775.         - userKey: []
  2776.       description: Check user payments history in Oval
  2777.       operationId: getPaymentsHistory
  2778.       parameters:
  2779.         - name: limit
  2780.           in: query
  2781.           type: string
  2782.           required: false
  2783.         - name: offset
  2784.           in: query
  2785.           type: string
  2786.           required: false
  2787.       responses:
  2788.         "200":
  2789.           description: Success
  2790.           schema:
  2791.             $ref: "#/definitions/history"
  2792.         default:
  2793.           description: Error
  2794.           schema:
  2795.             $ref: "#/definitions/ErrorResponse"
  2796.  
  2797.   /queue/{uuid}:
  2798.     x-swagger-router-controller: queue
  2799.     get:
  2800.       tags:
  2801.        - uuid
  2802.       description: Refcounter
  2803.       operationId: redirect
  2804.       parameters:
  2805.         - name: uuid
  2806.           in: path
  2807.           type: string
  2808.           required: true
  2809.       responses:
  2810.         "200":
  2811.           description: Success
  2812.           schema:
  2813.             $ref: "#/definitions/BadWolf"
  2814.         default:
  2815.           description: Error
  2816.           schema:
  2817.             $ref: "#/definitions/ErrorResponse"
  2818.  
  2819.   /hooks/payin:
  2820.     x-swagger-router-controller: mangopay_hooks
  2821.     get:
  2822.       tags:
  2823.        - Client
  2824.         - Mangopay
  2825.         - Banking
  2826.       description: This is a hook that will provide PAYIN-related events (see https://docs.mangopay.com/api-references/notifications/). This method supports additional EventType of "CLIENT_REFRESH" to force the refreshment of the transaction.
  2827.       operationId: payin_hook
  2828.       parameters:
  2829.         - name: EventType
  2830.           in: query
  2831.           type: string
  2832.           required: true
  2833.           description: Can be one of described here https://docs.mangopay.com/api-references/notifications/ with additional "CLIENT_REFRESH" status - this is for the mobile client to use, it will update transaction info in the database
  2834.         - name: ResourceId
  2835.           in: query
  2836.           type: string
  2837.           required: true
  2838.           description: mangopayId of the transaction
  2839.         - name: Date
  2840.           in: query
  2841.           type: string
  2842.           required: false
  2843.           description: This parameter is never used
  2844.       responses:
  2845.         "200":
  2846.           description: Success
  2847.           schema:
  2848.             $ref: "#/definitions/HookResponse"
  2849.         default:
  2850.           description: Error
  2851.           schema:
  2852.             $ref: "#/definitions/ErrorResponse"
  2853.  
  2854.   /badwolf:
  2855.     x-swagger-router-controller: badwolf
  2856.     get:
  2857.       tags:
  2858.        - Bad Wolf
  2859.         - Client
  2860.       description: Bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf
  2861.       operationId: bad_wolf
  2862.       parameters:
  2863.         - name: badwolf
  2864.           in: query
  2865.           type: string
  2866.           description: bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf
  2867.       responses:
  2868.         "200":
  2869.           description: Bad Wolf
  2870.           schema:
  2871.             $ref: "#/definitions/BadWolf"
  2872.         default:
  2873.           description: Bad Wolf
  2874.           schema:
  2875.             $ref: "#/definitions/ErrorResponse"
  2876.  
  2877.   /hooks/payout:
  2878.     x-swagger-router-controller: mangopay_hooks
  2879.     get:
  2880.       tags:
  2881.        - Client
  2882.         - Mangopay
  2883.         - Banking
  2884.       description: This is a hook that will provide PAYOUT-related events (see https://docs.mangopay.com/api-references/notifications/). This method supports additional EventType of "CLIENT_REFRESH" to force the refreshment of the transaction.
  2885.       operationId: payout_hook
  2886.       parameters:
  2887.         - name: EventType
  2888.           in: query
  2889.           type: string
  2890.           required: true
  2891.           description: Can be one of described here https://docs.mangopay.com/api-references/notifications/ with additional "CLIENT_REFRESH" status - this is for the mobile client to use, it will update transaction info in the database
  2892.         - name: ResourceId
  2893.           in: query
  2894.           type: string
  2895.           required: true
  2896.           description: mangopayId of the transaction
  2897.         - name: Date
  2898.           in: query
  2899.           type: string
  2900.           required: false
  2901.           description: This parameter is never used
  2902.       responses:
  2903.         "200":
  2904.           description: Success
  2905.           schema:
  2906.             $ref: "#/definitions/HookResponse"
  2907.         default:
  2908.           description: Error
  2909.           schema:
  2910.             $ref: "#/definitions/ErrorResponse"
  2911.   /swagger:
  2912.     x-swagger-pipe: swagger_raw
  2913. # complex objects have schema definitions
  2914. definitions:
  2915.   ErrorResponse:
  2916.     required:
  2917.      - message
  2918.     properties:
  2919.       message:
  2920.         type: string
  2921.       messageCode:
  2922.         type: string
  2923.  
  2924.   YodleeAccountsResponse:
  2925.     required:
  2926.      - accounts
  2927.     properties:
  2928.       accounts:
  2929.         type: array
  2930.         items:
  2931.           $ref: "#/definitions/AccountInfo"
  2932.  
  2933.   TotalBalance:
  2934.     required:
  2935.      - amount
  2936.       - currencyCode
  2937.     properties:
  2938.       amount:
  2939.         type: number
  2940.         format: double
  2941.       currencyCode:
  2942.         type: string
  2943.         description: ISO Currency code
  2944.  
  2945.   ChangeItemAccountStateBody:
  2946.     required:
  2947.      - itemAccountId
  2948.       - activate
  2949.     properties:
  2950.       itemAccountId:
  2951.         type: string
  2952.       activate:
  2953.         type: boolean
  2954.  
  2955.   AccountInfo:
  2956.     required:
  2957.      - name
  2958.       - itemId
  2959.       - itemAccountId
  2960.       - favicon
  2961.       - maskedAccountNumber
  2962.       - type
  2963.       - balance
  2964.     properties:
  2965.       name:
  2966.         type: string
  2967.       itemId:
  2968.         type: string
  2969.       itemAccountId:
  2970.         type: string
  2971.       favicon:
  2972.         type: string
  2973.       maskedAccountNumber:
  2974.         type: string
  2975.       type:
  2976.         type: string
  2977.       balance:
  2978.         $ref: "#/definitions/TotalBalance"
  2979.  
  2980.   UrlResponse:
  2981.     required:
  2982.      - url
  2983.     properties:
  2984.       url:
  2985.         type: string
  2986.       body:
  2987.         type: string
  2988.         description: Will be present, if request must be made with POST
  2989.  
  2990.   FacebookLoginBody:
  2991.     type: object
  2992.     required:
  2993.      - access_token
  2994.     properties:
  2995.       access_token:
  2996.         type: string
  2997.         description: access_token provided by Facebook
  2998.       refresh_token:
  2999.         type: string
  3000.         description: access_token provided by Facebook
  3001.  
  3002.   PasswordResetBody:
  3003.     type: object
  3004.     required:
  3005.      - email
  3006.     properties:
  3007.       email:
  3008.         type: string
  3009.         description: email to login as
  3010.  
  3011.   PasswordResetDoBody:
  3012.     type: object
  3013.     required:
  3014.      - token
  3015.       - newPassword
  3016.     properties:
  3017.       token:
  3018.         type: string
  3019.       newPassword:
  3020.         type: string
  3021.         format: password
  3022.  
  3023.   AdminLoginBody:
  3024.     type: object
  3025.     required:
  3026.      - username
  3027.       - password
  3028.     properties:
  3029.       username:
  3030.         type: string
  3031.         description: username to login as
  3032.       password:
  3033.         type: string
  3034.         description: password to confirm login
  3035.  
  3036.   AdminRegisterBody:
  3037.     type: object
  3038.     required:
  3039.      - username
  3040.       - password
  3041.       - token
  3042.     properties:
  3043.       username:
  3044.         type: string
  3045.         description: username to login as
  3046.       password:
  3047.         type: string
  3048.         description: password to confirm login
  3049.       token:
  3050.         type: string
  3051.         description: The token we get as register code
  3052.   AdminLoginResponse:
  3053.     type: object
  3054.     required:
  3055.      - token
  3056.       - username
  3057.     properties:
  3058.       token:
  3059.         type: string
  3060.         description: JWT to use as x-auth-token
  3061.       username:
  3062.         type: string
  3063.  
  3064.   UserLoginResponse:
  3065.     type: object
  3066.     required:
  3067.      - token
  3068.       - id
  3069.     properties:
  3070.       token:
  3071.         type: string
  3072.         description: JWT to use as x-auth-token
  3073.       id:
  3074.         type: integer
  3075.  
  3076.   UserExistenceCheckResponse:
  3077.     type: object
  3078.     required:
  3079.      - userFound
  3080.     properties:
  3081.       userFound:
  3082.         type: boolean
  3083.  
  3084.   AdminCodeResponse:
  3085.     type: object
  3086.     required:
  3087.      - link
  3088.     properties:
  3089.       link:
  3090.         type: string
  3091.         description: Part of a link to use as login response
  3092.   EmailLoginBody:
  3093.     type: object
  3094.     required:
  3095.      - email
  3096.       - password
  3097.     properties:
  3098.       email:
  3099.         type: string
  3100.         description: email to login as
  3101.       password:
  3102.         type: string
  3103.         description: password to confirm login
  3104.         format: password
  3105.  
  3106.   UserAvatar:
  3107.     required:
  3108.      - profileImage
  3109.     properties:
  3110.       profileImage:
  3111.         type: string
  3112.         description: URL for the image
  3113.  
  3114.   UserProfileResponse:
  3115.     required:
  3116.      - id
  3117.       - createdAt
  3118.       - updatedAt
  3119.       - firstName
  3120.       - lastName
  3121.       - gender
  3122.       - email
  3123.       - birthday
  3124.       - countryCode2
  3125.       - citizenshipCode2
  3126.       - identityProofStatus
  3127.       - kycLevel
  3128.       - detectedCurrency
  3129.     properties:
  3130.       id:
  3131.         type: integer
  3132.       createdAt:
  3133.         type: string
  3134.         format: date-time
  3135.       updatedAt:
  3136.         type: string
  3137.         format: date-time
  3138.       firstName:
  3139.         type: string
  3140.       lastName:
  3141.         type: string
  3142.       profileImage:
  3143.         type: string
  3144.         description: URL for the image
  3145.       gender:
  3146.         type: string
  3147.       email:
  3148.         type: string
  3149.       birthday:
  3150.         type: string
  3151.         format: date
  3152.       countryCode2:
  3153.         type: string
  3154.       citizenshipCode2:
  3155.         type: string
  3156.       addressCountryCode2:
  3157.         type: string
  3158.       facebookId:
  3159.         type: string
  3160.       address:
  3161.         type: string
  3162.       zipCode:
  3163.         type: string
  3164.       region:
  3165.         type: string
  3166.       city:
  3167.         type: string
  3168.       occupation:
  3169.         type: string
  3170.       incomeRange:
  3171.         type: string
  3172.         description: Can be one of "1", "2", "3", "4", "5", "6". See description at https://docs.mangopay.com/api-references/users/natural-users/
  3173.       identityProofStatus:
  3174.         type: string
  3175.         description: Can be one of "NOT_UPLOADED", "CREATED", "VALIDATION_ASKED", "VALIDATED", "REFUSED", see reference here https://docs.mangopay.com/api-references/kyc/documents/
  3176.       kycLevel:
  3177.         type: string
  3178.         description: Can be one of "LIGHT", "REGULAR". See reference here https://docs.mangopay.com/api-references/users/natural-users/
  3179.       detectedCurrency:
  3180.         type: string
  3181.         description: Will be a ISO currency code that was detected during registration.
  3182.       position:
  3183.         type: integer
  3184.       uuid:
  3185.         type: string
  3186.   AdminProfileResponse:
  3187.     required:
  3188.      - id
  3189.       - createdAt
  3190.       - updatedAt
  3191.       - username
  3192.     properties:
  3193.       id:
  3194.         type: integer
  3195.       createdAt:
  3196.         type: string
  3197.         format: date-time
  3198.       updatedAt:
  3199.         type: string
  3200.         format: date-time
  3201.       username:
  3202.         type: string
  3203.   EmailRegistrationBody:
  3204.     required:
  3205.      - firstName
  3206.       - lastName
  3207.       - gender
  3208.       - email
  3209.       - birthday
  3210.       - countryCode2
  3211.       - citizenshipCode2
  3212.       - password
  3213.     properties:
  3214.       firstName:
  3215.         type: string
  3216.       lastName:
  3217.         type: string
  3218.       gender:
  3219.         type: string
  3220.       email:
  3221.         type: string
  3222.       birthday:
  3223.         type: string
  3224.         format: date
  3225.       countryCode2:
  3226.         type: string
  3227.       citizenshipCode2:
  3228.         type: string
  3229.       password:
  3230.         type: string
  3231.         format: password
  3232.         description: Password should be at least 8 characteds long, should contain 1 letter and 1 number
  3233.   FacebookRegistrationBody:
  3234.     required:
  3235.      - firstName
  3236.       - lastName
  3237.       - gender
  3238.       - email
  3239.       - birthday
  3240.       - countryCode2
  3241.       - citizenshipCode2
  3242.       - access_token
  3243.     properties:
  3244.       firstName:
  3245.         type: string
  3246.       lastName:
  3247.         type: string
  3248.       gender:
  3249.         type: string
  3250.       email:
  3251.         type: string
  3252.       birthday:
  3253.         type: string
  3254.         format: date
  3255.       countryCode2:
  3256.         type: string
  3257.       citizenshipCode2:
  3258.         type: string
  3259.       access_token:
  3260.         type: string
  3261.         description: access_token provided by Facebook
  3262.       refresh_token:
  3263.         type: string
  3264.         description: access_token provided by Facebook
  3265.   UserProfileChangeRequest:
  3266.     properties:
  3267.       firstName:
  3268.         type: string
  3269.       lastName:
  3270.         type: string
  3271.       gender:
  3272.         type: string
  3273.       email:
  3274.         type: string
  3275.       birthday:
  3276.         type: string
  3277.         format: date
  3278.       newPassword:
  3279.         type: string
  3280.         format: password
  3281.       oldPassword:
  3282.         type: string
  3283.         format: password
  3284.         description: This must be supplied only if the new password is entered
  3285.       countryCode2:
  3286.         type: string
  3287.       citizenshipCode2:
  3288.         type: string
  3289.       addressCountryCode2:
  3290.         type: string
  3291.       address:
  3292.         type: string
  3293.       zipCode:
  3294.         type: string
  3295.       region:
  3296.         type: string
  3297.       city:
  3298.         type: string
  3299.       occupation:
  3300.         type: string
  3301.       tokens:
  3302.         type: string
  3303.       incomeRange:
  3304.         type: string
  3305.         description: Can be one of "1", "2", "3", "4", "5", "6". See description at https://docs.mangopay.com/api-references/users/natural-users/
  3306.  
  3307.   UserProfileChangeRequestAdmin:
  3308.     required:
  3309.      - id
  3310.     properties:
  3311.       id:
  3312.         type: integer
  3313.       firstName:
  3314.         type: string
  3315.       lastName:
  3316.         type: string
  3317.       gender:
  3318.         type: string
  3319.       email:
  3320.         type: string
  3321.       birthday:
  3322.         type: string
  3323.         format: date
  3324.       newPassword:
  3325.         type: string
  3326.         format: password
  3327.       oldPassword:
  3328.         type: string
  3329.         format: password
  3330.         description: This must be supplied only if the new password is entered
  3331.       countryCode2:
  3332.         type: string
  3333.       citizenshipCode2:
  3334.         type: string
  3335.       addressCountryCode2:
  3336.         type: string
  3337.       address:
  3338.         type: string
  3339.       zipCode:
  3340.         type: string
  3341.       region:
  3342.         type: string
  3343.       city:
  3344.         type: string
  3345.       occupation:
  3346.         type: string
  3347.       incomeRange:
  3348.         type: string
  3349.         description: Can be one of "1", "2", "3", "4", "5", "6". See description at https://docs.mangopay.com/api-references/users/natural-users/
  3350.  
  3351.   AdminPasswordChangeRequest:
  3352.     required:
  3353.      - oldPassword
  3354.       - newPassword
  3355.     properties:
  3356.       newPassword:
  3357.         type: string
  3358.         format: password
  3359.       oldPassword:
  3360.         type: string
  3361.         format: password
  3362.  
  3363.   AdminPasswordResetRequest:
  3364.     required:
  3365.      - id
  3366.       - newPassword
  3367.     properties:
  3368.       id:
  3369.         type: integer
  3370.       newPassword:
  3371.         type: string
  3372.         format: password
  3373.  
  3374.   IDOnlyRequest:
  3375.     required:
  3376.      - id
  3377.     properties:
  3378.       id:
  3379.         type: integer
  3380.  
  3381.   VersionsResponse:
  3382.     required:
  3383.      - latest
  3384.       - allowed
  3385.     properties:
  3386.       latest:
  3387.         type: string
  3388.         description: Latest app version, follows semver
  3389.       allowed:
  3390.         type: string
  3391.         description: Minimum allowed app version, follows semver
  3392.   TimeResponse:
  3393.     required:
  3394.      - time
  3395.     properties:
  3396.       time:
  3397.         type: string
  3398.         format: date-time
  3399.         description: Current date-time
  3400.   CountryResponse:
  3401.     required:
  3402.      - name
  3403.       - code2
  3404.       - code3
  3405.       - nationality
  3406.       - currency
  3407.     properties:
  3408.       name:
  3409.         type: string
  3410.       code2:
  3411.         type: string
  3412.       code3:
  3413.         type: string
  3414.       nationality:
  3415.         type: string
  3416.       currency:
  3417.         type: string
  3418.  
  3419.   BoundaryResponse:
  3420.     required:
  3421.      - id
  3422.       - boundaryValue
  3423.     properties:
  3424.       id:
  3425.         type: integer
  3426.       boundaryValue:
  3427.         type: integer
  3428.         format: int64
  3429.       createdAt:
  3430.         type: string
  3431.         format: date-time
  3432.       updatedAt:
  3433.         type: string
  3434.         format: date-time
  3435.  
  3436.   MoneyOperationBody:
  3437.     required:
  3438.      - amount
  3439.     properties:
  3440.       amount:
  3441.         type: integer
  3442.         description: Amount in the currency of the account
  3443.  
  3444.   HookResponse:
  3445.     required:
  3446.      - status
  3447.     properties:
  3448.       status:
  3449.         type: string
  3450.         description: Will always be equal to "notification_received", this is a filler property to reply to mangopay
  3451.       transactionId:
  3452.         type: integer
  3453.         description: Will only be present if EventType is "CLIENT_REFRESH"
  3454.  
  3455.   TransactionInfo:
  3456.     required:
  3457.      - id
  3458.       - mangopayId
  3459.       - createdAt
  3460.       - updatedAt
  3461.       - userId
  3462.       - status
  3463.       - nature
  3464.       - type
  3465.       - creditedFundsOriginal
  3466.       - creditedFundsEuro
  3467.       - creditedFundsAccountCurrency
  3468.       - debitedFundsOriginal
  3469.       - debitedFundsEuro
  3470.       - debitedFundsAccountCurrency
  3471.     properties:
  3472.       id:
  3473.         type: number
  3474.         format: int64
  3475.       tag:
  3476.         type: string
  3477.         description: Represents whether transaction was "manual" or "automatic"
  3478.       createdAt:
  3479.         type: string
  3480.         format: date-time
  3481.       updatedAt:
  3482.         type: string
  3483.         format: date-time
  3484.       userId:
  3485.         type: number
  3486.         format: int64
  3487.       mangopayId:
  3488.         type: string
  3489.       type:
  3490.         type: string
  3491.         description: Will be "PAYIN" or "PAYOUT"
  3492.       isPayIn:
  3493.         type: boolean
  3494.       nature:
  3495.         type: string
  3496.       status:
  3497.         type: string
  3498.       creditedFundsOriginal:
  3499.         $ref: "#/definitions/TotalBalance"
  3500.       creditedFundsEuro:
  3501.         $ref: "#/definitions/TotalBalance"
  3502.       creditedFundsAccountCurrency:
  3503.         $ref: "#/definitions/TotalBalance"
  3504.       debitedFundsOriginal:
  3505.         $ref: "#/definitions/TotalBalance"
  3506.       debitedFundsEuro:
  3507.         $ref: "#/definitions/TotalBalance"
  3508.       debitedFundsAccountCurrency:
  3509.         $ref: "#/definitions/TotalBalance"
  3510.  
  3511.   CurrencyInfo:
  3512.     required:
  3513.      - code
  3514.       - rate
  3515.     properties:
  3516.       code:
  3517.         type: string
  3518.         description: ISO currency code
  3519.       rate:
  3520.         type: number
  3521.         format: double
  3522.  
  3523.   BaseTransactionCategory:
  3524.     required:
  3525.      - id
  3526.       - name
  3527.       - magicRules
  3528.     properties:
  3529.       id:
  3530.         type: integer
  3531.       name:
  3532.         type: string
  3533.       magicRules:
  3534.         type: boolean
  3535.         description: Indicates whether magic rules are applied to this category or not
  3536.  
  3537.   TransactionCategory:
  3538.     required:
  3539.      - id
  3540.       - name
  3541.       - yodleeId
  3542.       - baseCategoryId
  3543.     properties:
  3544.       id:
  3545.         type: integer
  3546.       name:
  3547.         type: string
  3548.       yodleeId:
  3549.         type: integer
  3550.       baseCategoryId:
  3551.         type: integer
  3552.  
  3553.   AttachMangopayAccountBody:
  3554.     required:
  3555.      - type
  3556.       - culture
  3557.       - name
  3558.       - address
  3559.       - countryCode2
  3560.       - city
  3561.     properties:
  3562.       type:
  3563.         type: string
  3564.         description: Account type (either GB or IBAN)
  3565.       culture:
  3566.         type: string
  3567.         description: Culture from Mandate. EN or FR for type = IBAN, or EN for type = GB
  3568.       name:
  3569.         type: string
  3570.         description: OwnerName from Mangopay API
  3571.       address:
  3572.         type: string
  3573.         description: AddressLine1 from Mangopay API
  3574.       countryCode2:
  3575.         type: string
  3576.         description: Country ISO Code
  3577.       city:
  3578.         type: string
  3579.         description: City from Mangopay API
  3580.       zipCode:
  3581.         type: string
  3582.         description: PostalCode from Mangopay API
  3583.       region:
  3584.         type: string
  3585.         description: Region from Mangopay API
  3586.       IBAN:
  3587.         type: string
  3588.         description: Required and available only for IBAN type
  3589.       BIC:
  3590.         type: string
  3591.         description: Available only for IBAN type, can be derived by Mangopay automatically
  3592.       accountNumber:
  3593.         type: string
  3594.         description: Required and available only for GB type. Should match regex /^\d+$/
  3595.       sortCode:
  3596.         type: string
  3597.         description: Required and available only for GB type. Should match regex /^\d{6}$/
  3598.   MangopayBankAccount:
  3599.     required:
  3600.      - type
  3601.       - name
  3602.       - address
  3603.       - countryCode2
  3604.       - city
  3605.       - status
  3606.     properties:
  3607.       type:
  3608.         type: string
  3609.         description: Account type (either GB or IBAN)
  3610.       name:
  3611.         type: string
  3612.         description: OwnerName from Mangopay API
  3613.       address:
  3614.         type: string
  3615.         description: AddressLine1 from Mangopay API
  3616.       countryCode2:
  3617.         type: string
  3618.         description: Country ISO Code
  3619.       city:
  3620.         type: string
  3621.         description: City from Mangopay API
  3622.       zipCode:
  3623.         type: string
  3624.         description: PostalCode from Mangopay API
  3625.       region:
  3626.         type: string
  3627.         description: Region from Mangopay API
  3628.       status:
  3629.         type: string
  3630.         description: Mandate status
  3631.       IBAN:
  3632.         type: string
  3633.         description: Required and available only for IBAN type
  3634.       BIC:
  3635.         type: string
  3636.         description: Available only for IBAN type, can be derived by Mangopay automatically
  3637.       accountNumber:
  3638.         type: string
  3639.         description: Required and available only for GB type. Should match regex /^\d+$/
  3640.       sortCode:
  3641.         type: string
  3642.         description: Required and available only for GB type. Should match regex /^\d{6}$/
  3643.  
  3644.   YodleeCallbackListenerResponse:
  3645.     required:
  3646.      - callbackCalled
  3647.     properties:
  3648.       callbackCalled:
  3649.         type: boolean
  3650.         description: If the callback was called this will be true
  3651.  
  3652.  
  3653.   TransactionsStats:
  3654.     required:
  3655.      - count
  3656.       - amountEuro
  3657.       - amountAccountCurrency
  3658.     properties:
  3659.       count:
  3660.         type: integer
  3661.       amountEuro:
  3662.         $ref: "#/definitions/TotalBalance"
  3663.       amountAccountCurrency:
  3664.         $ref: "#/definitions/TotalBalance"
  3665.  
  3666.   TransactionDescription:
  3667.     properties:
  3668.       description:
  3669.         type: string
  3670.       merchantName:
  3671.         type: string
  3672.  
  3673.   Transaction:
  3674.     required:
  3675.      - id
  3676.       - createdAt
  3677.       - updatedAt
  3678.       - yodleeId
  3679.       - description
  3680.       - transactionDate
  3681.       - transactionCategoryId
  3682.       - userId
  3683.       - amountOriginal
  3684.       - amountEuro
  3685.       - amountAccountCurrency
  3686.       - viewed
  3687.     properties:
  3688.       id:
  3689.         type: integer
  3690.       createdAt:
  3691.         type: string
  3692.         format: date-time
  3693.       updatedAt:
  3694.         type: string
  3695.         format: date-time
  3696.       transactionDate:
  3697.         type: string
  3698.         format: date-time
  3699.       userId:
  3700.         type: integer
  3701.       link:
  3702.         type: string
  3703.       description:
  3704.         $ref: "#/definitions/TransactionDescription"
  3705.       transactionCategoryId:
  3706.         type: integer
  3707.       yodleeId:
  3708.         type: integer
  3709.       amountOriginal:
  3710.         $ref: "#/definitions/TotalBalance"
  3711.       amountEuro:
  3712.         $ref: "#/definitions/TotalBalance"
  3713.       amountAccountCurrency:
  3714.         $ref: "#/definitions/TotalBalance"
  3715.       viewed:
  3716.         type: boolean
  3717.       preMangopayTransaction:
  3718.         $ref: '#/definitions/PreMangopayTransaction'
  3719.  
  3720.   TransactionGroup:
  3721.     required:
  3722.      - id
  3723.       - dayOfTransaction
  3724.       - amountEuro
  3725.     properties:
  3726.       id:
  3727.         type: integer
  3728.       dayOfTransaction:
  3729.         type: string
  3730.         format: date
  3731.       amountEuro:
  3732.         $ref: "#/definitions/TotalBalance"
  3733.       amountAccountCurrency:
  3734.         $ref: "#/definitions/TotalBalance"
  3735.   AddReport:
  3736.     required:
  3737.      - ruleId
  3738.     properties:
  3739.       ruleId:
  3740.         type: integer
  3741.       comment:
  3742.         type: string
  3743.   SetReportState:
  3744.     required:
  3745.      - id
  3746.       - isRead
  3747.     properties:
  3748.       id:
  3749.         type: integer
  3750.       isRead:
  3751.         type: integer
  3752.   Report:
  3753.     required:
  3754.      - id
  3755.       - createdAt
  3756.       - updatedAt
  3757.       - isRead
  3758.       - ruleId
  3759.       - userId
  3760.     properties:
  3761.       id:
  3762.         type: integer
  3763.       createdAt:
  3764.         type: string
  3765.         format: date-time
  3766.       updatedAt:
  3767.         type: string
  3768.         format: date-time
  3769.       isRead:
  3770.         type: boolean
  3771.       ruleId:
  3772.         type: integer
  3773.       userId:
  3774.         type: integer
  3775.  
  3776.   IdentityProofRequest:
  3777.     required:
  3778.      - idFront
  3779.       - idBack
  3780.     properties:
  3781.       idFront:
  3782.         type: string
  3783.         description: Base64-encoded file
  3784.       idBack:
  3785.         type: string
  3786.         description: Base64-encoded file
  3787.       force:
  3788.         type: string
  3789.         description: To force the reupload of the documents - pass "1" here.
  3790.   RuleEdit:
  3791.     required:
  3792.      - id
  3793.     properties:
  3794.       id:
  3795.         type: integer
  3796.       active:
  3797.         type: boolean
  3798.       name:
  3799.         type: string
  3800.         description: Rule name
  3801.       processingIdentifier:
  3802.         type: string
  3803.         description: Can be one of "bySum", "byTimePeriod", "byTimePeriodEvenly", "byCategory", or a combination (e.g."bySum+byCategory"). "byTimePeriodEvenly" works only with "byTarget", and conflicts with "byTimePeriod"
  3804.       savingIdentifier:
  3805.         type: string
  3806.         description: Can be one of "percentageAmount", "fixedAmount", "targetAmount"
  3807.       categoryId:
  3808.         type: integer
  3809.         description: Goes with "byCategory" processingIdentifier
  3810.       percentage:
  3811.         type: integer
  3812.         description: Goes with "percentageAmount" savingIdentifier
  3813.       frequency:
  3814.         type: string
  3815.         description: Possible values are "daily", "weekly", "monthly". Goes with "byTimePeriod" and "byTimePeriodEvenly" processingIdentifier
  3816.       fixedAmount:
  3817.         type: integer
  3818.         description: Goes with "fixedAmount" savingIdentifier
  3819.       targetSum:
  3820.         type: integer
  3821.         description: Goes with "targetAmount" savingIdentifier
  3822.       upperSum:
  3823.         type: integer
  3824.         description: Goes with "bySum" processingIdentifier
  3825.       lowerSum:
  3826.         type: integer
  3827.         description: Goes with "bySum" processingIdentifier
  3828.  
  3829.   RuleCreation:
  3830.     required:
  3831.      - processingIdentifier
  3832.       - savingIdentifier
  3833.       - name
  3834.     properties:
  3835.       name:
  3836.         type: string
  3837.         description: Rule name
  3838.       processingIdentifier:
  3839.         type: string
  3840.         description: Can be one of "bySum", "byTimePeriod", "byCategory", or a combination (e.g."bySum+byCategory")
  3841.       savingIdentifier:
  3842.         type: string
  3843.         description: Can be one of "percentageAmount", "fixedAmount", "targetAmount"
  3844.       categoryId:
  3845.         type: integer
  3846.         description: Goes with "byCategory" processingIdentifier
  3847.       percentage:
  3848.         type: integer
  3849.         description: Goes with "percentageAmount" savingIdentifier
  3850.       frequency:
  3851.         type: string
  3852.         description: Possible values are "daily", "weekly", "monthly". Goes with "byTimePeriod" processingIdentifier
  3853.       fixedAmount:
  3854.         type: integer
  3855.         description: Goes with "fixedAmount" savingIdentifier
  3856.       targetSum:
  3857.         type: integer
  3858.         description: Goes with "targetAmount" savingIdentifier
  3859.       upperSum:
  3860.         type: integer
  3861.         description: Goes with "bySum" processingIdentifier
  3862.       lowerSum:
  3863.         type: integer
  3864.         description: Goes with "bySum" processingIdentifier
  3865.       parentId:
  3866.         type: integer
  3867.         description: Will be present if the rule was created from a parent rule
  3868.  
  3869.   RuleCollection:
  3870.     required:
  3871.      - id
  3872.       - createdAt
  3873.       - updatedAt
  3874.       - name
  3875.     properties:
  3876.       id:
  3877.         type: integer
  3878.       createdAt:
  3879.         type: string
  3880.         format: date-time
  3881.       updatedAt:
  3882.         type: string
  3883.         format: date-time
  3884.       name:
  3885.         type: string
  3886.         description: Rule name
  3887.   Rule:
  3888.     required:
  3889.      - id
  3890.       - createdAt
  3891.       - updatedAt
  3892.       - active
  3893.       - processingIdentifier
  3894.       - savingIdentifier
  3895.     properties:
  3896.       id:
  3897.         type: integer
  3898.       createdAt:
  3899.         type: string
  3900.         format: date-time
  3901.       updatedAt:
  3902.         type: string
  3903.         format: date-time
  3904.       active:
  3905.         type: boolean
  3906.       name:
  3907.         type: string
  3908.         description: Rule name
  3909.       processingIdentifier:
  3910.         type: string
  3911.         description: Can be one of "bySum", "byTimePeriod", "byCategory", or a combination (e.g."bySum+byCategory")
  3912.       savingIdentifier:
  3913.         type: string
  3914.         description: Can be one of "percentageAmount", "fixedAmount", "targetAmount"
  3915.       userId:
  3916.         type: integer
  3917.       categoryId:
  3918.         type: integer
  3919.         description: Goes with "byCategory" processingIdentifier
  3920.       percentage:
  3921.         type: integer
  3922.         description: Goes with "percentageAmount" savingIdentifier
  3923.       frequency:
  3924.         type: string
  3925.         description: Possible values are "daily", "weekly", "monthly". Goes with "byTimePeriod" processingIdentifier
  3926.       fixedAmount:
  3927.         type: integer
  3928.         description: Goes with "fixedAmount" savingIdentifier
  3929.       targetSum:
  3930.         type: integer
  3931.         description: Goes with "targetAmount" savingIdentifier
  3932.       upperSum:
  3933.         type: integer
  3934.         description: Goes with "bySum" processingIdentifier
  3935.       lowerSum:
  3936.         type: integer
  3937.         description: Goes with "bySum" processingIdentifier
  3938.       parentId:
  3939.         type: integer
  3940.         description: Will be present if the rule was created from a parent rule
  3941.   BadWolf:
  3942.     required:
  3943.      - badWolf
  3944.     properties:
  3945.       badWolf:
  3946.         type: string
  3947.         description: Bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf bad wolf
  3948.   CountResponse:
  3949.     required:
  3950.      - count
  3951.     properties:
  3952.       count:
  3953.         type: integer
  3954.   MarkAsViewed:
  3955.     required:
  3956.      - ids
  3957.       - markAs
  3958.     properties:
  3959.       ids:
  3960.         type: array
  3961.         items:
  3962.           type: integer
  3963.       markAs:
  3964.         type: boolean
  3965.   PreMangopayTransaction:
  3966.     required:
  3967.      - id
  3968.       - createdAt
  3969.       - updatedAt
  3970.       - paymentPassed
  3971.       - ruleId
  3972.       - userId
  3973.       - amountEuro
  3974.       - amountAccountCurrency
  3975.     properties:
  3976.       id:
  3977.         type: integer
  3978.       createdAt:
  3979.         type: string
  3980.         format: date-time
  3981.       updatedAt:
  3982.         type: string
  3983.         format: date-time
  3984.       paymentPassed:
  3985.         type: boolean
  3986.       ruleId:
  3987.         type: integer
  3988.       userId:
  3989.         type: integer
  3990.       transactionId:
  3991.         type: integer
  3992.       amountEuro:
  3993.         $ref: "#/definitions/TotalBalance"
  3994.       amountAccountCurrency:
  3995.         $ref: "#/definitions/TotalBalance"
  3996.  
  3997.   PushNotificationDevice:
  3998.     required:
  3999.      - id
  4000.       - createdAt
  4001.       - updatedAt
  4002.       - type
  4003.       - token
  4004.       - userId
  4005.     properties:
  4006.       id:
  4007.         type: integer
  4008.       createdAt:
  4009.         type: string
  4010.         format: date-time
  4011.       updatedAt:
  4012.         type: string
  4013.         format: date-time
  4014.       type:
  4015.         type: string
  4016.       token:
  4017.         type: string
  4018.       userId:
  4019.         type: integer
  4020.   RegisterPushNotificationDevice:
  4021.     required:
  4022.      - type
  4023.       - token
  4024.     properties:
  4025.       type:
  4026.         type: string
  4027.       token:
  4028.         type: string
  4029.  
  4030.   EditPushNotificationDevice:
  4031.     required:
  4032.      - token
  4033.     properties:
  4034.       token:
  4035.         type: string
  4036.   PushToUserBody:
  4037.     required:
  4038.      - userId
  4039.       - text
  4040.     properties:
  4041.       userId:
  4042.         type: integer
  4043.       text:
  4044.         type: string
  4045.   PushResult:
  4046.     required:
  4047.      - success
  4048.       - failed
  4049.     properties:
  4050.       success:
  4051.         type: integer
  4052.       failed:
  4053.         type: integer
  4054.   AddNewsItem:
  4055.     properties:
  4056.       title:
  4057.         type: string
  4058.       author:
  4059.         type: string
  4060.       shortDescription:
  4061.         type: string
  4062.       img:
  4063.         type: string
  4064.       linkToSource:
  4065.         type: string
  4066.       createdAt:
  4067.         type: string
  4068.         format: date-time
  4069.  
  4070.   getNews:
  4071.     properties:
  4072.       news:
  4073.         type: array
  4074.         items:
  4075.           $ref: "#/definitions/News"
  4076.  
  4077.   News:
  4078.     properties:
  4079.       title:
  4080.         type: string
  4081.       author:
  4082.         type: string
  4083.       shortDescription:
  4084.         type: string
  4085.       img:
  4086.         type: string
  4087.       linkToSource:
  4088.         type: string
  4089.       createdAt:
  4090.         type: string
  4091.         format: date-time
  4092.       updateAt:
  4093.         type: string
  4094.         format: date-time
  4095.  
  4096.   getCollections:
  4097.     properties:
  4098.       collections:
  4099.         type: array
  4100.         items:
  4101.           $ref: "#/definitions/Collection"
  4102.  
  4103.   Collection:
  4104.     properties:
  4105.       id:
  4106.         type: integer
  4107.       title:
  4108.         type: string
  4109.       subtitle:
  4110.         type: string
  4111.       description:
  4112.         type: string
  4113.       photo:
  4114.         type: string
  4115.       prototypes:
  4116.         type: string
  4117.       counter:
  4118.         type: integer
  4119.       prototypesObj:
  4120.         type: array
  4121.         items:
  4122.           $ref: "#/definitions/Prototype"
  4123.       createdAt:
  4124.         type: string
  4125.         format: date-time
  4126.       updateAt:
  4127.         type: string
  4128.         format: date-time
  4129.  
  4130.   getPrototypes:
  4131.     properties:
  4132.       prototypes:
  4133.         type: array
  4134.         items:
  4135.           $ref: "#/definitions/Prototype"
  4136.  
  4137.   Prototype:
  4138.     required:
  4139.      - name
  4140.     properties:
  4141.       name:
  4142.         type: string
  4143.       targetSum:
  4144.         type: number
  4145.       processingIdentifier:
  4146.         type: string
  4147.  
  4148.   ruleSuggestions:
  4149.     properties:
  4150.       suggestions:
  4151.         type: array
  4152.         items:
  4153.           $ref: "#/definitions/Suggestion"
  4154.  
  4155.   Suggestion:
  4156.     properties:
  4157.       name:
  4158.         type: string
  4159.       targetSum:
  4160.         type: number
  4161.       fixedAmount:
  4162.         type: number
  4163.       lowerSum:
  4164.         type: number
  4165.       upperSum:
  4166.         type: number
  4167.       frequency:
  4168.         type: string
  4169.       weight:
  4170.         type: number
  4171.  
  4172.   dailyStatistics:
  4173.     properties:
  4174.       rules:
  4175.         type: number
  4176.       transactions:
  4177.         type: number
  4178.       savings:
  4179.         type: number
  4180.  
  4181.   weeklyStatistics:
  4182.     properties:
  4183.       rules:
  4184.         type: number
  4185.       transactions:
  4186.         type: number
  4187.       savings:
  4188.         type: number
  4189.  
  4190.   weeklyChart:
  4191.     properties:
  4192.       days:
  4193.         type: array
  4194.         items:
  4195.           $ref: "#/definitions/chartDay"
  4196.       top:
  4197.         type: number
  4198.       globalAvg:
  4199.         type: number
  4200.  
  4201.   chartDay:
  4202.     properties:
  4203.       day:
  4204.         type: string
  4205.       value:
  4206.         type: number
  4207.       avg:
  4208.         type: number
  4209.  
  4210.   average:
  4211.     properties:
  4212.       day:
  4213.         type: number
  4214.       avg:
  4215.         type: number
  4216.  
  4217.   transactionsAvarage:
  4218.     properties:
  4219.       average:
  4220.         type: number
  4221.       category:
  4222.         type: string
  4223.       lastDate:
  4224.         type: string
  4225.         format: date-time
  4226.  
  4227.   userBalance:
  4228.     properties:
  4229.       balance:
  4230.         type: number
  4231.  
  4232.   history:
  4233.     properties:
  4234.       paymentStatus:
  4235.         type: string
  4236.       paymentId:
  4237.         type: number
  4238.       paymentDate:
  4239.         type: string
  4240.         format: date-time
  4241.       paymentDir:
  4242.         type: number
  4243.       sum:
  4244.         type: number
  4245.       error:
  4246.         type: string
  4247.  
  4248.   RulesStats:
  4249.     properties:
  4250.       rules:
  4251.         type: array
  4252.         items:
  4253.           $ref: "#/definitions/RuleStats"
  4254.  
  4255.   RuleStats:
  4256.     required:
  4257.      - id
  4258.       - createdAt
  4259.       - updatedAt
  4260.       - active
  4261.       - processingIdentifier
  4262.       - savingIdentifier
  4263.       - curMonth
  4264.       - lastMonth
  4265.     properties:
  4266.       id:
  4267.         type: integer
  4268.       createdAt:
  4269.         type: string
  4270.         format: date-time
  4271.       updatedAt:
  4272.         type: string
  4273.         format: date-time
  4274.       active:
  4275.         type: boolean
  4276.       name:
  4277.         type: string
  4278.       processingIdentifier:
  4279.         type: string
  4280.       savingIdentifier:
  4281.         type: string
  4282.       userId:
  4283.         type: integer
  4284.       categoryId:
  4285.         type: integer
  4286.       percentage:
  4287.         type: integer
  4288.       frequency:
  4289.         type: string
  4290.       fixedAmount:
  4291.         type: integer
  4292.       targetSum:
  4293.         type: integer
  4294.       upperSum:
  4295.         type: integer
  4296.       lowerSum:
  4297.         type: integer
  4298.       parentId:
  4299.         type: integer
  4300.       curMonth:
  4301.         type: integer
  4302.       lastMonth:
  4303.         type: integer
Add Comment
Please, Sign In to add comment